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 ...
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. ...
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 ...
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...) ...
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 ...
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 ...
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 ...
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"/>
...
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. ...
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 ...
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 <...
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 ...
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 ...
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 ...
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 ...
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;
...
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 ...
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.
...
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:
<...
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-...
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, ...
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 ...
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 ...
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 ...
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
...
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 ...
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 ...
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 ...
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 ...
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 = ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
richtext-editor × 100sitecore-client × 15
content-editor × 13
experience-editor × 12
links × 8
media-library × 6
sxa × 4
link-manager × 4
css × 4
sitecore-api × 3
pipelines × 3
custom-field × 3
validation × 2
urls × 2
xm-cloud × 2
jss × 1
security × 1
multilingual × 1
templates × 1
fieldtype × 1
content-management × 1
speak × 1
versions × 1
performance × 1
url-rewrite × 1