We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 37059
    • 368 Posts
    Constructing a blog with MODx, I want to have the capability for users to easily add an image with a caption in WYSIWYG view. Seems like the best way to do this is with TinyMCE templates, only I can’t figure out how to implement one in Revolution. This thread describes what I want to do, but for Evolution.

    I’d also like to know how you handle adding image captions through TinyMCE on your own sites.

    Thanks!
      Jason
      • 12241
      • 80 Posts
      Goto: System Settings -> tinymce (in the drop down list to the left of the search input)

      Property Name: Template List
      Key:tiny.template_list

      Enter comma separated list of your templates, in this format: (Template Name:/the/template/file/path/mytemplate.html:The template desciption, )
      Example:
      Big List:assets/templates/rte/div_box_h3_list.html:Box with bullet list, List 5:assets/templates/rte/list_ordered_5cubes.html:Five step ordered list with next link


      If you make a template for TinyMCE make sure you also have tinymce pulling in your css styles, located under the "Rich-Text Editor (5)" area (in the 2nd drop down list to the left of the search input)
      you’ll see the ’editor_css_path’ setting to select a css file to load while using tinymce. (to see the template styles while in the editor)

      If my image is part of the page layout then I use a template variable for the image and a second template variable for the caption.

      If my client is going to add images to their content then I use the TinyMCE templates.

      OH yeah, don’t forget to enable the template plugin as well as the template button in TinyMCE . Just put the word ’template’ in with the plugins and with the buttons (doesn’t matter where) and it should show up so that you can select your templates.

      *update:
      on my localhost this works... now that the site is all setup on remote server this no longer works, the template list is blank. In case yours does the same.
        Environment:
        modx: rev 2.0.8-pl
        localhost: Apache/2.0.63 (Unix) PHP/5.2.11 DAV/2, MySQL client version: 5.1.37
        • 37059
        • 368 Posts
        Quote from: Hlight at Mar 10, 2011, 02:02 AM

        In case yours does the same.

        Regrettably, it does :’(

        Thanks for taking the time to share this information, though.

        If nobody has anything add, I’m filing a bug.

        huh
          Jason
          • 37059
          • 368 Posts
          Okay, I’ve added a bug here. Hopefully this gets some attention; I really need templates to work :’( (but even if it doesn’t, MODx is the best CMS I’ve used and the devs deserve a big thanks! wink )
            Jason
            • 37059
            • 368 Posts
            Looks like that wasn’t the right place to file the bug, huh? embarrassed

            I’ve re-filed over at Github per instructions.
              Jason
              • 12241
              • 80 Posts
              Updated: funny thing about this issue/bug... I swear it wasn’t working, then I came back the next morning and it was working! So check it again, just in case:)
                Environment:
                modx: rev 2.0.8-pl
                localhost: Apache/2.0.63 (Unix) PHP/5.2.11 DAV/2, MySQL client version: 5.1.37
                • 37059
                • 368 Posts
                In my dreams embarrassed - thanks, it’s still not working.
                  Jason
                  • 12241
                  • 80 Posts
                  Any luck? I wonder if it’s a cache thing? Or possibly a permissions thing?
                    Environment:
                    modx: rev 2.0.8-pl
                    localhost: Apache/2.0.63 (Unix) PHP/5.2.11 DAV/2, MySQL client version: 5.1.37
                    • 37059
                    • 368 Posts
                    I haven’t even worked with it since my last post. I believe I did try clearing cache several time. I’m thinking it’s a bug and waiting (im)patiently for a solution....
                      Jason
                      • 36470
                      • 12 Posts
                      It seems related to the PHP accelerator that is in use. When I turned APC off everything went ok.
                      http://tracker.modx.com/issues/6695