Comments (5)
我把onchange
回调处理合并到saveToTextareas()
方法里了。比如在第一次加载时,通过动态设置markdown源文档的,可视作change
了,但想想如果markdown是直接就设在textarea
里,又不合理了。再考虑一下是否修改一下。
from editor.md.
还有一个特殊场景是: texarea内容为空,或者根本没有textarea。 这时候第一次加载不应该 动态设置markdown源文档
, 也就不会触发change
了。
from editor.md.
还是改一下吧,初始化load后的change才算是。先标记一下。
from editor.md.
@v1.1.7 fixed.
from editor.md.
//http://pandao.github.io/editor.md/examples/dynamic-create-editormd.html 在此基础上添加onchange函数
var testEditormd;
$(function() {
$("#create-btn").click(function(){
$("#layout").append("<div id=\"test-editormd\"></div>");
testEditormd = editormd("test-editormd", {
width: "90%",
height: 640,
markdown : "### 动态创建 Editor.md\r\n\r\nDynamic create Editor.md",
path : '/src/editormd/lib/',
onchange: function() {
console.log('editor onchange.....!!!!!')
}
});
});
$("#remove-btn").click(function() {
testEditormd.editor.remove();
});
});
当创建,然后销毁编辑器,然后之后每次创建编辑器时,都会触发onchange事件。我用的editormd版本为1.5
from editor.md.
Related Issues (20)
- wrong table view
- Katex无法识别公式编号问题
- 加载错误
- 示例图片加载错误
- Spellcheck not working
- 使用HTML的table之后会自动在顶部加很多br HOT 2
- 带基础认证信息的链接问题
- Fullscreen Error
- emoji 怎么在html中替换
- Make left side monospace
- There is an XSS on the editor.md.
- Chrome extension to replace GitHub Markdown editor?
- I want add new block quoate syntax to editor md
- 引入之后一直转圈 HOT 1
- Return value of Typecho\I18n\GetText::translate() must be of the type string, null returned
- Invalidity of TeX in tables(forms)
- 默认全窗口预览的问题 HOT 2
- :heart: icon not rendering in Editor
- flow 流程图 在 markdownToHTML 操作时失效问题
- 大佬能否考虑下加入语法高亮
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from editor.md.