我是Javascript/TinyMCE的初学者,我试图理解如何从编辑器获取HTML内容,并用简单的alert()函数显示它。如何从TinyMCE编辑器中提取HTML内容
我有这种极简的配置我的HTML页面:
<div id="tiny">
<script type="text/javascript">
tinyMCE.init({
// General options
mode : "specific_textareas",
editor_selector : "mceEditor"
});
</script>
</div>
<form method="post" action="somepage">
<textarea id="myarea1" class="mceEditor">This will be an editor.</textarea>
</form>
在TinyMCE Website,他们解释说,我必须这样做:
// Get the HTML contents of the currently active editor
console.debug(tinyMCE.activeEditor.getContent());
而且here太
tinymce.activeEditor.getContent()
我不知道为什么它不起作用
有人有想法吗?
非常感谢您的帮助。这是很好解释,我现在明白了:) – Ikes