tinymce / tinymce

The world's #1 JavaScript library for rich text editing. Available for React, Vue and Angular
https://www.tiny.cloud
Other
14.88k stars 2.23k forks source link

Content not saved in textarea .val() after setContent #3674

Closed frapell closed 3 years ago

frapell commented 7 years ago

I am not sure if what I'm observing is a bug, or am I just doing something wrong (Or something changed in the API)... I did search but couldn't find anything about it...

When I do:

 tinymce.setContent('<p>foobar</p>');
 tinymce.save();

On TinyMCE 4.5.6, If at this point I do:

    $('textarea').val()

I get:

"<p>foobar</p>"

However, on TinyMCE 4.6.1, I get:

 " "

When doing tinymce.getContent(), I do get back

"<p>foobar</p>"

Is this a bug or am I doing something wrong?

spocke commented 7 years ago

Can't seem to reproduce it added a fiddle here: http://fiddle.tinymce.com/CQfaab

frapell commented 7 years ago

Thanks for a quick reply! looks like it might be something wrong with our integration... I will need to dive in deeper and will reply with more info if needed.

frapell commented 7 years ago

@spocke It looks like you made huge refactoring of the code from 4.5.x to 4.6.x (Apparently as part of some ticket TM-1, or something like that...)

I tried to look info about the changes, can you point me to some place where I can read about it ?

thedrjim commented 3 years ago

This issue has been closed due to inactivity. Tiny will soon be working with members of the community to close other old issues on our GitHub repositories.

Please note the official support window for TinyMCE 4 is ending on December 31, 2020. If you haven't already upgraded to TinyMCE 5 it is highly encouraged that you do so. Upgrading will give you access to the latest releases and updates made to our WYSIWYG editor focused on bringing the latest UX and developer features into the editing experience. To assist with upgrading the editor we have put together a migration guide you can use here - https://www.tiny.cloud/blog/how-to-migrate-from-tinymce-4-to-tinymce-5/

If you have any questions or concerns, you can contact me at community-qa@tiny.cloud. You can also join the discussion on our mailing list at the following link: community-qa+subscribe@tiny.cloud.