RadEditor produces invalid HTML when nesting lists in IE11 and IE10. The validation error is: UL element cannot be nested within element UL Setting invalid content into RadEditor leads to unexpected behavior such as content getting lost in certain situations.
You will see that the text-indent inline styles are stripped down and the indentation is missing.
Using the desktop MS Word, pasting is fine. Using the Online version, the HTML gets messed up with plenty of unneeded DOM attributes and additional elements. It would be best if pasting provides a cleaner HTML as it is when pasting form the desktop MS Word.
A possible workaround is to set the import step after all other rules in the CssFile of the RadEditor. CssFile would look like: .h1 { background-color: Aqua; } .div { color: Green; } @import url(StyleSheet.css);
Currently, this command switches from Design to HTML mode and vise versa when EditType="Inline". In Normal editing mode this tool is disabled in the HTML mode and cannot be used, although it is useful and provides yet another layout option for the default look of the RadEditor. You can test the additional layout option by running this example: <telerik:RadEditor runat="server" ID="RadEditor1" EditModes="Design" OnClientModeChange="OnClientModeChange"> <Tools> <telerik:EditorToolGroup> <telerik:EditorTool Name="Bold" /> <telerik:EditorTool Name="ToggleEditMode" /> </telerik:EditorToolGroup> </Tools> </telerik:RadEditor> <script type="text/javascript"> function OnClientModeChange(sender, args) { setTimeout(function () { sender.get_toolAdapter().getToolByName("ToggleEditMode").set_enabled(true); },0) } </script> This tool can be redesigned to be available in the HTML mode in all cases not only when Inline editing mode is enabled.
Hi Team,
Does Track Changes work if Multiple Users work Simultaneously on Editor and
Is it possible to view all Users Name and Date Time in different pane, after enabling Track Changes.
Using sitefinity we get a lot of admins getting "Enter happy" and generating obnoxious amounts of <p> tags or empty divs, or something... I'd love a filter such that when they save it'd go through and clean up (remove) the empty crap content. <p>some text</p> <-- FINE <p></p> <-- GONE <p><br/></p> <-- GONE <p>Final bit of text</p> <-- FINE ...etc
setSize() is not applying dimensions properly to the content area. RadEditor is resized correctly but the content area isn't. Once resize RadEditor manually through its resize handle, the content area becomes resized properly.
When hyperlinks are inserted into the content of RadEditor in preview mode there are additional attributes , which are retrieved by the get_html() method. If the MaxHtmlLength is set and the content is close to the limit on switching to preview mode breaks the normal behavior of the editor. The validator alerts that the length is exceeded, because of the additional attributes and the client is not able to open any other mode.
RadEditor uses a RadWindow for its dialogs so when the global rendering of RadCocntrols on the page is set to Lightweight the dialogs need to be consistent. There could be implemented a property to control the RenderMode of the dialogs themselves.
Ability for the RadEditor's validator dialog to validate HTML 5 markup inside it's content
This problem causes the handles of the widget to be rendered at an incorrect position. The resizable widget should dispose or repaint itself, when the image is being dragged around the content. Possible workaround is to reselect the element on the dragend event of the editor's content. You can follow this example setup: <telerik:RadEditor runat="server" ID="RadEditor1" OnClientLoad="OnClientLoad"> </telerik:RadEditor> <script type="text/javascript"> function OnClientLoad(editor, args) { editor.attachEventHandler("ondragend", function (e) { var selElm = editor.getSelectedElement(); if (selElm && selElm.tagName && selElm.tagName === "IMG") { editor.selectElement(selElm); } }); } </script>
Hi,
when using the StripCssExpressions Content Filter, it's working as expected in most cases, but when there's a linebreak inside of the style it breaks.
For example, the content filters used in a RadEditor control would be:<telerik:RadEditor ContentFilters="RemoveScripts,StripCssExpressions,StripDomEventAttributes" />
<span style="width: expression((document.body.offsetWidth / 4 + 30) + 'px'); background-color: green;">text in a span</span>
<span style="width:
expression((document.body.offsetWidth / 4 + 30) + 'px'); background-color: green;">text in a span</span>
The usage for the content filter is to prevent XSS attacks, and in our solution used besides several other means to avoid malicious code execution.
As expected, the filter not working is a security risk.
Does anyone have a good workaround available? (or is there a timeline on an official bugfix?)
Repro steps: - use the editor below and the attached Word document in the archive at the end - copy the document content in the editor - clean the word formatting - select some of the content (e.g., one paragraph) - click the format stripper dropdown and choose Strip Span Elements - run get_html(true) in the console Expected: spans are stripped only from the selected content Actual: nothing is stripped. Changing to HTML mode and back to Design fixes this, so you should not use that to check the HTML <telerik:RadEditor RenderMode="Lightweight" runat="server" ID="RadEditor1"> <Tools> <telerik:EditorToolGroup> <telerik:EditorTool Name="FormatStripper" /> </telerik:EditorToolGroup> </Tools> </telerik:RadEditor> WORKAROUNDS: For the majority of cases you can set up automatic stripping of span elements when pasting from Word, so your users do not need to do that themselves. Here is an example: <telerik:RadEditor RenderMode="Lightweight" runat="server" ID="RadEditor1" StripFormattingOptions="ConvertWordLists, MSWordNoMargins, Span"> <Tools> <telerik:EditorToolGroup> <telerik:EditorTool Name="FormatStripper" /> </telerik:EditorToolGroup> </Tools> </telerik:RadEditor> You can read more on how stripping MS Word content works in the following demo, and play around with the various options to see what works best for your case: http://demos.telerik.com/aspnet-ajax/editor/examples/cleaningwordformatting/defaultcs.aspx and in the following documentation article: https://docs.telerik.com/devtools/aspnet-ajax/controls/editor/managing-content/pasting-content/clean-ms-word-formatting There are also two possible code workarounds so advanced users can retain more control over the HTML without switching to the HTML mode themselves. The second is likely to be a tad faster with large content, but the first is likely to produce better user experience. 1) this changes the mode to HTML and back to design with each paste so that the stripping tool can work with the selection <telerik:RadEditor RenderMode="Lightweight" runat="server" ID="RadEditor1" OnClientCommandExecuted="OnClientCommandExecuted"> <Tools> <telerik:EditorToolGroup> <telerik:EditorTool Name="FormatStripper" /> </telerik:EditorToolGroup> </Tools> </telerik:RadEditor> <script> function OnClientCommandExecuted(sender, args) { if (args.get_commandName() == "Paste") { sender.set_mode(2); setTimeout(function () { sender.set_mode(1); }, 50); } } </script> 2) this one is a workaround that allows the stripping tool to work without mode change, but it will not operate with the selection but with all the content <telerik:RadEditor RenderMode="Lightweight" runat="server" ID="RadEditor1" OnClientCommandExecuting="OnClientCommandExecuting"> <Tools> <telerik:EditorToolGroup> <telerik:EditorTool Name="FormatStripper" /> </telerik:EditorToolGroup> </Tools> </telerik:RadEditor> <script> function OnClientCommandExecuting(sender, args) { if (args.get_commandName() == "StripSpan") { sender.set_html(sender.get_html(true)); } } </script>
If you select the whole table along with some content and click BOLD, all table related tags will get wrapped by a <strong> tag. For instance tfoot, thead and so on will be wrapped with <strong>. Initial content: <table style="width: 0px;"> <colgroup><col /><col /><col /></colgroup> <thead> <tr> <th>test</th> <th>test</th> <th>test</th> </tr> </thead> <tbody> <tr> <th>test</th> <th>test</th> <td>test</td> </tr> <tr> <th>test</th> <th>test</th> <td>test</td> </tr> </tbody> </table> <br /> test line beneath the table Modified content: <table style="width: 0px;"> <strong><colgroup><col /><col /><col /></colgroup></strong> <thead> <tr> <th><strong>test</strong></th> <th><strong>test</strong></th> <th><strong>test</strong></th> </tr> </thead> <tbody> <tr> <th><strong>test</strong></th> <th><strong>test</strong></th> <td><strong>test</strong></td> </tr> <tr> <th><strong>test</strong></th> <th><strong>test</strong></th> <td><strong>test</strong></td> </tr> </tbody> </table> <strong> <br /> test line beneath the table</strong> Video reproduction in Chrome: https://www.screencast.com/t/lH3LJLKjmXb
When adding formatting to texts while selecting whole elements, some elements are not included in `isBlockElement` function such as <col> or <colgroup> in a way those elements get wrapped in formatting tags such as <strong> How to Reproduce: Create a table in editor ```html <span>Outside text</span> <table> <colgroup> <col></col> </colgroup> <tbody> <tr> <td>Inside text</td> </tr> </tbody> </table> ``` Select the inside text and outsite text in editor and click for applyng BOLD for instance. colgroup tag gets wrapped in <strong> tags. Some of html5 tags are missing from the isblockelement check as well such as 'article', 'aside', 'audio', 'canvas', 'details', 'figcaption', 'figure', 'footer', 'header', 'hgroup', 'nav', 'output', 'section', 'video'