Linkmanager Stripping Tags

4 posts, 1 answers
  1. Paul Herzberg
    Paul Herzberg avatar
    20 posts
    Member since:
    Jun 2010

    Posted 23 Sep 2013 Link to this post

    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
  2. Ianko
    Admin
    Ianko avatar
    1535 posts

    Posted 26 Sep 2013 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Answer
    Ianko
    Admin
    Ianko avatar
    1535 posts

    Posted 22 Oct 2013 Link to this post

    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.
  5. Paul Herzberg
    Paul Herzberg avatar
    20 posts
    Member since:
    Jun 2010

    Posted 22 Oct 2013 Link to this post

    Thank you for this, I will give it a try and let you know how I get on.

    Paul
Back to Top