Completed
Last Updated: 18 Sep 2015 09:39 by Khushboo
ADMIN
Ianko
Created on: 26 Aug 2015 08:03
Category: UI for ASP.NET AJAX
Type: Bug Report
2
Cannot unlink anchor with a class name
When adding a link with a class name, the Unlink command cannot remove the formatting. 

Temporary solution is to clear anchor's classes programmatically via the ApplyClass command:

<telerik:RadEditor runat="server" ID="RadEditor1" OnClientCommandExecuting="OnClientCommandExecuting">
    <Content>
        <a href="http://www.telerik.com" class="my-class">link</a>
    </Content>
</telerik:RadEditor>

<script type="text/javascript">
    function OnClientCommandExecuting(sender, args) {
        var command = args.get_commandName && args.get_commandName();

        if (command === "Unlink") {
            var myArgs = new Telerik.Web.UI.EditorCommandEventArgs("ApplyClass", null, "");
            sender.fire("ApplyClass", myArgs);
        }
    }
</script>
2 comments
Khushboo
Posted on: 02 Sep 2015 07:03
Hello,

Any update on this ?

Thanks,
Khushboo
Siddhi
Posted on: 27 Aug 2015 14:36
Hello,

This fix only works in the below scenario in FF:
1. Select text
2. From Hyperlink manager give class and link to the text
3. Now click the Unlink button without loosing the selection

If the selection on the text is lost and we again select it and click on Unlick command nothing happens. 

Can you please check this?

Thanks,
Siddhi Kabra