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

Unexpected alert with editor with content from word

3 Answers 128 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Nilanjan
Top achievements
Rank 1
Nilanjan asked on 06 May 2009, 12:37 PM
I have a page with rad editor. The content of the editor is collected on post back and persisted in database.
Now I copy a very large and formatted document (including tables, font colors, etc.) from MS-Word. On pasting it in rad editor, an alert prompts to remove word formatting. On accepting the prompt the content is pasted in the editor. Now on clicking a button, an alert comes with the following message:-  "Error while executing filter XHTML - [object error]"

Please advice what invokes this alert and it can be avoided. I am viweing in IE 6.

3 Answers, 1 is accepted

Sort by
0
Lini
Telerik team
answered on 07 May 2009, 12:08 PM
Hello,

You can prevent the alert popup by adding the following code in your page:

protected void Page_Load(object sender, EventArgs e) 
    RadEditor1.DisableFilter(EditorFilters.ConvertToXhtml); 

This will disable the XHTML filter and the content will be saved in the database.

If you want to use the editor with the XHTML filter, please open a formal support ticket and send us a copy of the Word document you use as source. We will use it to reproduce the problem and provide you with a fix. MS Word does not always generate valid HTML content, which breaks the editor XHTML filter used to output compliant XHTML code.


Regards,
Lini
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Nilanjan
Top achievements
Rank 1
answered on 07 May 2009, 01:28 PM
Hi, thanks for the solution. Pls let me know if there are any error, exception, unexpected behaviour on the part of the editor, on applying this tweak, because the editor might still be dealing with invalid HTML from MS-Word.

Also is there any equivalent attributed that can be applied at the time of editor element definition in the aspx page, instead of calling the function in the code behind.
0
Rumen
Telerik team
answered on 11 May 2009, 02:31 PM
Hello Nilanjan,

Could you please open a support ticket and send a sample word document along with steps how to reproduce the problem using the demo examples of RadEditor?

Once I am able to reproduce it I will try to provide an appropriate solution for this problem.

Yes, you can disable the ConvertToXhtml content filter inline in the RadEditor's declaration by specifying only the content filters that you want in the ContentFilters property.

Sincerely yours,
Rumen
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Editor
Asked by
Nilanjan
Top achievements
Rank 1
Answers by
Lini
Telerik team
Nilanjan
Top achievements
Rank 1
Rumen
Telerik team
Share this question
or