Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • David Gregory 88 posts 234 karma points
    Dec 13, 2024 @ 09:12
    David Gregory
    0

    Word formatting Umbraco 13

    We have found that the tinymce editor is virtually unusable these days now that tinymce has removed the automatic paste from Word clean up.

    It's ruining our website and is even making us look at alternatives to Umbraco.

    Has anyone found a work around to the problem?

    Thanks David

  • John Wilson 15 posts 109 karma points
    25 days ago
    John Wilson
    0

    Probably not the answer you want, but pasting into a plain-text editor, and then copying and pasting from that will work to prevent any of the Word styles from being applied. It is an extra step, but at least it's a workaround.

  • Huw Reddick 1932 posts 6722 karma points MVP 2x c-trib
    18 days ago
    Huw Reddick
    0

    You could also define valid_classes which would then strip out the microsoft ones, you can do similar with styles

  • girish 17 posts 90 karma points
    16 days ago
    girish
    0

    Pasting from Word often carries over loads of hidden styling that can wreak havoc on your site. Although TinyMCE no longer does the full auto-clean the way it used to, there are still a few strategies you can try:

    1. Use TinyMCE’s Paste Plugin

      • Enable the paste plugin in your TinyMCE config.
      • Add settings like paste_remove_spans: true and paste_remove_styles_if_webkit: true to automatically strip unwanted Word styles.
    2. Define Valid Elements & Classes [Just like @Huw Reddick mentioned]

      • Configure valid_elements and valid_classes so only the tags and classes you need are allowed; the rest is stripped out.
    3. Paste as Plain Text

      • Paste content from Word into a plain-text editor (e.g. Notepad) first, then copy it into TinyMCE. This adds an extra step, but avoids messy MS Word markup.
    4. Optional: Create a “Paste from Word” Button

      • Older versions of TinyMCE had a dedicated button for Word. You can replicate this by customizing the Paste plugin to clean Word-specific styles in one click.

    I hope these tips help you get back some control over the formatting.

  • David Gregory 88 posts 234 karma points
    1 week ago
    David Gregory
    0

    Thanks for the replies.

    I think the paste plugin has been removed since version 6.

    I'll try the valid elements and classes option.

    Pasting into notepad first is something I would do but trying to get users to do that is another story.

    David

Please Sign in or register to post replies

Write your reply to:

Draft