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>
When creating links in RadEditor if the href attribute has square brackets, opening the hyperlink manager will appear like there is no url at all. If OK button is clicked the url disappears.
The default action for the Bold and Italic buttons ([B] and [I]) on the toolbar, is to insert the <strong> and <em> tags. However, this is not the same, and may insert the wrong semantic information. Bold and Italic are used in far more contexts than just emphasis. For example, many people use these functions to create headlines. (While not semantic, this is not incorrect because they choose to apply a styling.) Italic is also commonly used in quotes and references. None of these applications are correct with <strong> and <em> tags. Also, remember that <strong> and <em> only render as bold and italic in the default settings for the most common browsers. There are many browsers that don't/can't render these as bold and italic, and a website's stylesheet can also easily override the rendering of <strong> and <em>. This is not what the writer expects, as they have simply used the Bold and Italic buttons in the editor. Instead, the Bold and Italic buttons should insert style code, such as <span style="font-weight: bold"> and <span style="text-decoration: italic">. The Underline button is already doing this. If the preference is to use tags instead of inline style, then the <b> and <i> tags should be used instead. Please note that, even though these were deprecated in HTML4, they are now again valid for HTML5. If the goal is to produce semantic HTML, then the Bold and Italic buttons should be replaced with Emphasis and Strong buttons. I *know* the editor can be configured to do this. It is the default setting (which is used by 99% of your users) that is wrong. A similar situation was previous the case for the Indent button, which inserted the <blockquote> tag. Thankfully, this has been changed to insert the style="margin-left: 40px;" code instead. References: - https://www.nosegraze.com/difference-between-b-strong-html/ - https://web.archive.org/web/20091124170143/http://lists.evolt.org/archive/Week-of-Mon-20010521/032901.html - http://engineeredweb.com/blog/2013/html5-semantic-diff-bold-strong/ - http://stackoverflow.com/questions/4939807/strong-vs-font-weightbold-em-vs-font-styleitalic - https://developer.mozilla.org/en/docs/Web/HTML/Element/strong#Bold_vs._Strong - http://stackoverflow.com/questions/271743/whats-the-difference-between-b-and-strong-i-and-em - http://www.html5-tutorials.org/html-basics/i-b-em-strong-tags/ (This is not a new situation, many of the references are over 5 years old.)
I think RadEditor is starting to look like a good processor integration, however to make it really good it should support Shapes, Charts. The issue is that it does not support then now, but more that it strips them out of an existing document with then in it when loaded. I personally think this will make our customers mad if we can't have "true" docx loading etc. Love to see this Editor become the De-facto for developers and this is what it will take.
Telerik should provide the ability to dynamically create and edit the RadRibbonBar toolbar of RadEditor. Right now it is possible to create and edit the toolbar via the provided XML file.
When indenting list items in ordered list, the created nested list type remains the same.
We would like the image manager to be able to support: max-width min-width max-height min-height and produce output similar to: <img src="/randomlink.png" style="width : 100%; height : auto; max-width : 960px; min-width : 200px;" /> This way we can use the RadEditor to produce responsive content.
The problem could be described with the following behavior: · Cannot insert a link with the Link Manager; · If switched to HTML mode cannot return to Design mode, switching to Preview – allows Design mode. · A JavaScript error is thrown on focusing and on editing the content area. Possible fixes are: o Removing the Modernizr JavaScript file; o Setting the RadEditor with ContentAreaMode="Iframe" property;
When a user is trying to insert new text inside other's user not accepted change the cursor is automatically jumping in the end of the unaccepted change. Different expected behavior can be the change to break the current change.
Currently when pasting an ordered list from MS Word, the RadEditor’s lists converter does not take into account the list’s items numbering. The following list 5. Li1 6. Li2 will be converted to 1. Li1 2. Li2
Hi, is it possible for radeditor to put red line for mis spell words as you type, like MS word and Google docs. Regards, Syed
Steps to reproduce: 1. Go to http://demos.telerik.com/aspnet-ajax-beta/editor/examples/overview/defaultcs.aspx 2. Type some text 3. Format it as bold, italic and underline 4. Enter two new empty lines 5. Insert a table
When ContentAreaMode="Div" RadEditor's Content Area's width automatically re-sizes with the content. If width is applied to reContentArea div element, the problem is resolved. Actual behavior: by placing a long word or pasting an image larger than the content area's dimensions, its width is automatically expanded. (see ActualBehavior.png) Expected Behavior: the content area's width should remain unchanged despite word length and pasted image dimensions. (see ExpectedBehavior.png)
If a font table (i.e. default font, or the \fonttbl keyword) is missing from the RTF content that is being loaded in RadEditor, the control should not throw an error. If possible or needed, a font table section can be added if it is not already present in the content.
Similar to the RadComboBox' OnClientFocus event - http://www.telerik.com/help/aspnet-ajax/combobox-onclientfocus.html
The radeditor is quite a useful control. It just seems to lack some basic events that you would expect to seen from any input type control. The control is great for html translation, but if you are using it for user input it could us a few basics. Yes, there is a OnClientInlineEditCompleted event that works when you are in InlineEdit mode which is a good start, but InlinEdit mode is not good for all scenarios. Take for example when you have a survey with a "time from started" asp:timer. Each time the timer ticks and you are in InlineEdit mode the menu disappears even when the user is still actively using the radeditor. If we are in the same survey. We can also automatically save the information that was entered by the user if we have either or a on_change or lost_focus event that could be used. Obviously there are a bunch of menu interactions that could be cause the lost_focus or on_change event to occur, but those could be filtered by the user so they could be caught so you know that you are not actually leaving the radeditor. Thank you for your consideration.
In the Radeditor. Create a table with multiple rows, multiple columns optional. Add text in the first row. Add a bulleted list in the second row. Save the html and the bulleted list is rendered above the table. It looks like when you type in text and then convert it to a bulleted list it removed the <td> tag and replaces it with <ul><li></li></ul> which means it won't render in the table properly. I tested this with the demo radeditor as well and can duplicate every time.