Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TinyMCE don't initializing for dynamically loaded elements #229

Open
mixo opened this issue Mar 30, 2018 · 3 comments
Open

TinyMCE don't initializing for dynamically loaded elements #229

mixo opened this issue Mar 30, 2018 · 3 comments

Comments

@mixo
Copy link

mixo commented Mar 30, 2018

Hello. I use script from readme to init TinyMCE for dynamically loaded elements:
jQuery(document).ready(function() { $('form').on('sonata.add_element', function(){ initTinyMCE(); }); });
But I got error in browser console:
Uncaught TypeError: textarea.tinymce is not a function at HTMLTextAreaElement.<anonymous> (init.jquery.js:65) at Function.each (jquery.js:374) at n.fn.init.each (jquery.js:139) at HTMLDocument.<anonymous> (init.jquery.js:15) at j (jquery.js:3099) at Object.add [as done] (jquery.js:3145) at n.fn.init.n.fn.ready (jquery.js:3378) at new n.fn.init (jquery.js:2821) at n (jquery.js:76) at init.jquery.js:9

@nallias
Copy link

nallias commented Dec 27, 2018

What happens when you manually write initTinyMCE() in the javascript development console?

@Huron
Copy link
Collaborator

Huron commented Jan 2, 2020

@mixo Could you publish an example of your code?

@mixo
Copy link
Author

mixo commented Jan 2, 2020

What happens when you manually write initTinyMCE() in the javascript development console?

I get the same error: init.jquery.js:65 Uncaught TypeError: textarea.tinymce is not a function

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants