Question

I successfully change the font size selection of rich text editor of Sitecore by following the instruction.

What I need to do now is to add a font size 60px in the selection. How and where can I change that?

enter image description here

Was it helpful?

Solution

To add font size in richtext control of sitecore, I modify the toolsFile.xml

<root>
    <tools name="MainToolbar" enabled="true">
        <tool name="RealFontSize" />
    </tools>
    <realFontSizes> 
        <item value="8px"></item>
        <item value="9px"></item>
        <item value="10px"></item>
        <item value="11px"></item>
        <item value="12px"></item>
        <item value="13px"></item>
        <item value="14px"></item>
        <item value="16px"></item>
        <item value="18px"></item>
        <item value="20px"></item>
        <item value="22px"></item>
        <item value="24px"></item>
        <item value="26px"></item>
        <item value="28px"></item>       
        <item value="32px"></item>
        <item value="48px"></item>
        <item value="60px"></item>
        <item value="72px"></item>
        </realFontSizes>
</root>

OTHER TIPS

There is a Font Sizes folder within the RTE profile. For the Rich Text Full profile you mentioned, it would be under the following path:

/sitecore/system/Settings/Html Editor Profiles/Rich Text Full/Font Sizes

Here you can create new items for any additional sizes you want. These would be based on the template /sitecore/templates/System/Html Editor Profiles/Html Editor List Item.

If you want to make that list of real font sizes manageable within the core database, per profile, instead of "hardcoded" on the xml file, you must create your own custom EditorConfiguration class, inheriting from the one provided by sitecore and override the method SetupFontSizes as sitecore does not provide this functionality. This is a sample project to show how to do it.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top