RadEditor issues when using the Chrome browser

5 posts, 0 answers
  1. Andrey
    Andrey avatar
    1 posts
    Member since:
    Nov 2014

    Posted 18 Nov 2014 Link to this post

    Hi, 

    I'm trying to apply a CSS class to the <p> tag using the "Apply CSS Class".
    In the latest version of Chrome the RADEditor adds a new <span> tag around text instead than adding the CSS class to the <p> tag.
    Example:  <p><span class="someClass">Text</span></p>

    The Firefox correctly handles applying a CSS class to an element selected via the DOM Inspector.
    Example:  <p class="someClass">Text</p>

    Best regards,
    Andrey
  2. Ianko
    Admin
    Ianko avatar
    1535 posts

    Posted 21 Nov 2014 Link to this post

    Hello Andrey,

    The Apply Css Class tool is designed to work only with a text selection, i.e., to add the class, text should be selected. If selection does not exist and empty span with the class is inserted.

    Additionally, this command (among with some other) entirely relies on native browser commands, and the final HTML result from this is controlled by the browser. Due to that the exact behavior cannot be controlled by the RadEditor, and thus cannot be changed.

    On a side note, testing with this demo on my end the results are the opposite to the ones described. Under Firefox, on element selected a span is added, but in Chrome the p tag gets with class name.

    Optionally, as a custom solution, you can alter the behavior of this command with the use of custom JavaScript logic handled in the OnClientCommandExecuting event.

    Regards,
    Ianko
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. L.Karthik
    L.Karthik avatar
    2 posts
    Member since:
    Oct 2015

    Posted 15 Oct 2015 Link to this post

    Hi,

    In the latest version of RadEditor, in chrome

    While using the bullet lists, 

    When I add a couple of bullets and tab for the third one, it still persists with the top level list and does not create a sub list. 

    This feature works fine in IE. and firefox does not support tabs at all.

    Steps to reproduce,

    1. Select bullet list

    2. Add a couple of rows.

    3. press tab on the third row.

    Expectation:

    Should create a sub list.

    Result:

    Creates a span of white space.

     PFA the image. 

    The editor to the left is IE and the one to the right is chrome.

    If you see the html section.

    IE generates a sub li element . But Chrome generates a span on tab

    Karthik

  5. L.Karthik
    L.Karthik avatar
    2 posts
    Member since:
    Oct 2015

    Posted 15 Oct 2015 in reply to L.Karthik Link to this post

    Hey,

    Is there a fix for this, or a workaround. 

     

    Karthik

  6. Ianko
    Admin
    Ianko avatar
    1535 posts

    Posted 15 Oct 2015 Link to this post

    Hi,

    You can check out the solution showcased here—http://docs.telerik.com/devtools/aspnet-ajax/controls/editor/accessibility-and-internationalization/keyboard-support/tab-key-behavior

    <telerik:RadEditor runat="server" OnClientLoad="OnClientLoad" />
     
    <script>
        function OnClientLoad(editor, args) {
            var shortcutManager = editor.get_shortCutManager();
            if (shortcutManager.findShortCutByName("InsertTabMozilla")) {
                shortcutManager.removeShortCut("InsertTabMozilla");
                editor.addShortCut("InsertTab", "TAB");
            }
        }
    </script>


    Regards,
    Ianko
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017