We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 17912
    • 4 Posts
    Hi

    Im trying to make the tinyMce’s template function to work, so i easily can add html formattede segments to my content pages on demand, like a div structure with dummy text the user then must be able to change.

    I’ve searched the forum and net for a solution but still no luck, the best sugestion i’ve got is this.
    http://modxcms.com/forums/index.php?topic=5403.345
    (search for template on the page)

    i’ve followed it carefully and tried million of things to make it work, but no result.

    another idea i read about is usine TV’s, but i can’t see how this should make it possible to past prebuild html code into my editor.

    so did anyone make it possible to pick a template from the tinyMce template dropdown ?

    Kind regards:
    Mads ny
      • 4041
      • 788 Posts
      My best advice would be to download the full tinymce package from their website. In that package is an examples folder, looks like the full featured example shows how to set it all up quite easily.

      http://tinymce.moxiecode.com/

        xforum
        http://frsbuilders.net (under construction) forum for evolution
        • 17912
        • 4 Posts
        Thanks Breezer, hey nice logo you got there smiley.

        I was thinking about the same, but i don’t know if it would work or break the tinyMce editor :/.
        I really don’t need to be able to edit the html template for the tinyMce, it’s okay it’s locatede af static html pages, a bonus in that direction would be that users can’t delete them and thereby mess up the design.

        I’ll try to overwrite the TinyMce and see if it works.
        More ideas are welcome.
          • 17912
          • 4 Posts
          :(
          Tried it but no effect, also tried to add some links to the php code of the tinyMce config, but no result.
          fixing this is way out of my league, pls. anyone help making the template’s in tinyMce usable sad...

            • 4041
            • 788 Posts
            Ok, heres how to get this set up: download the attached zip file and then follow the instructions below.

            This modification allows custom pre made templates to be used in your tinymce editor

            Unzip the package on your local comp, file structure should be as follows:

            -- tinymce_modx_templates
            * tinymce_templates_howto.txt

            the following folder structure matches the tinymce3101 in the plugins folder

            tinymce3101
            - tinymce.functions.php (modified and commented, so back up your original in case)
            * lists/ + files
            * templates/ + files
            * plugins/template/ (this folder may already be in there, I added it just in case)


            Upload the files in the tinymce3101 folder to your server keeping the same folder structure

            The following additions are only needed if you use the editor in custom mode
            Go into your manager/configuration/interface and features/
            at the end of the custom plugins field, add ,template
            at the end of the buttons2 line add ,template

            To add new templates, create your new template and save it in the templates/ folder.
            Modify the lists/template_list.js file so your new template is listed.

            There will be a Template icon available now on the bottom row of your tinymce editor.
              xforum
              http://frsbuilders.net (under construction) forum for evolution
              • 17912
              • 4 Posts
              Breezer you are the MAN...

              it workes perfect now smiley. finally i have the right tool for the job, it’s a shame modX don’t support page segments/elements so you can place x amount of "page blocks/segments" to the same page with diffrent templates, but then it’s nice we have tinyMce for that.

              hmm i should make a tutorial when i get that far. smiley
              Thanks again Breezer nice job.
              ///Mads ny
                • 29076
                • 615 Posts
                Is it possible to use this method for Image captions as well, from inside TinyMCE? Lets say, insert an image wright some text, mark it with a TinyMcs template via a button, and then a DIV is placed around the image with the text nicely placed under the image, inside the DIV?
                  I think, thererfor I am! But what I am, and why...?
                  • 20413
                  • 2,877 Posts
                    @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
                    • 29076
                    • 615 Posts
                    Quote from: mrhaw at Feb 13, 2009, 12:02 AM

                    http://modxcms.com/forums/index.php/topic,31097.msg188847.html#msg188847
                    Thanks!! grin
                      I think, thererfor I am! But what I am, and why...?