TinyMCE load ajax

On September 13, 2009, in Javascript, PHP, Tips, Tricks, Web Application, by phpsolutions

Today I got problem to load TinyMCE as dynamic loaded textareas by Ajax?

Solution:

<a href=”javascript:void(0)” onclick=”ajaxEdit(); showEditor();”>Edit Content</a>

here ajaxEdit() is ajax function where textarea loaded by ajax as html response.

here we have use showEditor(); to load TinyMCE editor … page loaded by Ajax

<script>

function showEditor()
{

setTimeout(“initEditor(‘newsdesc’)”,4000);

}

tinyMCE.init({………………………
…………………………………………………});

function initEditor(id)
{

tinyMCE.execCommand(‘mceAddControl’, false, id);

}

</script>

tiny

3 Responses to TinyMCE load ajax

  1. Anonymous says:

    I agree completely using your conclusions and believe that you’ve made some excellent points. Also, I prefer customized for specific cultures of your respective site and the simple navigation. I’ve bookmarked your blog and definately will return often!

  2. Anonymous says:

    Excellent read, I simply passed this onto a colleague who had been doing little research on that. Anf the husband actually bought me lunch because I ran across it for him smile So i want to rephrase that: Appreciate your lunch!

  3. Anonymous says:

    I agree together with your thoughts here and that i really love your site! I’ve bookmarked it to ensure I’m able to keep coming back & read more in the future.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.