iframe中的微型MCE编辑器
我有一个html页面,其中我在iframe中使用TinyMCE编辑器,我有一个按钮在iframe的外侧。我的问题是我想在点击按钮时获得编辑器的值,但当我点击按钮时,我什么也没发现,请帮帮忙,这是我的代码 Iframe代码:iframe中的微型MCE编辑器,iframe,tinymce,Iframe,Tinymce,我有一个html页面,其中我在iframe中使用TinyMCE编辑器,我有一个按钮在iframe的外侧。我的问题是我想在点击按钮时获得编辑器的值,但当我点击按钮时,我什么也没发现,请帮帮忙,这是我的代码 Iframe代码: <iframe id="EditorFrame" src="UploadTemplates.aspx" frameborder="0" style="height: 900px; width: 1000px" scrolling="auto"&g
<iframe id="EditorFrame" src="UploadTemplates.aspx" frameborder="0" style="height: 900px;
width: 1000px" scrolling="auto"></iframe>
在点击按钮1星Jquery时,我没有发现TinyMCE的任何内容,尽管我找到了TinyMCE的对象,但无法获取值。请帮助我如何在iframe on button点击时获取timyMCE的值使用Jquery解决问题的方法可能是使用getContent而不是getContent。
使用getCOntent,您应该会出现javascript错误 我也使用getContent,但值是undefineduse tinymce.getTemplateEditor,而不是tinymce.getTemplateEditor!
<div>
<p>
<textarea id="TemplateEditor" cols="50" rows="50" runat="server">
</textarea>
</p>
</div>
$(function () {
uploader = $("#TempateFileUploader");
tinyMCE.init({
// General options
mode: "textareas",
theme: "advanced",
plugins: "autolink,lists,spellchecker,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template",
theme_advanced_toolbar_location: "top",
theme_advanced_toolbar_align: "left",
theme_advanced_statusbar_location: "bottom",
theme_advanced_resizing: false,
width: "800",
height: "640"
// setup: function (ed) {
// ed.onClick.add(function (ed, e) {
// alert('Editor was clicked: ' + e.target.nodeName);
// });
// }
});
$("#Button1").click(function () {
alert(tinymce().get("TemplateEditor").getCOntent());
});
});