WordPress.org

Ready to get started?Download WordPress

Forums

How to stop TinyMCE from pulling MS styles from Word docs (5 posts)

  1. mstrix
    Member
    Posted 6 years ago #

    I have been to the TinyMCE forums/FAQ etc to no avail...

    I have started using WordPress to power small sites for clients who want to manage their own content, and so far, it's been working great. But I find that TinyMCE creates problems for me as my clients have a tendency to cut and paste from MS Word into the rich-text portion of the editor (where it defaults), generation all kinds of horrific, broken, and otherwise invalid MS code.

    It does appear that TinyMCE can be customized... I actually want it to do LESS.... I want it to create these tags only: strong, em, blockquote, p and links. Ok, maybe lists. I can't really think of anything else it needs to do. I like the buttons optioins on the Rich Text Editor, but I don't like the way it accepts MS styles and invalid HTML; wish it would just displa plain-text valid x/html. At the very least, I'd like it to default to the code (NOT rich text) editor.

    Ideas? Plugins? Solutions?

  2. Lester Chan
    Member
    Posted 6 years ago #

    copy the text to notepad then from there copy again to your wordpress text editor.

  3. Andrew Ozz
    WordPress Dev
    Posted 6 years ago #

    I actually want it to do LESS.... I want it to create these tags only: strong, em, blockquote, p and links. Ok, maybe lists.

    That's pretty easy. Make a 1 line plugin that uses the mce_valid_elements filter and return only the tags that you want to be used.
    http://codex.wordpress.org/Plugin_API/Filter_Reference#Rich_Text_Editor_Filters

  4. mstrix
    Member
    Posted 6 years ago #

    azaozz, thank you!

  5. Chris_K
    Member
    Posted 6 years ago #

    Even easier. 2.3 adds a button to show more TinyMCE features. One of those buttons is "Paste from Word".

Topic Closed

This topic has been closed to new replies.

About this Topic