The changes applied to a newly uploaded image through the ImageEditor are not taken into account when inserting the image in RadEditor. The issue is reproducible in all browsers. video: http://screencast.com/t/Uz4BAr9Lj
When copying text using the keyboard, the content is not copied. Instead is is marked as deleted and the selection is moved to the end of the selection.
The formatting of nested lists is lost when pasting from Word in IE10. The issue is reproducible also in IE8 and I9.
Currently the " entity is converted to a single quote under Chrome or Firefox, when ConvertToXhtml filter is enabled and the entity is placed in the value of an HTML attribute, for example href.
For example: If this is the HTML in the editor <p><span style="font-size: 11pt; font-family: 'Times New Roman';">Test Test Test<br /></p> selecting only a part of the element and clicking Strip Formatting will not remove formatting Another example: When in a list, individual items cannot be cleared of formatting, e.g.: <ul> <li><strong>bold</strong></li> <li><span style="text-decoration: underline;">underline</span></li> <li><em>italics</em></li> <li><strong><em><span style="text-decoration: underline;">bold underline italics</span></em></strong></li> <li><strong><em><span style="text-decoration: underline;">Underline, Bold, Italics</span></em></strong></li> <li><strong><em><span style="text-decoration: underline;">Italics, Bold Underline</span></em></strong></li> </ul> selecting (a part of) a li element and clicking Strip Formatting will not remove the formatting.
<telerik:RadEditor ID="RadEditor3" runat="server" EditModes="Design" OnClientLoad="OnClientLoad" RenderMode="Lightweight"> <Modules> <telerik:EditorModule Name="RadEditorStatistics" Visible="true" Enabled="true"/> </Modules> </telerik:RadEditor>
Possible option is to use the ToolsFile property from the code behind in order to configure a ToolsFile.xml file. RadEditor1.ToolsFile = "~/ToolsFile.xml";
The following code snippet can be used for modifying the inserted table by the dialog until this is implemented: <telerik:RadEditor ID="RadEditor1" runat="server"> </telerik:RadEditor> <script type="text/javascript"> var commandList = Telerik.Web.UI.Editor.CommandList; var replaceTable = commandList._replaceTable; commandList._replaceTable = function (table, editor, args) { var insertedTable = args.tableToModify; //The new table created by TableWizard dialog which will be inserted //Here the inserted table could be modified insertedTable.style.backgroundColor = "red"; var oldTable = table; // The table which will be replaced if exists replaceTable.call(this, table, editor, args); }; </script>
http://demos.telerik.com/aspnet-ajax/editor/examples/overview/defaultcs.aspx 1. Delete the content and type some text 2. Insert a horizontal rule 3. Once you click at the typed text you cannot go to the next line in IE, additional text cannot be inserted in FF, in Chrome when you try to type some text it is inserted at the first line
The paragraph is still displayed under the list element in IE8 for Windows XP when the following is performed: 1. The HTML below is placed in a RadEditor in HTML mode; <ul> <li>This is line 1</li> </ul> <p>This is line 2</p> 2. The editor is switched in Design mode; 3. The paragraph is incorrectly joined with the list element by placing the cursor at the start of the paragraph and pressing the Backspace key; The issue can be avoided by bringing back the old behavior of the RadEditor's commands as described in this help article: http://www.telerik.com/help/aspnet-ajax/editor-inline-and-block-commands-behavior-change.html.
http://localdemos.telerik.com/aspnet-ajax-fixes/editor/examples/trackchanges/defaultcs.aspx Paste some content in the Editor Expected: The pasted content is displayed and tracked Actual: Nothing is pasted Workaround: <telerik:RadEditor ID="RadEditor1" runat="server" EnableTrackChanges="true"> <Content> <p>test</p> <p>test</p> </Content> </telerik:RadEditor> <script type="text/javascript"> if (Telerik.Web.Browser.edge) { var editorPrototype = Telerik.Web.UI.RadEditor.prototype; var origKeydownHandler = editorPrototype._onKeyDown; editorPrototype._onKeyDown = function (ev) { var shortCut = this.get_shortCutManager().isShortCutHit(ev); if (!shortCut || shortCut.get_name() != "Paste") { origKeydownHandler.call(this, ev); } } } </script>
This is causing the whole page to scroll to the editor's position. The same behavior is occurred when a tool from the toolbar of the editor is used. Possible resolution is to change the ContentAreaMode to Iframe.
If a list is pasted into the editor's content. Its removal does not remove all the imported HTML content. Some SPAN elements are left intact. This is causing incorrect behavior for further text editing.
The Advanced Mode (embed code) textbox in the Insert External Video dialog is always readonly and you cannot put the code in it. In the meantime you can use the following workaround that will access the textbox and remove the readonly attribute: <telerik:RadEditor ID="RadEditor1" runat="server" OnClientCommandExecuted="OnClientCommandExecuted"> <Tools> <telerik:EditorToolGroup> <telerik:EditorTool Name="InsertExternalVideo" /> </telerik:EditorToolGroup> </Tools> </telerik:RadEditor> <script type="text/javascript"> function OnClientCommandExecuted(sender, args) { if (args.get_commandName() == "InsertExternalVideo") { var extVideoDialog = sender.get_dialogOpener()._dialogContainers["InsertExternalVideo"]; if(extVideoDialog){ extVideoDialog.add_pageLoad(editTextbox); } } } function editTextbox(sender, args) { sender.get_contentFrame().contentWindow.document.getElementById("embedCode").removeAttribute("readonly"); sender.remove_pageLoad(editTextbox); } </script>
Currently, the font family will not be passed to the Editor content. It's reproducible when loading tools from xml file. Possible workaround is to use ContentAreaCssFile to set such style or on the OnClientLoad event: <script> function OnClientLoad(sender, args) { sender.get_contentArea().style["font-family"] = "Arial, Verdana, Tahoma"; } </script>
When a Hyperlink element is set with an onclick handler, after passing through the Preview mode it is being stripped under IE7. Also related problem is that the link in the Preview mode are clickable and the URL set to the href attribute is opened in new tab/window. Possible solution for both bugs is to override the function responsible for the conversion of such attributes in the Preview mode with this JavaScript code: Telerik.Web.UI.Editor.Utils.setTargetsForPreview = function (editor) { var contentArea = editor.get_contentArea(); var links = contentArea.getElementsByTagName("A"); for (var i = 0, l = links.length; i < l; i++) { var link = links[i]; //handle targets var target = link.getAttribute("target"); if (target != null) { link.setAttribute("re_target", target); } if (target != "_blank") link.setAttribute("target", "blank"); //handle ckick event var oldOnClick = (link.getAttributeNode('onclick') && link.getAttributeNode('onclick').value) || link.getAttribute("onclick"); if (oldOnClick != null) { link.setAttribute('re_onclick', oldOnClick); } link.setAttribute('onclick', 'return false;'); if (typeof link.onclick === "string") { link.onclick = function () { return false; }; } } }; Telerik.Web.UI.Editor.Utils.restoreTargetsAfterPreview = function (editor) { var contentArea = editor.get_contentArea(); var links = contentArea.getElementsByTagName("A"); for (var i = 0, l = links.length; i < l; i++) { var link = links[i]; //handle targets var oldValue = link.getAttribute("re_target"); if (oldValue != null && oldValue != "null") { link.setAttribute("target", oldValue); } else { link.removeAttribute("target"); } //handle anchors urls var oldOnClick = link.getAttribute("re_onclick"); link.onclick = null; if (oldOnClick != null && oldOnClick != "null") { link.setAttribute('onclick', oldOnClick); } else { link.removeAttribute("onclick"); } link.removeAttribute("re_onclick"); link.removeAttribute("re_target"); } }; Note that this script must be placed in a script tag right after the RadEditor control.
This method should change the text and the tooltip of a desired tool. Currently this functionality does not work and the set value is not applied to the UI of the button. Possible workaround is using the following custom Client-side method, that changes both the button's text and its tooltip: function changeToolsText(editor, toolName, newToolText) { var tool = editor.getToolByName(toolName); var toolElement = tool.get_element(); var textElement = $telerik.getChildByClassName(toolElement, "reButton_text", 0); //Set the tooltip of the Anchor element toolElement.title = newToolText; //Set the text of the button textElement.innerHTML = newToolText; } This method accepts three overload arguments: 1. editor - the editor's Client-side object; 2. toolName - the name of the tool as string; 3. newToolText - the desired text as string; Example: function OnClientLoad(editor, args) { changeToolsText(editor, "CustomTool", "New text value"); }
Having multiple paragraphs that are formatted with color and font-size as inline styles, selecting them and applied font-size by using RealFontSize tool causes these issues: 1. Only first paragraph is properly decorated; 2. Second paragraph is stripped from any inline styles at all; 3. The next paragraphs stay without any changes applied. Possible workaround is to disable the ConvertFontToSpan filter: RadEditor1.DisableFilter(EditorFilters.ConvertFontToSpan);
Having a font/span tag with applied inline font-size style cannot be formatted by FontSize tool. This is a possible workaround that removes font-size inline style when size attribute is to be added: <telerik:RadEditor runat="server" ID="RadEditor1" OnClientCommandExecuting="OnClientCommandExecuting"> <Tools> <telerik:EditorToolGroup> <telerik:EditorTool Name="FontSize" /> </telerik:EditorToolGroup> </Tools> <Content> <p><span style="font-size:15px;">text</span></p> </Content> </telerik:RadEditor> <script> function OnClientCommandExecuting(editor, args) { var command = args.get_commandName(); if (command === "FontSize") { $telerik.$(editor.getSelectedElement()).css("font-size", ""); } } </script>