Subscribe: RSS
  • 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
    • 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/

        If you wake up breathing, it's a good day...
      • 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.
        • :(
          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...

          • 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.
              If you wake up breathing, it's a good day...
            • 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
              • 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?
                  • @hawproductions | http://mrhaw.com/
                  • Quote from: mrhaw at Feb 12, 2009, 06:02 PM

                    http://modxcms.com/forums/index.php/topic,31097.msg188847.html#msg188847
                    Thanks!! grin