We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
  • Sadly my tiny.editor_theme is already set to advanced.
      Lucy Iannotti
      Following Sea design & development
      http://www.following-sea.com
      New Bedford, MA
      • 17548
      • 74 Posts
      Hmm.

      Other things I changed in the tinymce settings, maybe one of these (or some combination) did it:

      Element Format tiny.element_format = xhtml
      Forced Root Block tiny.forced_root_block = null
      Editor Theme tiny.editor_theme = advanced
      Template List tiny.template_list = 2-Col:assets/tintemplates/2-column.html:2 Column Template
      Template Selected Content Classes = tiny.template_selected_content_classes = .bioText

        • 46367
        • 2 Posts
        Had the same issue using TinyMCE 4.3.3, Revo 2.2.10-pl. Found that template content is stripped when it contains HTML attribute class.

        For example, my template contained:
        <ol class="steps">
            <li>Step1</li>
            <li>Step2</li>
        </ol>
        


        As usual - it showed up in preview, but after clicking Insert button everything was gone. Nothing really was inserted.

        After removing class atribute, my template looked like this:
        <ol>
            <li>Step1</li>
            <li>Step2</li>
        </ol>
        


        This was working fine. But didn't satisfied my needs. I desperately needed a template with class attribute.

        Found a solution. You need to provide some class name for this setting: tiny.template_selected_content_classes
        It's empty by default and that's why template content is stripped. When you enter some CSS class name (I used fake one), everything works great again. So my setting looked like this:
        tiny.template_selected_content_classes  .fakeCssClass
        


        Important! Dot (.) before class name is the key. When using class name like this: fakeCssClass (without dot in front), nothing worked.

        Hope this helps!
          • 43957
          • 79 Posts
          Hi, I thought I would post this here as it's the closest thread I could find to a problem I'm experiencing with Templates and TinyMCE.

          I've succefully created a template and updated the settings for TinyMCE on my MODX 2.2.8pl site. I'm using Newspublisher in the front end to create and update resources.

          Everything is fine when I use my admistrator account to test and the templates appear in the drop down list, however I have an number of other users who have different permissions and they're not able to see the template options. This is the error message if I look at Chrome debug:

          Failed to load resource: the server responded with a status of 401 (Not Authorized)http://www.mywebsite.com/assets/components/tinymce/template.list.php


          I thought this was a permissions issue, so I updated the user to Adminstrator and flushed permissions to log in again, but still not able to see the Templates, even with Admins priveleges. Perhaps I'm missing something with permissions? I still find it tricky configuring users. I'm really stuck trying to figure this one out, so if anyone has any suggestions that would be cool.

          Edit: Something I've just considered is that my other users are HybridAuth users, so have the Class haUser instead of modUser. This is the only difference I can find at the moment, but still can't fix it. [ed. note: dave-b last edited this post 9 years, 10 months ago.]
            • 49814
            • 23 Posts
            though I struggleed myself through tinyMCE templates with evo http://forums.modx.com/thread/96108/tinymce-init-doesn-039-t-run#dis-post-522931, my experience with chrome issues and tinyMCE might apply as well for you. I use classes, and everything is ok. Only chrome messes up tinyMCE sometimes...
            Have you tried other browsers?
              • 39437
              • 13 Posts
              @keidzi Tahnk you verry much! This was the correct answer:
              Found a solution. You need to provide some class name for this setting: tiny.template_selected_content_classes

              For everyone who is wondering how he could have the Content of his Template be inserted into the editor window, please read comment #13
              https://forums.modx.com/thread/76466/tinymce-template-plugin?page=2#dis-post-488076

              I am glad someone found this solution!
              What the "tiny.template_selected_content_classes" are really good for I could not find out.
                MODX Rocks I am so glad that I have found it.
                • 36604
                • 268 Posts
                Quote from: panther at Jun 27, 2016, 11:32 AM
                @keidzi Tahnk you verry much! This was the correct answer:
                Found a solution. You need to provide some class name for this setting: tiny.template_selected_content_classes

                For everyone who is wondering how he could have the Content of his Template be inserted into the editor window, please read comment #13
                https://forums.modx.com/thread/76466/tinymce-template-plugin?page=2#dis-post-488076

                I am glad someone found this solution!
                What the "tiny.template_selected_content_classes" are really good for I could not find out.

                hmm.

                Adding a .css class is known, one css class for each Tmce template you need. But this never worked for me. never.
                  • 42562
                  • 1,145 Posts
                  All this is unnecessary rigmarole!

                  https://www.tinymce.com/docs/plugins/template/
                  The official TinyMCE accomplishes this with a few added words to your existing setup
                  tinymce.init({
                    selector: "textarea",  // change this value according to your HTML
                    plugins: "template",
                    menubar: "insert",
                    toolbar: "template"
                    templates: [
                      {title: 'Some title 1', description: 'Some desc 1', content: 'My content'},
                      {title: 'Some title 2', description: 'Some desc 2', url: 'development.html'}
                    ]
                  });
                  Your friend: http://modx.com/extras/package/tinymcewrapper
                    TinymceWrapper: Complete back/frontend content solution.
                    Harden your MODX site by passwording your three main folders: core, manager, connectors and renaming your assets (thank me later!)
                    5 ways to sniff / hack your own sites; even with renamed/hidden folders, burst them all up, to see how secure you are not.
                    • 36604
                    • 268 Posts
                    Hi

                    Just gave a try to your component.

                    Unfortunately, I was not able to see anything working out of the box.

                    As I test over an existing installation with classic TinyMCE and code mirror. the best I got once deactivated codemiror and tinyMCe was a nes old shool rte menu bar for the description field of a content.
                    and no more RTE for main content.
                    once I reactivated tinyMCE.... same thing.

                    I had to reverse, uninstalling TinymceWrapper

                      • 42562
                      • 1,145 Posts
                      It is uncertain what you installed and tested, and the environment wherein you did all this... but I can assure you that your result was highly unusual.
                      TinymceWrapper: http://modx.com/extras/package/tinymcewrapper
                      Support thread: http://forums.modx.com/thread/97694/support-comments-for-tinymcewrapper

                      P.S
                      There is no such thing as "Classic TinyMCE" wink
                        TinymceWrapper: Complete back/frontend content solution.
                        Harden your MODX site by passwording your three main folders: core, manager, connectors and renaming your assets (thank me later!)
                        5 ways to sniff / hack your own sites; even with renamed/hidden folders, burst them all up, to see how secure you are not.