Japanese is broken in Subject field of Hyperlink Manager

1 Answer 57 Views
Editor
Akinori
Top achievements
Rank 1
Akinori asked on 30 Jan 2023, 10:09 AM
If I register Japanese characters to Subject field of the Hyperlink Manager and open it again, the characters will be broken.
Is there a way to display Japanese correctly?


For example:  ああああ

1 Answer, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 30 Jan 2023, 11:11 AM

Hi Akinori,

You can use the OnClientDomChange client-event to catch the inserted link in the editor and modify its subject query string:

<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 url = link.href;
            var subject = decodeURIComponent(url.split('?')[1].split('=')[1]);

            url = url.split('?')[0] + '?subject=' + subject;

            link.setAttribute("href", url);
        }
    }
</script>
<telerik:RadEditor runat="server" OnClientDomChange="OnClientDomChange" ID="RadEditor1"></telerik:RadEditor>

 

Regards,
Rumen
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
Editor
Asked by
Akinori
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Share this question
or