Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Kamilius 3 posts 53 karma points
    Nov 13, 2013 @ 15:36
    Kamilius
    0

    Custom fontsize_formats for "fontsizeselect" in tinyMCE

    Hi, guys.

    I have activated the next tinyMCE feature in my Umbraco project:

    <command>
        <umbracoAlias>mceFontSizeumbracoAlias>
        <icon>images/editor/fontSize.pngicon>
        <tinyMceCommand value="" userInterface="false" frontendCommand="fontsizeselect">fontsizeselecttinyMceCommand>
        <priority>16priority>
    command>

    How to configure "fontsize_formats" command for this now?

    I've tryed this:

    <customConfig>
        
        <config key="entity_encoding">rawconfig>
        <config key="spellchecker_rpc_url">GoogleSpellChecker.ashxconfig>
        <config key="fontsize_formats">8config>
      customConfig>

    and this:

    <config key="fontsize_formats">8ptconfig>
    <config key="fontsize_formats">"8pt"config>

    But none of them seem to work.

    Any clues on this one?

    Here's reference for actual tinyMCE configuration: http://www.tinymce.com/wiki.php/Configuration:fontsize_formats

     

  • Matthew Kirschner 323 posts 611 karma points
    May 20, 2015 @ 21:06
    Matthew Kirschner
    2

    This is an old post, but I figured I'd add what I found. I was able to get a font size dropdown, with custom font sizes, in our richtext editor by adding the below markup to /Config/tinyMceConfig.config .

        <command>
          <umbracoAlias>mceFontSize</umbracoAlias>
          <icon>images/editor/fontSize.png</icon>
          <tinyMceCommand value="" userInterface="false" frontendCommand="fontsizeselect">Font Size Select</tinyMceCommand>
          <priority>16</priority>
        </command>
    

    Note that the icon image is does not exist by default. You will have to it yourself to the /Umbraco/Images/Editor directory. This will only be shown when editing the you richtext editor datatype.

    To enable custom font sizes, add the line below to the <customConfig> element in the tinyMceConfig file:

    <config key="fontsize_formats">10px 12px 14px</config>
    

    Then simply enable the Font Size Select option in your richtext editor datatype.

    I'm still trying to figure out how to add custom sizes with labels that aren't tied to values. For example, I want editors to only see Small, Medium, and Large rather than 12px, 16px, and 20px. I'll reply here as soon as I figure that out.

  • Nick Hoang 51 posts 180 karma points c-trib
    Jan 21, 2022 @ 01:40
    Nick Hoang
    0

    In Umbraco 8 you can add this markup to /Config/tinyMceConfig.config

    <command alias="fontsizeselect" name="Font Size" mode="Selection" />
    

    And this line to <customConfig> element, this line defines list of font sizes

    <config key="fontsize_formats">10px 12px 14px 18px 24px 36px 72px</config>
    

    Cheers, Nick

Please Sign in or register to post replies

Write your reply to:

Draft