Declined
Last Updated: 14 Jun 2016 07:46 by ADMIN
ADMIN
Ianko
Created on: 31 May 2016 05:39
Category: Editor
Type: Bug Report
0
FontSize tool does not apply changes when font-size inline style is applied in FF and IE
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>
1 comment
ADMIN
Ianko
Posted on: 14 Jun 2016 07:46
Behind the FontSize tool stands a browser command that cannot be modified in order fit this scenario. 

The HTML output of this scenario is expected and normal when the FontSize tool is used. 

In case the HTML inserted utilizes font-size CSS property as inline style, the RealFontSize tool is recommended to be used.