This question is locked. New answers and comments are not allowed.
Hello,
I need RTL LTR buttons in editor.
I did simple insertHtml of "p" element.
Is there better way to do it?
I need RTL LTR buttons in editor.
I did simple insertHtml of "p" element.
Is there better way to do it?
Html.Telerik().EditorFor(model => model) .Tools(tools => tools .Custom(settings => settings.HtmlAttributes(new { @class = "t-rtl", onclick = "textRTL()" })) .Custom(settings => settings.HtmlAttributes(new { @class = "t-ltr", onclick = "textLTR()" })) ) .Render();}function textRTL() { var editor = $('#editor').data("tEditor"); editor.exec('insertHtml', {value:'<p dir="rtl">rtl text here</p>'}); editor.update();}function textLTR() { var editor = $('#editor').data("tEditor"); editor.exec('insertHtml', {value:'<p dir="rtl">rtl text here</p>'}); editor.update();}