I would like to leave user to make rich text with tinymce and save it in db, but also I want to save plain text version.
Does tinymce provide such option?
No, tinymce is designed to create HTML/rich text. But you are free to grad the plain text content of a tinymce editor and save it yourself.
There you go:
var plain_text = $(ed.getBody()).text();
You can get plain text using this code:
var plainText = tinyMCE.activeEditor.getBody().textContent;
ALso you can get html text using this one:
var richText = tinyMCE.getInstanceById('textAreaID').getContent();
`, and other block level elements to translate appropriately to a new line. This content should then be able to sit in a `
– Ifedi Okonkwo Jun 30 '16 at 12:42
`, `
`, and other block level elements to translate appropriately to a new line. This content should then be able to sit in a `
– Ifedi Okonkwo Jun 30 '16 at 12:42