Skip to main content
10 votes
Accepted

Is it possible to customize HTML Editor Profile based on Sitecore Role a user belongs to?

Yes you can do it. You can customize the constructor of the EditorConfiguration class: You can use Reflector, IlSpy or .Peek or any disssamble tool to investigate the code. Here is example of the ...
Vlad Iobagiu's user avatar
  • 18.8k
10 votes

display only 100 symbols from rich text

This problem is best addressed with CSS, where you are trying to control the size of a rendered string, because 100 characters measures a different length depending on what characters they contain. ...
Richard Hauer's user avatar
8 votes
Accepted

How to change Sitecore 8.2 RTE behavior to insert <p> tag instead of <br> on Enter?

Figured this out... The script that handles in the inline editing of rich text fields in Page Editor is \sitecore\shell\Applications\Page Modes\InlineEditingUtil.js. The code that was causing the ...
Erica Stockwell-Alpert's user avatar
7 votes
Accepted

Has anyone ever tried to replace an RTE in Sitecore, with something custom like tinyMCE? If there is there any instructions?

I went down this path in this question. To this point I don't think anyone has pulled it off. And its mainly because there is so much Sitecore functionality in the RTE (i.e. Links, photos, etc...) ...
Chris Auer's user avatar
  • 13.2k
7 votes

display only 100 symbols from rich text

Yes, there is. Go with HtmlAgilityPack.dll. It's already there with your Sitecore site. See here for details: HtmlAgilityPack substring of all by length EDIT Mark commented that this is a link ...
Marek Musielak's user avatar
  • 24.2k
7 votes
Accepted

Prevent Width\Height styles when resizing image in RTE

Out of the box, you cannot prevent this. It's just the way the RTE works in Sitecore. Fortunately you can work around this issue, but it's a fairly involved process. It involves: Parsing the RTE ...
Mark Cassidy's user avatar
  • 25.4k
7 votes
Accepted

Applying rich text editor custom classes

We encountered the same issue and fixed it in the ToolsFile.xml. Our experience is that the classes section of that file should be empty to have the classes from your attached css file to be imported ...
Gatogordo's user avatar
  • 20.3k
6 votes
Accepted

Add full media url in Rich text editor

From what I remember, the logic responsible for RTE links is in ExpandLinks processor of renderField pipeline: <processor type="Sitecore.Pipelines.RenderField.ExpandLinks, Sitecore.Kernel"/> ...
Marek Musielak's user avatar
  • 24.2k
5 votes
Accepted

Length cannot be less than zero. When using sitecore link in richtext edtior

While investigating this issue when I hit it during an upgrade, my debugging discovered that this was caused by a bug in the PortectedImageLinkRenderer class which cannot handle empty <a> tags. ...
Jason St-Cyr's user avatar
  • 6,821
5 votes
Accepted

Remove 'Is valid XHtml' validation rule for Rich Text field

You can remove the rule validation on the Global Rules item /sitecore/system/Settings/Validation Rules/Global Rules You'll want to remove the rule from the Validate Button, and Validate Button fields ...
Patrick Barron's user avatar
5 votes
Accepted

How to add a class img-responsive to RTE in Sitecore 8.x

Pointing to the entire bootstrap.css is a bit overkill. (And I suspect Sitecore / Telerik is having a hard time parsing it.) What you should do is ignore the ToolsFile.xml entirely (make sure the <...
maz's user avatar
  • 1,833
5 votes
Accepted

Rich Text Editor Cell Properties

To resolve the issue, please update the Telerik RTE assemblies to the newer version: Extract the Telerik.Web.UI.dll and Telerik.Web.UI.Skins.dll assemblies from the attached archives into your \bin ...
Vlad Iobagiu's user avatar
  • 18.8k
5 votes

Prevent Width\Height styles when resizing image in RTE

You could tie into the saveRichTextContent Pipeline. You could then parse the html that has been entered, and find all the images and strip out the width and height, which is a good practice if you ...
Dylan Young's user avatar
  • 4,314
5 votes

rel="noopener noreferrer" get automatically added on other content when we add new link with target equals to blank in RTE

You should leave it as is. target="_blank" is a security vulnerability. In previous versions, you had to fix this yourself but in Sitecore 8.2 onwards, this is the default behaviour. More ...
Mark Cassidy's user avatar
  • 25.4k
5 votes
Accepted

Prevent content authors removing html from the experience editor

The short answer is - you can't. By design, even if you disable the Edit HTML tab in the RTE, just by editing the text, the editor will modify the html contained within. Your component is designed ...
Richard Seal's user avatar
  • 20.8k
4 votes

display only 100 symbols from rich text

HtmlAgilityPack.dll is used. public class Renderer { public string DoRender(HtmlDocument document, int length) { int totalLength = 0; int i = 0; ...
Vlad Shpak's user avatar
  • 1,792
4 votes
Accepted

Can't drag & drop SXA components in overlay content (through experience editor)

This is a known issue in SXA 1.5, it was fixed in SXA 1.6 so if you can I highly recommend you to upgrade. Rendering Variants do not work on Overlay items thus you cannot see renderings because they ...
Alan Płócieniak's user avatar
4 votes

How can I prevent the richtext field to insert unwanted html?

You can write a custom save event that cleans up the resulting HTML. You can find sample code below. Adjust to your own needs. Don't forget the mentioned configuration patch to activate the code. ...
Joost's user avatar
  • 505
4 votes

Prevent rich text editor from inserting paragraphs on Ctrl+Enter

There is a setting in config which allows you to set which tag to use for line breaks. By default it is set to use the p tag but you can change it to something else, using a patch config file: <...
jammykam's user avatar
  • 13.9k
4 votes
Accepted

How to create Dropdown in Rich Text Editor (wysiwyg) in Sitecore 9.0.2

This blog post describes the detailed steps to configure a custom dropdown list button in the Rich Text Editor in Sitecore 9: https://sitecorerunner.com/2018/08/21/adding-rte-richtext-custom-dropdown-...
Alessandro Faniuolo's user avatar
4 votes
Accepted

Rich-Text field in experience editor mode adds unwanted break points in Firefox

We experienced the same issue on a Sitecore 9.3 instance and fixed it adding the following code at the top of the \sitecore\shell\Controls\Rich Text Editor\RichText Commands.js file in our solution, ...
Alessandro Faniuolo's user avatar
4 votes

Is "STATUS_BREAKPOINT" a Known Error in Rich Text Editor

We also just started encountering this STATUS_BREAKPOINT error today when inserting an image and pressing Accept in the rich text editor in Sitecore 10.2. It occurs in both Microsoft Edge and Google ...
user13103's user avatar
3 votes
Accepted

RTE Inserting/Rendering Link Appending Text

The Sitecore way to replace the text in a Rich Text field would be to create a custom processor in <renderField> pipeline, insert it before RenderWebEditing to ensure all links in fields are ...
jammykam's user avatar
  • 13.9k
3 votes

Is it possible to customize HTML Editor Profile based on Sitecore Role a user belongs to?

The solution from @Sitecore Climber is robust, but if you are looking for a quick-and-dirty solution, you can analyze your role capabilities and look for subsets of capabilities. If all your users ...
Jason St-Cyr's user avatar
  • 6,821
3 votes
Accepted

Edit ForeColor list in RichText editor

There is a option "add custom color" but it dissappear after closing the editor window. But you can add custom color statically. Open Website\sitecore\shell\Controls\Rich Text Editor\ToolsFile.xml ...
Vlad Iobagiu's user avatar
  • 18.8k
3 votes

Sitecore 8.2 Rich Text Editor drop down items

FormatBlock For your question, you can find the values for the FormatBlock under the item /sitecore/system/Settings/Html Editor Profiles/Rich Text Full/Paragraphs. Out of the box, Sitecore's ...
Chris Auer's user avatar
  • 13.2k
3 votes
Accepted

rel="noopener noreferrer" get automatically added on other content when we add new link with target equals to blank in RTE

This is a known bug.I raised a ticket to Sitecore support and they replied that it is a bug and it already resolved in Sitecore 8.2 update 6 So you have two choices here - Upgrade your solution on ...
Ravindra S. Rathore's user avatar
3 votes
Accepted

Sitecore Rich Text Editor removing 'autoplay' attribute

What you can do is you can just use the true or false for those attributes you require to implement. Simply just doing autoplay="true" loop="true" controls="true" Because autoplay="true" and ...
Sitecore Sam's user avatar
  • 1,163
3 votes

Preventing RTE from removing scripts for specific templates only

First of all, the above links (in the question) do not work anymore. Any inline js is removed on several levels and so it's extremely difficult to handle all of them without making your upgrade ...
TamerM's user avatar
  • 1,744
3 votes
Accepted

Richtextbox (RTE) link.aspx custom link provider/pipeline

Whatever you're doing, I think you're off doing something pretty far removed from established Sitecore Best Practices. That said: string richText = yourItem["rich text field"]; string expandedLink = ...
Mark Cassidy's user avatar
  • 25.4k

Only top scored, non community-wiki answers of a minimum length are eligible