This is a migrated thread and some comments may be shown as answers.

RadEditor issues when using the Chrome browser

4 Answers 224 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Andrey
Top achievements
Rank 1
Andrey asked on 18 Nov 2014, 01:48 PM
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

4 Answers, 1 is accepted

Sort by
0
Ianko
Telerik team
answered on 21 Nov 2014, 09:12 AM
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.

 
0
L.Karthik
Top achievements
Rank 1
answered on 15 Oct 2015, 06:21 AM

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

0
L.Karthik
Top achievements
Rank 1
answered on 15 Oct 2015, 11:55 PM

Hey,

Is there a fix for this, or a workaround. 

 

Karthik

0
Ianko
Telerik team
answered on 16 Oct 2015, 04:57 AM
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
Tags
Editor
Asked by
Andrey
Top achievements
Rank 1
Answers by
Ianko
Telerik team
L.Karthik
Top achievements
Rank 1
Share this question
or