在TinyMCE中加载HTML文件 [英] Load html files in TinyMce

查看:1879
本文介绍了在TinyMCE中加载HTML文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有这样的:

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

这篇关于在TinyMCE中加载HTML文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆