I have this weird problem in Sitecore 7.0 where within the Rich Text Editor the internal links look like below
<a href="http://xys.com/sitecore/shell/Controls/Rich%20Text%20Editor/~/link.aspx?_id=594621DB37464C17B6EFB0C6B8399415&_z=z">
where the correct href should be
<a href="~/link.aspx?_id=594621DB37464C17B6EFB0C6B8399415&_z=z">
My editors don't know if they did something special for the link to be messed up like that, it is not across all the links. It does make me think that it is human error but I can't think how they could end up with such a URL?
Any help is appreciated.
Can you check the HTML Editor Profile that you are using (core database) /sitecore/system/Settings/Html Editor Profiles and make sure that the Insert Sitecore Link is the same as the default one? You should have "InsertSitecoreLink" on the Click field
Related
I just want text and hyperlinks, and not <p> tags. I have also had an issue when putting in a list, and each <li> gets a   put in front of it which is being recognized as a new paragraph.
Is there any way to stop the rich text editor from adding these in?
The Sitecore Rich Text Editor is configurable in a variety of ways. Internally it's an instance of the Telerik RAD Editor. Hence you can apply many of the same configuration strategies documented on Telerik's site to it.
A while back I wrote a blog post about how you can stop the editor form messing about with your HTML:
https://blog.jermdavis.dev/posts/2014/ever-wished-the-rich-text-field-didnt-mess-with-your-html
While that's not addressing your exact issue, the general strategy there for configuring the internal behaviour of the editor can probably be used to meet your requirements. The underlying editor has a series of filtering behaviours that you can enable and disable to help with your requirements. The "FixEnclosingP" and "ConvertCharactersToEntities" options might be of help here? They're documented on Telerik's website:
http://www.telerik.com/help/aspnet-ajax/t_telerik_web_ui_editorfilters.html
There are also other strategies, such as post-processing the HTML that's saved by the editor. Sitecore's SaveRichTextContent pipeline might be of help here? This blog post might offer you some ideas about how that can be used:
https://techmusingz.wordpress.com/2014/06/14/wrapping-rich-text-value-in-paragraph-tag-in-sitecore/
Could someone suggest how to hide/disable HTML tab from your Rich Text Editor on sitecore?
I had a look at this, but requires a change on Sitecore core rich text XML.
Problem with this solution is we need to modify the XML for each instance and what about upgrades?
Thanks.
In the Core database (you can switch using the icon in the bottom right next to the clock) you can go to /sitecore/system/Settings/Html Editor Profiles/*profile you want*/buttons/HTML view and deny read-access on that for your users. Alternatively, at least in Sitecore 6.5, there's a profile without the HTML view. It's called Rich Text IDE. You can set the datasource field of a Rich Text field to that one, and not have the HTML view.
That's only removing the HTML option on the bottom left though, I'm not sure how to remove the Edit HTML option you have before you've opened the RTE itself (where you have Show Editor/ Suggest Fix / Edit Html). Looking at This question it might be you'll have to change the XML anyway.
The way we've got upgrades and different instances handled is by having the changed file in source control, and making sure we include it when building a deployment package.
Adding onto Trayek's great answer - you can remove access to the "Edit HTML" as outlined by Alex Shyba below:
Go to the core database, locate the field definition item:
/sitecore/system/Field types/Simple Types/Rich Text/Menu/Edit Html
On the Security Tab, click “Assign” and select the role you don’t want this option to be available to. Deny inheritance of this item or specify other security settings that make sense for your needs.
I added "Everyone" and then selected the "X" by Inheritance for Items, and the "Edit HTML" option was removed.
Taken from:
http://sitecoreblog.alexshyba.com/2009/10/quick-tip-remove-edit-html-option-for.html
I am currently creating a mobile site using Sitecore, where I cannot use HTML as markup instead need to use BML as markup language for mobile. Please let me know the following in this regard:
We have a field called Description and its of type RICH TEXT. Here we cannot use the normal Rich Text Editor given by the Sitecore as it generates HTML. So can anyone tell me if I can create a customized RICH TEXT Editor with a button Say "Mobile Bold" and which should generate tags for mobile instead of normal HTML <b></b> tags .
As you all know we can change the RICH TEXT Editor from Default to FULL by setting the source attribute of the field to /sitecore/system/Settings/Html Editor Profiles/Rich Text Full. So in the similar way can I create one more item in the Core DB as /sitecore/system/Settings/Html Editor Profiles/MobileRichTextFull and include customized buttons to it so as to generate BML tags as described above. If this is possible let me know what are all the settings need to be done and steps to be followed for the same.
do you want the users to edit BML directly, or are you able to transform HTML to BML?
For the latter, you'd better solve this in the presentation layer/pipeline.
HTML Agility Pack will be your friend when going for this last solution.
Otherwise, look at Teleriks resources about the editor.
I have some item content that is working just fine... but shows up as a broken link in the Broken Links Report. The link in question is in a Rich Text field:
<img style="WIDTH: 700px; HEIGHT: 1029px" class="imageBG" alt="All Alaska Map" src="~/media/Images/NorthToAlaska/maps/allAlaskaRouteFLNew.jpg?w=700&h=1029&as=1" />
If I use the built-in editor and insert an image, it generates a link like this:
<img width="700" height="1029" alt="All Alaska Route Map" src="~/media/F82D13579F3A4D0E88C4436D84A562F8.jpg?w=700&h=1029&as=1" />
I should note, that even using the "Insert Media Item" button, it shows up as a broken link. :(
In general, I'd much rather have the image path referenced than an item GUID that is impossible to identify if I'm just looking at it.
1) Why does that first link show up as broken, even though it works fine on the site?
2) Is there any way to get the editor to insert media item links with paths instead of GUIDs?
3) Alternately, is there a way to modify the way broken links are detected or reported?
Hej Bryan
1: Did you try to rebuild the Link Database?
To rebuild the Link Database you just have to open the Control Panel and go to the Database point. There will be an option where you can rebuild the Link Database.
2: I'm asuming you are meaning the rich text editor. It's on purpose that it inserts IDs instead of paths. If Sitecore would use paths it couldn't detect if you move the target item elsewhere in the tree. To get friendly URLs out of that you need to use the right controls of Sitecore. In XSL for example sc:fld won't render friendly URLs use sc:field instead.
3: In what way do you want to modify it? A custom report?
I would like to add a button to the Sitecore rich text editor toolbar, specifically one that inserts the H2 element.
I know the H2 element can be inserted using the paragraph styles pulldown menu, but all my editors are now using the bold button for their headings because they don't "see" the paragraph styles pulldown. So, I want to make the H2 easily available using a toolbar button. (And maybe even removing the bold buttons, since it's not semantic at all.)
But no matter how I go through the documentation, I cannot find a good explanation on how to do this.
In addition to the guide Yan posted, here's another guide.
I found a couple of walkthroughs for this...
Sitecore v6.3 and previous: link
Sitecore v6.4: link
Make sure that you select the core database (bottom right of Sitecore desktop) so that you can see the /sitecore/system/Settings/Html Editor Profiles area.
In my article here the first step of wiring up an event to a button is in javascript. From there you can insert text or tags. You can also get the selected text and wrap it in tags. You don't need to compile anything I was just showing how you would if you needed to, but you can entirely cut that piece out and just use the editor to send whatever text you want back to the wysiwyg editor.