We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 20413
    • 2,877 Posts
    Get rid of the forced <p></p> TMCE adds! smiley
    As @Sharkbait points out above.
      @hawproductions | http://mrhaw.com/

      Infograph: MODX Advanced Install in 7 steps:
      http://forums.modx.com/thread/96954/infograph-modx-advanced-install-in-7-steps

      Recap: Portland, OR (PDX) MODX CMS Meetup, Oct 6, 2015. US Bancorp Tower
      http://mrhaw.com/modx_portland_oregon_pdx_modx_cms_meetup_oct_2015_us_bancorp_tower
      • 21088
      • 85 Posts
      Ohh yeah they are really annoying! smiley
        • 30524
        • 22 Posts
        Hey!

        Awesome Snippet!!

        Unfortunately, my template gets always wrapped with a pre-tag and a div-tag.

        my Chunk looks like that:

        <div class="content-box">
           <h5>Title </h5>
           <p>
              Text
           </p>
        </div>
        


        Does anyone has a similar problem and/or maybe a solution?

          • 3046
          • 48 Posts
          thank you, help better then wiki
            • 25260
            • 156 Posts
            Quote from: Web2thepeople at Feb 19, 2010, 12:15 PM

            I have tried to follow your guide but there aren’t any files I can browse when I click on the TinyMCE template button.

            I’m also experiencing this problem, did you solve it?
              • 25260
              • 156 Posts
              has anyone adapted the solutions for tinymce templates to be compatible with the new tinymce version shipped with the 1.0.3 installation?

              just to know, if anyone did it I can save time, otherwise I’ll do it.
                • 17247
                • 5 Posts
                Does this method work with TinyMCE and Revolution rc1?

                Where do I put In the TinyMCE plugin custom parameters field add: template_external_list_url: "/templates.js" In Rev?

                Or maybe there is a different method for adding the custom button in Rev that someone can explain?

                Any help would be very much appreciated thanks.
                  • 29525
                  • 388 Posts
                  Quote from: Roberto at Apr 07, 2010, 04:05 AM

                  has anyone adapted the solutions for tinymce templates to be compatible with the new tinymce version shipped with the 1.0.3 installation?

                  just to know, if anyone did it I can save time, otherwise I’ll do it.

                  I’m struggling with this as well. I have this working on an older version of modx/TinyMCE, but the instructions I’ve found don’t seem to line up with the current versions.

                  Here’s what I’ve done so far.

                  Using TinyMCE shipped with MODx 1.0.3

                  Tools --> Configuration
                  Theme: Custom
                  Custom Plugins: template
                  Custom Buttons: template

                  Resrouces -->Plugins-->Tiny MCI-->Configuration Tab-->Custom Parameters:
                  template_external_list_url: "/templates.js",
                  forced_root_block : false,

                  I don’t know where to put the list of templates in tinymce.functions.php. It looks like that file has change quite a bit from the instructions I’ve found here in the forums.

                  Where does this go? Is this the right code?

                  $tinymceInit .= "		  template_templates : [
                  		{ title : \"Template 1\", src : \"assets/templates/Template 1.html\", description : \"Template 1\" },
                  		{ title : \"Template 2\", src : \"assets/templates/Template 2.html\", description : \"Template 2\" },      ]".",\n";	


                  I’d appreciate any help.

                  Thank you!
                    www.terrybarthdesign.com
                    • 29525
                    • 388 Posts
                    I’ve spent a few hours trying to sort this out. I’m missing something here.

                    I still can’t get a list of templates to appear in the pull down.

                    If I’m understanding this correctly, this custom parameter points to the list and location of the template files. Yes?
                    template_external_list_url: "/templates/templates.js"


                    So I’ve created a templates.js file that contains this:
                    // JavaScript Document
                    var tinyMCETemplateList = [
                    	// Name, URL, Description
                    	["Simple snippet", "templates/snippet1.htm", "Simple HTML snippet."],
                    	["Layout", "templates/layout1.htm", "HTML Layout."]
                    ];


                    And I’ve put this file in:
                    /public_html/assets/plugins/tinymce/js

                    And the snippet1.htm file is in:
                    /public_html/assets/plugins/tinymce/templates


                    Still no list in the pull down.

                    Any thoughts?
                      www.terrybarthdesign.com
                      • 13585
                      • 7 Posts
                      Quote from: Roberto at Apr 07, 2010, 04:05 AM

                      has anyone adapted the solutions for tinymce templates to be compatible with the new tinymce version shipped with the 1.0.3 installation?

                      just to know, if anyone did it I can save time, otherwise I’ll do it.

                      First time for me using tinymce templates, and .. huh Dunno if my solution got anything to do with topic here, but my problem was "url" variable in

                      /assets/plugins/tinymce/jscripts/tiny_mce/plugins/template/js/template.js

                      I guess its a bug in tinymce, cos "url" does not get anything from this line:
                      var url = tinyMCEPopup.getParam("template_external_list_url");

                      No matter what was replaced with template_external_list_url

                      ..so i had to do this:

                      After this line:
                      var url = tinyMCEPopup.getParam("template_external_list_url");


                      i had to add couple lines:

                      tempUrl = "http://www.domain.com/assets/plugins/tinymce/jscripts/tiny_mce/plugins/template/";
                      url = tempUrl + "js/template_list.js";


                      and template_list.js looks like this:
                      var tinyMCETemplateList = [
                      	// Name, URL, Description
                      	["Simple snippet", tempUrl + "templates/snippet1.htm", "Simple HTML snippet."],
                      	["Layout", tempUrl + "templates/layout1.htm", "HTML Layout."]
                      ];


                      (my tinymce templates are in "assets/plugins/tinymce/jscripts/tiny_mce/plugins/template/templates")