We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 23571
    • 223 Posts
    I am developing a site that draws the content for the<h1> and <h2> tags dynamically. I would like to remove the capability for my users to reuse these tags and I was wondering if anyone knows the best method/location for removal of the ’Heading 1’ and ’Heading 2’ from the Format dropdown in the TinyMCE plugin?
      • 25969
      • 118 Posts
      If you’re talking sIFR or similar, it’s prob a good idea to target more specifically what you want replaced. As an example, adding
      class="sifr"
      to any element you want replaced. But you are right, <h1> is usually already (semantically) covered so removing it as an option is a good idea, however I thought removing h1 from Resources > Manage Resources > Plugins > TinyMCE > Configuration > Block Formats would sort it but that doesn’t seem to work.
        • 30497
        • 245 Posts
        Quote from: pleth at Jul 01, 2008, 06:46 PM

        I am developing a site that draws the content for the<h1> and <h2> tags dynamically. I would like to remove the capability for my users to reuse these tags and I was wondering if anyone knows the best method/location for removal of the ’Heading 1’ and ’Heading 2’ from the Format dropdown in the TinyMCE plugin?

        that would be handy for me too, removing h4,5,6, and the div, etc. from the TinyMCE format dropdown menu. I have customized my style dropdown menus in TinyMCE, but not this one.
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          Check out the assets/plugins/tinymce/jscripts/tiny_mce/themes/advanced/editor.template.js. Do a search for h1, and you’ll find the whole list of formats in that select menu.

          Make sure you keep a copy of the original file just in case!
            Studying MODX in the desert - http://sottwell.com
            Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
            Join the Slack Community - http://modx.org
            • 12896
            • 12 Posts
            You can edit a comma-separated list of Block Formats at Resources -> Manage Resources -> Plugins -> TinyMCE -> Configuration.
              • 30497
              • 245 Posts
              Quote from: inertica at Jul 02, 2008, 03:11 AM

              You can edit a comma-separated list of Block Formats at Resources -> Manage Resources -> Plugins -> TinyMCE -> Configuration.

              brilliant, thanks.
                • 23571
                • 223 Posts
                inertica, thanks that did it.
                  • 24495
                  • 407 Posts
                  And also there you can restrict users in using (or using not) other buttons of TinyMCE e.g. "strikethrough" or "justifywhatever" and so on. Very helpful against "handicraft enthusiasts": I like indenting here, fuck off corporate design ... grin
                    • 20354
                    • 1 Posts
                    Hi all,

                    Does anyone know of a way to restrict or customize the format list in TINYMCE on a per instance basis? (ie, in tinyMCE.init function).

                    I’m building a CMS for multiple websites and so each has different requirements.

                    Thanks

                    Bob