[英]How do we grab the content from Toast UI Editor (JavaScript)?
I'm sorry if this is blindingly simple, but I cannot for the life of me find some documentation on it.如果这太简单了,我很抱歉,但我一辈子都找不到关于它的文档。
I've been through http://nhnent.github.io/tui.editor/api/latest/index.html and couldn't see it.我翻了http://nhnent.github.io/tui.editor/api/latest/index.html也没看到。 With most JavaScript wysiwyg editors, they usually dump the data into a <textarea>
, but this one doesn't.对于大多数 JavaScript 所见即所得编辑器,它们通常会将数据转储到<textarea>
中,但这个不会。
Just checking to see if anyone else has used it and knows how that works.只是检查是否有其他人使用过它并且知道它是如何工作的。 I want to use it within a form and submit the data/text it generates.我想在表单中使用它并提交它生成的数据/文本。
Have you tried: var content = editor.getValue();
您是否尝试过: var content = editor.getValue();
? ?
Use editor.getMarkdown()
;使用editor.getMarkdown()
;
This gets content to markdown这将获取内容到 markdown
https://nhn.github.io/tui.editor/latest/ToastUIEditorCore https://nhn.github.io/tui.editor/latest/ToastUIEditorCore
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.