Category: Rich Text Editor

How to add a custom button into the Rich Text Editor

This is the fourth 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.

Sitecore is an incredibly good platform that provides a lot of functionality out of the box, but the greatest thing about Sitecore is that if there is something you’d like to customize, there’s always a way to do it. I’m going to walk through the process of adding a custom piece of functionality to Sitecore’s Rich Text Editor. There are a lot of reasons you would want to do this but for this example we’ll build a simple text insertion demo that you can expand upon.

Continue reading “How to add a custom button into the Rich Text Editor”

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”

How to remove HTML edit from the Rich Text Editor in Sitecore

This is the second post in a series about the Rich Text Editor (RTE) in Sitecore. To read what the first post was about just click the basics of setting up the RTE here.

Restrict the Authors

So you have now created your own HTML Editor Profile and configured your site to using it. Previously we have hidden some toolbars not to irritate our Authors. Well … they can still switch to HTML mode and change the raw HTML of the field and (even occasionally) break the magic! So nothing is stopping them from googling their favourite piece of novel (of caurse with an ugly font) and paste all of it into the HTML.

There are 2 places that the authors have access to the raw HTML. In the bottom of the Rich Text Editor, there is a pane that gives access to the raw HTML.

html-edit-button-in-editor
The HTML edit button in the RIch Text Editor

And there’s a link that says “Edit HTML”, in the Content Editor, just above a rich text field, which does just that.

html-edit-button-in-backend
HTML edit button in the content editor

Fortunately, Sitecore can manage it and make out live more easy 🙂

Continue reading “How to remove HTML edit from the Rich Text Editor in Sitecore”

How to setup the Rich Text Editor in Sitecore – The basics

Sitecore is an incredibly good platform that provides a lot of functionality out of the box, but one of the great things about Sitecore is that if there is something custom that you’d like to add in, there’s always a way to do it.

In this post I’m going to describe the main purpose of RichTextEditor and inroduce you th the ways of its extension.

 What is the Rich Text Editor in Sitecore

The Rich Text Editor is the main tool for authors in Sitecore for entering and editing the content of a website. It is the tool through which text is maintained in Rich Text fields in Sitecore templates. It can be used in both the Content Editor and the Page Editor in a popup window, but is not to be confused with the webedit field in the page editor.

rte-button-in-content-editor
Opening the Rich Text Editor from the content editor

Continue reading “How to setup the Rich Text Editor in Sitecore – The basics”