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

Inline spell check leaving behind style tags of highlighted words

3 Answers 96 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Shonda
Top achievements
Rank 1
Shonda asked on 06 Jun 2012, 06:45 PM
I had a user report some "funny" text coming form the system.  I looked into it and the text is coming from the RadEditor on the screen. The editor is used like a textbox so I am not taking the HTML and placing it into the system just the text only.

It appears that when the user select the inline spell check option and leaves it "turned on" (not selecting cancel or finish) with words still highlighted and submits the page the data coming over contains HTML markup that is creating the yellow highlight on misspelled words. Below is an example of the output I am receiving.

<span class="RadEWrongWord" id="RadESpellError_0">Ths</span> is a test of the <span class="RadEWrongWord" id="RadESpellError_1">spel</span> checker in <span class="RadEWrongWord" id="RadESpellError_2">IE9</span>

 I have only been able to replicate this if I am using IE9. I have tested with IE9, IE8, Chrome19, and FF13.

3 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 07 Jun 2012, 12:18 PM
Hello,

Please, provide more information so that I can get a better overview over your scenario. How exactly do you obtain the content? Do you use the Content property of RadEditor or the editor.get_html(true) client-side method?

If you experience this issue, you can cancel the spellchecker before obtaining the content using the code in the following forum thread: http://www.telerik.com/community/forums/aspnet-ajax/editor/ajaxspellcheck-in-radeditor.aspx.

Kind regards,
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.
0
Shonda
Top achievements
Rank 1
answered on 07 Jun 2012, 07:03 PM
I am using the Content property server side.

Here is my editor:
<telerik:RadEditor runat="server" ID="txtNoteEntryForm" ToolsFile="~/EditorToolsFile/ToolsFile2.xml" ToolsWidth="300px" ToolbarMode="ShowOnFocus"
    EditModes="Design" StripFormattingOptions="AllExceptNewLines" />


0
Rumen
Telerik team
answered on 12 Jun 2012, 08:01 AM
Hello,

I tried to reproduce the reported problem in the Save In Database demo, but without success. As you can see in the video http://screencast.com/t/nn73ZwxeiCbB the content is saved via the Content property with the SpellCheck specific tags. Are you able to replicate the issue in the live demo?

My suggestion is to also test your scenario with the latest Q2 2012 build of RadControls for ASP.NET AJAX. IF the problem still persists, try the solution below:

<telerik:RadEditor ID="RadEditor1" runat="server" OnClientSubmit="OnClientSubmit"></telerik:RadEditor>
<script type="text/javascript">
    function OnClientSubmit(editor) {
        var spell = editor.get_ajaxSpellCheck();
        spell.cancelSpellCheck();
    }
</script>
<asp:Button ID="Button1" Text="text" runat="server" />


Greetings,
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
Shonda
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Shonda
Top achievements
Rank 1
Share this question
or