I'm trying to configure TinyMCE so that it accepts pasting from Microsoft Word and cleans it up in an expected HTML hierarchy.
Most of our editorial staff use a single line break to denote a line break and a double return to indicate a paragraph. However, MS Word's output puts the next line in a separate paragraph (unless you shift-enter for a carriage return) and a blank paragraph with non-breaking space for two returns. Is there any way to sanitize this input? I've tried playing around with the plugins but can't find any magic combo.
The TinyMCE PowerPaste plugin automatically cleans up content from Microsoft Word/Excel and HTML sources to ensure clean, compliant content that matches the look and feel of the site. Note: Due to limitations in Excel online (part of Office Live) PowerPaste does not support pasting from Excel online.
What to Know. Copy text from Word > paste into Notepad or Text Editor. Copy text from Notepad/Text Editor > paste into WordPress. Or, copy text from Word, then go to post editor in WordPress dashboard.
The ExportToDoc plugin adds an export button to the menu of the TinyMCE editor. By clicking the Export to Doc button, TinyMCE editor content HTML will be converted to Microsoft Word document in the same format and you can save it to your computer as a . doc file.
The TinyMCE getContent and setContent methods You can do this using the getContent() API method. Let's say you have initialized the editor on a textarea with id=”myTextarea”. This will return the content in the editor marked up as HTML.
I've had success with this plugin.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With