开发者

TinyMce set html content with ajax request

I'm really stuck with a TinyMce / 开发者_开发知识库Jquery / Php issue and hope somebody can advise :

I have a textarea managed with TinyMce which has preloaded html content, fetched with classic database request. Everything ok till here.

Then I trigger an ajax request with jquery which either submits the textarea content in order to update it or get an alternative html content to dynamically fill it (in my case the textarea is used for multilanguage translation).

The problem is that I cannot set html content which contains html table tags () via this ajax request. It always fails. No problem with other tags. The table was previously created within the same textarea.

The method I use to append content to TinyMce textarea is :

            tinyMCE.get('textarea_id').focus(); 
            tinyMCE.activeEditor.setContent('html content');

which forks fine, except for html with tables tags.

Any ideas ?

Thanks


I found : have to use the php function mysql_real_escape_string(); any other methods of escaping I tried failed

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜