lundi 31 août 2015

tinymce setcontent getcontent, what is difference of default usage and format raw?

What is the difference

tinymce.activeEditor.setContent(foo);
tinymce.activeEditor.setContent(foo, {format:'raw'});

I know the documentation of tinymce.setContent/getContent but it does not explain too much. And i could not any detailed explanations or examples in stackoverflow or google. When should we use one and the other? Which drawbacks has each one? Can anyone give some more details? What I found so far is, i am using TinyMCE embedded in a java application and use it as mail reader and mail editor. When we receive an email written by outlook which contains numbered lists, the HTML of the mail contains mso tags. If we set the content which contains mso tags with default usage, setContent(foo), we can not see the numbered lists elements properly, they are left aligned. And other font problems occur. But if we use setContent(foo, {format:raw}) we can see the document properly. Why this difference occurs?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire