We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
$(function() { var editor = editormd("editormd", { path : "editor-md-master/lib/", width:'90%', height:'640', imageUpload : true, imageFormats : ["jpg", "jpeg", "gif", "png", "bmp", "webp"], imageUploadURL : "editor-md-master/examples/php/upload.php", saveHTMLToTextarea:true }); $('#submit').click(function(){ console.log(editor.getMarkdown()) //获取值正常 console.log(editor.getHTML()) //获取不到值 console.log(editor.getPreviewedHTML()) //正常 return false; })
});
The text was updated successfully, but these errors were encountered:
我也遇到了此问题,不仅我的获取不到,Sample 中的都获取不到。。。 Chrome, Sarafi 都是如此
看了下代码,问题是由于设置的是val()但获取的是html()造成的
val()
html()
1902行:this.htmlTextarea.val(newMarkdownDoc); 应改为:this.htmlTextarea.html(newMarkdownDoc);
this.htmlTextarea.val(newMarkdownDoc);
this.htmlTextarea.html(newMarkdownDoc);
或
2187行:return this.htmlTextarea.html(); 改为: return this.htmlTextarea.val();
return this.htmlTextarea.html();
return this.htmlTextarea.val();
Sorry, something went wrong.
@sumiaowen @Weston-Liu fixed @v1.4.5
No branches or pull requests
$(function() {
var editor = editormd("editormd", {
path : "editor-md-master/lib/",
width:'90%',
height:'640',
imageUpload : true,
imageFormats : ["jpg", "jpeg", "gif", "png", "bmp", "webp"],
imageUploadURL : "editor-md-master/examples/php/upload.php",
saveHTMLToTextarea:true
});
$('#submit').click(function(){
console.log(editor.getMarkdown()) //获取值正常
console.log(editor.getHTML()) //获取不到值
console.log(editor.getPreviewedHTML()) //正常
return false;
})
The text was updated successfully, but these errors were encountered: