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

Linkmanager Stripping Tags

3 Answers 30 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Paul Herzberg
Top achievements
Rank 1
Paul Herzberg asked on 23 Sep 2013, 02:58 PM
Hello,

If, in the Editor, you select some text and then open the Linkmanager and then if you add tags to the text, bold so that "test" becomes "<b>test</b>" for example, when you click on "OK" these tags are removed.

This means, for the company I work for, that an icon added previously is no longer added to the link. That is, this snippet no longer works:

var resultLink = this._clientParameters.get_value();
if (document.getElementById("dateiIcon").value != "") {
	resultLink.innerHTML = document.getElementById("dateiIcon").value + this._linkText.value;
}

I believe this behaviour has been introduced in a recent dll (we are now using 2013.2.717.40).


Thank you

Paul Herzberg

3 Answers, 1 is accepted

Sort by
0
Ianko
Telerik team
answered on 26 Sep 2013, 10:34 AM
Hello Paul,

I can verify that the described behavior of the link manager is changed in the current version of RadControls.

I can assure you that the changes are made to fix bugs, although I will raise the reported issue to the attention of our developers.

Currently I cannot provide a firm answer from where the issue originates and how could it be resolved. I will investigate this issue further with the developer team and I will contact you later in this support thread with the found results.

Thank you in advance for your patience.

Regards,
Ianko
Telerik
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 the blog feed now.
0
Accepted
Ianko
Telerik team
answered on 22 Oct 2013, 10:43 AM
Hello Paul,

Thank you for your patience.

I can verify that the described issue is due to changes of the Insert Link functionality. Currently I cannot suggest rolling back to the old behavior neither a proper workaround that would work as expected.

I recommend using the OnClientDomChange event and modify the link from the arguments in the method's overload. You could follow this example setup for your project:
<telerik:RadEditor runat="server" ID="RadEditor1" OnClientDomChange="OnClientDomChange">
</telerik:RadEditor>
 
<script type="text/javascript">
    function OnClientDomChange(editor, args) {
        var commandName = args.get_commandName();
        var value = args.get_value();
 
        if (commandName == "LinkManager") {
            var link = value;
            var linkText = link.innerHTML;
            link.innerHTML = "<strong>" + linkText + "</strong>";
        }
    }
</script>


Regards,
Ianko
Telerik
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 the blog feed now.
0
Paul Herzberg
Top achievements
Rank 1
answered on 22 Oct 2013, 10:46 AM
Thank you for this, I will give it a try and let you know how I get on.

Paul
Tags
Editor
Asked by
Paul Herzberg
Top achievements
Rank 1
Answers by
Ianko
Telerik team
Paul Herzberg
Top achievements
Rank 1
Share this question
or