Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

tinyMCE paste as word

Hello: Does anyone know how to paste as Word into the newest version of tinyMCE (3-3-9-3)? Thanks.

like image 547
stampede76 Avatar asked Dec 17 '22 18:12

stampede76


1 Answers

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",
     ....
});

like image 123
KatyaDC Avatar answered Dec 19 '22 06:12

KatyaDC