Umbraco 12 RTE pasting from Word
j
In our umbraco 8 site when we paste from Word it seemed to automatically remove the Word markup tags and keep the normal styles such as Bold, Italic etc. In 12 this doesnt seem to be the case. If we use Clear Formatting it removes the Bold, Italic styles too. Any ideas if there is a setting in 12 that we can implement that will allow us to paste direct from Word to the RTE keeping the normal styles and removing the Word mark up automatically?
d
You are likely able to do this by configuring the validElements config inside RichTextEditor in the appsettings. I'm not very good with this particular config, I must add, but I think it's a good place to look
j
I did start tinkering with this but the span class was still being populated with Word markup
@Kevin Jump
s
It's because the word markup fixing is now a premium plugin in tinymce 😕
j
Ah! Yes - I just noticed. They now want $130 a month. 🤨
k
Ctrl-Shift-V time 😞
t
Slightly off topic crazy idea - would it be easy to introduce some other RTE solution with the upcoming Bellissima backoffice overhaul?
j
@TackleMcClean 🏅 With Bellissima, plugins for TinyMCE can now be registered through Umbraco's extension api meaning, that you can create and distribute such a plugin as a package, if you wrote something yourself. I'm not aware of any (free) open-source plugin that replaces the functionality of Tiny's premium Power Paste plugin.
For anyone wanting to use premium plugins in TinyMCE, it will be a lot easier to do so with Umbraco 13.1 where we'll be able to load them from Tiny's CDN if you have an API key. That will be out end of January 🙂
t
@Jacob Overgaard what about introducing a totally separate editor, as in not TinyMCE? Not saying it's a good idea or even desirable, but I'm curious to how easy Bellissima makes custom field creation.
s
You'll need a way to handle internal links, media files for images etc, but other than that, should be no big deal.
j
Should be all right, yeah. If you save the content the same way as tinymce, you should even be able to use Umbraco's own value converter so blocks and internal links work out of the box
t
Cool! As I said, probably not really desirable but having the option is awesome.
m
We get some joy pasting from word, and then using the remove formatting tool from the tinyMce toolbar. (for tables particularly it removes all the MSO junk.. but doesn't remove the col width attributes) Helps if you have the status bar and the tag path to be able to select the table tag too.
j
I think, if you use the Remove Formatting or Ctrl-Shhft-V it removes the other formatting too such as Bold, Italic etc
m
Has anyone found any solutions for customers who paste from word? We are trying to upgrade Umbraco for our customers, but we have to say , oh by the way this upgrade will make this aspect of Umbraco worse (no they don't want to pay USD$130 per month for PowerPaste even if they are our heaviest paste from word user)
s
@Myster you can add this to your appsettings.json
Copy code
json
{
    "Umbraco": {
        "CMS": {
            "RichTextEditor": {
                "CustomConfig": {
                    "paste_as_text": true
                }
            }
        }
    }
}
It strips all formatting and leaves only 's and 's
@skttl Do you know where to find this paste_as_text property documented? Just curious if it's possible to configure it so it at least allows headings as well. I'm guessing it's not, but worth looking around.
s
d
Did any of you notice that this paste as text option no longer works in Umbraco 13? It appears that the option is automatically converted to a string value by Umbraco and now tinymce complains that the value is not a boolean
Looks like it works if you turn the boolean in the appsettings into a string. But it has to be completely lowercase. Umbraco seems to explicitly check for lowercase "true" and convert that to a boolean in the javascript.
t
Yeah, a boolean does not work, lowercase string was the only that worked for me
313 Views