Copied to clipboard

Flag this post as spam?

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


  • Judasegg 3 posts 73 karma points
    Aug 19, 2015 @ 10:15
    Judasegg
    0

    Adding formats to tinymce without touching umbraco backoffice

    Hey,

    I'm fairly new to umbraco, but i'm looking for a way to add formats (p, h1, etc) to the TinyMCE editor without creating styles in the umbraco backoffice and linking them to the Rich Text Editor.

    The reason for this, is that I would like to make the changes in code, so a specific config file could be uploaded to production environment to enable the formats as part of a release.

    I'm using Umbraco 7.2.2, and TinyMCE 3. My investigations brought me as far as the tinyMceConfig.config file, that you can add options to the customConfig section, but they don't seem to work. I've tried touching the web.config, restarting app pool, diff browser, etc.

    Here is my custom config section, notice that I've added advanced and umbraco as there seemed to be conflicting info on which to use. Also I've put a semi-colon at the front of the styles:

     <customConfig>
            <!--    <config key="myKey">mySetting</config>-->
          <config key="theme_advanced_blockformats">p,div,h1,h3</config>
          <config key="theme_advanced_styles">;Header 1=h1</config>
          <config key="theme_umbraco_blockformats">p,div,h1,h3</config>
          <config key="theme_umbraco_styles">;Header 1=h1</config>
            <config key="entity_encoding">raw</config>
          <config key="codemirror">
            {
            "indentOnInit": false,
            "path": "../../../../../umbraco_client/CodeMirror/Js",
            "config": {
            },
            "jsFiles": [
            ],
            "cssFiles": [
            ]
            }
          </config>
    
        </customConfig>
    

    Unfortunately this doesn't appear to do anything, despite documentation which suggests this is an alternative (code-centric) way of adding formats.

    Any ideas? When googling, it seems other people had this issue, but they accepted the solution of doing it from Umbraco backoffice which is what I'm trying to avoid.

Please Sign in or register to post replies

Write your reply to:

Draft