Mathworks SharePoint Administrator
Top achievements
Rank 1
Mathworks SharePoint Administrator
asked on 06 Apr 2010, 05:09 PM
In a list with rich-text fields (radeditor for lists is enabled on the site) the rdeditor works fine except when a user creates custom tables. If they edit them and then save they are fine. If they come back and edit the item without touching the rich text fields the tables lose their formatting. Any thoughts? We are using 5.5.0.0.
4 Answers, 1 is accepted
0
Hi Mathworks,
Thank you for the provided information. I was able to reproduce the issue with the latest version of RadEditor for MOSS, which now is 5.7.1. I logged it in our bug tracking system.
The problem is that when the content is saved the first it is wrapped in a div element with class attribute set to something like ExternalClass31CC2194F4404ED2A3AE1DAAE53ACB03:
If you had the following css class defined in the content
The MOSS filters modify it and save the following content
The next time you save the list item it is wrapped in a div element with different class attribute value. For example:
This is why the previously defined
class will stop working.
In order to workaround this issue you can create a custom content filter, which will strip .ExternalClass31CC2194F4404ED2A3AE1DAAE53ACB03 class.
1. Modify the respective ListConfigFile.xml, which is located in the /Program Files/Common Files/Microsoft Shared/web server extensions/wpresources/RadEditorSharePoint/5.x.x.0__1f131a624888eeed/Resources/ folder. Add the following element:
2. Add the following javascript to the MOSSEditorTools.js, which is located in the mentioned above folder:
Kind regards,
Stanimir
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Thank you for the provided information. I was able to reproduce the issue with the latest version of RadEditor for MOSS, which now is 5.7.1. I logged it in our bug tracking system.
The problem is that when the content is saved the first it is wrapped in a div element with class attribute set to something like ExternalClass31CC2194F4404ED2A3AE1DAAE53ACB03:
<
div
class
=
ExternalClass31CC2194F4404ED2A3AE1DAAE53ACB03
>
.telerik-reTable
-1
{
border-bottom
:
0px
;
border-left
:
0px
;
border-collapse
:
collapse
;
font-family
:
Tahoma
;
border-top
:
0px
;
border-right
:
0px
;}
The MOSS filters modify it and save the following content
.ExternalClass
31
CC
2194
F
4404
ED
2
A
3
AE
1
DAAE
53
ACB
03
.telerik-reTable
-1
{
border-bottom
:
0px
;
border-left
:
0px
;
border-collapse
:
collapse
;
font-family
:
Tahoma
;
border-top
:
0px
;
border-right
:
0px
;}
The next time you save the list item it is wrapped in a div element with different class attribute value. For example:
<div class=ExternalClassBC
8
E
87
C
9
AB
8
F
483
BB
88071469
F
8
C
840
B>
This is why the previously defined
.ExternalClass
31
CC
2194
F
4404
ED
2
A
3
AE
1
DAAE
53
ACB
03
.telerik-reTable
-1
In order to workaround this issue you can create a custom content filter, which will strip .ExternalClass31CC2194F4404ED2A3AE1DAAE53ACB03 class.
1. Modify the respective ListConfigFile.xml, which is located in the /Program Files/Common Files/Microsoft Shared/web server extensions/wpresources/RadEditorSharePoint/5.x.x.0__1f131a624888eeed/Resources/ folder. Add the following element:
<
property
name
=
"OnClientLoad"
>OnClientLoad</
property
>
function
OnClientLoad(editor, args)
{
editor.get_filtersManager().add(
new
MyFilter());
}
MyFilter =
function
()
{
MyFilter.initializeBase(
this
);
this
.set_isDom(
false
);
this
.set_enabled(
true
);
this
.set_name(
"RadEditor filter"
);
this
.set_description(
"RadEditor filter description"
);
}
MyFilter.prototype =
{
getHtmlContent:
function
(content)
{
var
newContent = content;
//Make changes to the content and return it
newContent = newContent.replace(/\.ExternalClass[^ ]* /ig,
""
);
return
newContent;
}
}
MyFilter.registerClass(
'MyFilter'
, Telerik.Web.UI.Editor.Filter);
Kind regards,
Stanimir
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Mathworks SharePoint Administrator
Top achievements
Rank 1
answered on 07 Apr 2010, 04:40 PM
That seems to be working well for me. I will have the user test it and hopefully they are all set. Thanks for the response!
0
Muhamad Rizqi
Top achievements
Rank 1
answered on 11 Jun 2010, 06:36 PM
The solution work perfectly, but unfortunately the users must perform a hard-refresh (ctrl+F5) on their browser to reload the modified JS file. Is there a way to avoid this? Thank you.
0
Hi Muhamad Rizqi,
Unfortunately the files are stored in the browser's cache. So the user must either perform ctrl+F5 refresh or clean the cache manually.
All the best,
Stanimir
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Unfortunately the files are stored in the browser's cache. So the user must either perform ctrl+F5 refresh or clean the cache manually.
All the best,
Stanimir
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.