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.
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:
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.
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.
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.
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.
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
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.
You could also define valid_classes which would then strip out the microsoft ones, you can do similar with styles
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:
Use TinyMCE’s Paste Plugin
paste
plugin in your TinyMCE config.paste_remove_spans: true
andpaste_remove_styles_if_webkit: true
to automatically strip unwanted Word styles.Define Valid Elements & Classes [Just like @Huw Reddick mentioned]
valid_elements
andvalid_classes
so only the tags and classes you need are allowed; the rest is stripped out.Paste as Plain Text
Optional: Create a “Paste from Word” Button
I hope these tips help you get back some control over the formatting.
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
is working on a reply...