Load html files in TinyMce

戏子无情 提交于 2020-01-05 02:56:51

问题


I have this:

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

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

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


回答1:


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);


来源:https://stackoverflow.com/questions/9789729/load-html-files-in-tinymce

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!