在TinyMCE中加载HTML文件加载、文件、TinyMCE、HTML

由网友(你最爱的人不是我)分享简介:我有这样的:和javascript中code在同一个aspx文件我打电话初始化在TinyMCE。and in javascript code in the same aspx file I call init to tinyMce.我有HTM...

我有这样的:

<textarea name="content"></textarea>

和javascript中code在同一个aspx文件我打电话初始化在TinyMCE。

and in javascript code in the same aspx file I call init to tinyMce.

我有HTML文件,该文件是在同一文件夹,因为这aspx文件。如何使它显示在TinyMCE的?

I have html file which is in the same folder as this aspx file. How to make it show in the tinyMce?

推荐答案

Eighter渲染你的HTML文件的内容到textare直接或 使用Ajax来获取文件内容,并将其设置为您的编辑器的内容。 我假设你的TinyMCE的编辑已经被初始化,那么你可以使用设置为从Ajax响应内容

Eighter render the content of your html file into the textare directly OR use ajax to get the file contents and set them as content of your editor. I assume your tinymce editor is already initialized then you may set the content from the ajax response using

tinymce.get('my_editorid').setContent(html_content);
阅读全文

相关推荐

最新文章