Reputation: 2432
I have been searching for an answer for this for quite some time now, and I haven't been able to find a logical one yet.
I want to use TinyMCE to allow users to post formatted blogs. I don't want to force the user to use HTML tags in the textarea to put a new paragraph, they should just be able to hit the return key to get a new line, push a button to get bolded text, etc... My question is, if I am storing these blog posts in a mysql database, how can I preserve the formatting in the database securely and then show the blog post from the database with the formatting intact?
Upvotes: 0
Views: 2459
Reputation: 22817
Use getContent
:
tinyMCE.activeEditor.getContent();
it will return you the HTML of current tinymce editor, and you can send it to your server.
Upvotes: 1