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

Disable Anchor Tag in RadEditor

3 Answers 122 Views
Editor
This is a migrated thread and some comments may be shown as answers.
nsrikanth 2009
Top achievements
Rank 1
nsrikanth 2009 asked on 29 Feb 2012, 01:36 PM
hi

if user enter any url like www.google.com  in Radeditor it is getting anchor tag in html view.how to disable this one.

Thanks and Regards
Srikanth
<telerik:RadEditor ID="txtMessage" runat="server" Height="200px" Width="470px" Skin="Office2007"
                                                                    DialogHandlerUrl="Telerik.Web.UI.DialogHandler.axd" TabIndex="3" OnClientLoad="OnClientLoad"
                                                                    ContentFilters="MakeUrlsAbsolute,FixEnclosingP,IECleanAnchors "  >
                                                                    <RealFontSizes>
                                                                        <telerik:EditorRealFontSize Value="1pt" />
                                                                        <telerik:EditorRealFontSize Value="2pt" />
                                                                        <telerik:EditorRealFontSize Value="3pt" />
                                                                        <telerik:EditorRealFontSize Value="4pt" />
                                                                        <telerik:EditorRealFontSize Value="5pt" />
                                                                        <telerik:EditorRealFontSize Value="6pt" />
                                                                        <telerik:EditorRealFontSize Value="7pt" />
                                                                        <telerik:EditorRealFontSize Value="8pt" />
                                                                        <telerik:EditorRealFontSize Value="9pt" />
                                                                        <telerik:EditorRealFontSize Value="10pt" />
                                                                        <telerik:EditorRealFontSize Value="11pt" />
                                                                        <telerik:EditorRealFontSize Value="12pt" />
                                                                        <telerik:EditorRealFontSize Value="13pt" />
                                                                    </RealFontSizes>
                                                                    <Tools>
                                                                        <telerik:EditorToolGroup>
                                                                            <telerik:EditorTool Name="FindAndReplace" />
                                                                            <telerik:EditorSeparator />
                                                                            <telerik:EditorTool Name="Undo" />
                                                                            <telerik:EditorTool Name="Redo" />
                                                                            <telerik:EditorSeparator />
                                                                            <telerik:EditorTool Name="Cut" />
                                                                            <telerik:EditorTool Name="Copy" />
                                                                            <telerik:EditorTool Name="Paste" />
                                                                        </telerik:EditorToolGroup>
                                                                        <telerik:EditorToolGroup>
                                                                            <telerik:EditorTool Name="Bold" />
                                                                            <telerik:EditorTool Name="Italic" />
                                                                            <telerik:EditorTool Name="Underline" />
                                                                            <telerik:EditorSeparator />
                                                                            <telerik:EditorTool Name="ForeColor" />
                                                                            <telerik:EditorTool Name="BackColor" />
                                                                            <telerik:EditorSeparator />
                                                                            <telerik:EditorTool Name="FontName" />
                                                                            <telerik:EditorTool Name="RealFontSize" />
                                                                        </telerik:EditorToolGroup>
                                                                    </Tools>
                                                                   
                                                                </telerik:RadEditor>

3 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 29 Feb 2012, 02:53 PM
Hello,

This IE browser feature could be disabled in IE9 only. You can do that using the following code:

Copy Code

<script type="text/javascript">
function OnClientLoad(editor) {
  editor.get_document().execCommand("AutoUrlDetect", false, false)
}
</script>
<telerik:RadEditor runat="server" ID="RadEditor" OnClientLoad="OnClientLoad"></telerik:RadEditor>

You can find more information about the AutoUrlDetect property of IE9 in the following MSDN blog:
http://blogs.msdn.com/b/ieinternals/archive/2010/09/15/ie9-beta-minor-change-list.aspx


Best 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
nsrikanth 2009
Top achievements
Rank 1
answered on 16 Mar 2012, 09:58 AM
hi

sorry for delay, it is not working 

Invalid argument js Error


Browser :IE8
OS:Windows 7
0
Rumen
Telerik team
answered on 20 Mar 2012, 02:25 PM
Hello,

As I already noted the solution is IE9 specific only and you should execute the
editor.get_document().execCommand("AutoUrlDetect", false, false)
function in IE9 only, e.g.

<script type="text/javascript">
    function OnClientLoad(editor) {
        if ($telerik.isIE9Mode) {
            editor.get_document().execCommand("AutoUrlDetect", false, false);
        }
    }
</script>
<telerik:RadEditor runat="server" ID="RadEditor" OnClientLoad="OnClientLoad"></telerik:RadEditor>


Best 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.
Tags
Editor
Asked by
nsrikanth 2009
Top achievements
Rank 1
Answers by
Rumen
Telerik team
nsrikanth 2009
Top achievements
Rank 1
Share this question
or