tinyMCE paste as word
Hello: Does anyone know how to paste as Word into the newest versi开发者_运维百科on of tinyMCE (3-3-9-3)? Thanks.
As of a number of versions ago, pasting from Word into a TinyMCE window is as easy as copying the Word document (control-c or x) and just pasting it into the TinyMCE window. It should then convert the office code into HTML.
EDIT:
In order to preserve your office stylings, you need to add paste_retain_style_properties to your TinyMCE.init declaration.
Example:
tinyMCE.init({
....
paste_retain_style_properties : "margin, padding, width, height, font-size, font-weight, font-family, color, text-align, ul, ol, li, text-decoration, border, background, float, display",
....
});
精彩评论