This is a migrated thread and some comments may be shown as answers.

Radeditor changing formatting/styles.

1 Answer 87 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Brad
Top achievements
Rank 1
Brad asked on 28 Mar 2012, 04:22 PM
In the application there is a editresults page where the radeditor is being used. The results data is copied from a word document and pasted into the radeditor. The data that is saved is show on a front end website and the styling was exact to what was on the editor. The application was originally built under telerik version under 2011.1.519.35. This year the application was updated to version 2012.1215.35. Now the data looks different. When I pasted the data from the word document into the editor the formatting seemed to be fine but when checking the data on the front end site it would appear the styling is different. As a test I copied the data that was formatted with the previous version of telerik and pasted into a word document saved it and copied that data into the radeditor and the styling still changes. Has the rad editor changed on how it would paste the data?

1 Answer, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 02 Apr 2012, 11:48 AM
Hello,

The only change that I am aware of is that RadEditor strips style="MARGIN: 0in 0in 0pt" attributes in the P tags. To avoid this behavior overwrite the following two functions and put them under the RadEditor's declaration:
Copy Code
<telerik:RadEditor runat="server" ContentFilters="None" ID="RadEditor1">
<Content><P style="MARGIN: 0in 0in 0pt">Some more new text<o:p></o:p></P></Content>
</telerik:RadEditor>
<script type="text/javascript">
Telerik.Web.UI.RadEditor.prototype._markExistingEmptyParagraphs = function(content) {
  return content;
}
Telerik.Web.UI.RadEditor.prototype._fixBrokenParagraphs = function(content) {
  return content;
}
</script>

You can also disable the OptimizeSpan filter as well as test by disabling other built-in content filters in the Built-in Content Filters demo.

If the problem still persists, please provide sample content and detailed steps with screenshots or video demonstrating how to reproduce the problem.

All the best,
Rumen
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Editor
Asked by
Brad
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Share this question
or