Tuesday, June 4, 2013

Fix problem with $0 symbols in multiline text when use Telerik RadEditor for Sharepoint in Chrome

In this post I would like to share the solution which I found for the problem of Telerik RadEditor for Sharepoint some time ago: when you use it in Chrome (e.g. when you add or edit list item with rich html field, or add content for the publishing page) with multiline text, e.g.:

line1
line2

After saving the item or even after switching to html view and back to design view, your text will be transformed to something like this:

line1$0line2$0

I.e. new line characters are replaced with $0 combination. In order to fix it go to \web server extensions\wpresources\RadEditorSharePoint\{RadEditor_Version}\RadControls\Editor and edit ListConfigFile.xml and ConfigFile.xml: add the following property:

   1: <property name="EnableHtmlIndentation">False</property>

This property enables or disables IndentHTMLContentFilter, which, according to the Telerik documentation, “This filter indents the HTML content so it is more readable when you view the code”. I.e. side effect will be that resulting html will have more tags, comparing with the case when this filter is used. But if you need to fix this problem for users which use Chrome, I think it is reasonable price. Hope that this tip will be helpful for you.

2 comments:

  1. Have you contacted Telerik about this? They are usually pretty quick with providing fixes and workarounds for problems. Your workaround looks good, but maybe Telerik will give a better solution or even an extension for RadEditor to make it work better in SharePoint together with Chrome.

    ReplyDelete
  2. hi moontear,
    don't remember to be true,

    ReplyDelete