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 ...
user avatar
  • 17.7k
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. ...
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 ...
user avatar
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 ...
user avatar
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 ...
user avatar
  • 24.3k
6 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...) ...
user avatar
  • 12.9k
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"/> ...
user avatar
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. ...
user avatar
  • 6,426
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 ...
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 <...
user avatar
  • 1,783
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 ...
user avatar
  • 17.7k
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 ...
user avatar
  • 4,259
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 ...
user avatar
  • 24.3k
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 ...
user avatar
  • 18.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; ...
user avatar
  • 1,782
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 ...
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. ...
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: <...
user avatar
  • 13.6k
4 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 ...
user avatar
  • 19.1k
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-...
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, ...
user avatar
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 ...
user avatar
  • 6,426
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 ...
user avatar
  • 13.6k
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 ...
user avatar
  • 12.9k
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 ...
user avatar
  • 17.7k
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 ...
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 ...
user avatar
  • 1,154
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 ...
user avatar
  • 1,632
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 = ...
user avatar
  • 24.3k
3 votes
Accepted

setting tool tip for custom button for rich text editor

Just set a display name of your button to whatever you want to be a tooltip:
user avatar

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