Tag: RichTextEditor

How to strip tags in the Rich Text Editor – Not breaking Sitecore

This is the third post in the series about Rich Text Editor (RTE) in Sitecore. The first post which was about the basics of setting up the RTE could be found here.

Copy-paste wrecks your day

So, you have configured your editor and specified access for HTML edit buttons to appropriate people only. If you think that this is the end – unfortunately I have to disappoint you. As an editors are a little bit lazy and don’t want to type a lot – they prefer to copy & paste. And in this case our RTE can lose its head.

Let’s imagine that editors prefer to prepare some content in Microsoft Word (from my experience it’s so often). In this case when they paste something formatted from MS Word into RTE the result will be a little bit ugly.

word-formatted-html
Word formatted HTML (it rhymes with ‘Hell’ for a reason)

Luckily the Rich Text Editor is a powerful tool and comes with mechanics to strip tags when pasting.

Continue reading “How to strip tags in the Rich Text Editor – Not breaking Sitecore”