TinyMCE does not load when using jQuery

I'm busy working on a project with a main page, there are tabs on this main page, every time I click on a tab, it loads the page into a div tag with the contents of the identifier.

One of the pages loaded in the div tag contains a text box in which I need TinyMCE to work.

I load pages in a div as follows using jQuery

$('#content').load('step4.php');

The funny thing is, when I open step4.php without using jQuery in the browser window, TinyMCE works, as soon as I load it using the jquery download method, it does not work, and I only see the text box.

At the top of op step4.php, I have the following code.

<script type="text/javascript" src="tinymce/jscripts/tiny_mce/tiny_mce.js"></script>

<script type="text/javascript">

tinyMCE.init({

    theme : "advanced",

    mode : "textareas",

    plugins : "fullpage",

    theme_advanced_buttons3_add : "fullpage"

  }); 

</script>
+3
source share
2 answers

Safari? (. jQuery.load() javascript html )

, (init , js ) init $.load, .

 $('#content').load('step4.php', function() {
      tinyMCE.init({ 
        theme : "advanced", 
        mode : "textareas", 
        plugins : "fullpage", 
        theme_advanced_buttons3_add : "fullpage" 
      });  
    });
+3

- , ? :

step4.php jQuery, Firebug ( ), , tiny_mce.js. jQuery TinyMCE ( jQuery, ), .

: WebKit ()?

0

Source: https://habr.com/ru/post/1730863/


All Articles