We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36516
    • 179 Posts
    Oh, is it all in the chunks that the plugin provides?

    [EDIT:] Seems I needed to clear the cache. I've managed to disable the editor for specific fields, like the plain text description, as well as change the tool set using the chunks provided. [ed. note: davidsmith last edited this post 10 years, 11 months ago.]
      • 42562
      • 1,145 Posts
      Hello Dave Smith, you have found those TinymceWrapper chunks eh, well it's all you are going to be needing.
      No silly System Setting under-sized boxes to be trying to force your code into.
      Anything that TinyMCE allows you do which includes what TinyMCE has by default and what JavaScript can do, is now open to you.

      link_class_list: [
        {title: 'None', value: ''},
        {title: 'prettyLink', value: 'prettyLink'},
        {title: 'colorBox', value: 'colorBox'}
      ],
      image_class_list: [
        {title: 'None', value: ''},
        {title: 'prettyPhoto', value: 'prettyPhoto'},
        {title: 'colorBox', value: 'colorBox'}
      ],


      If you want your users to really mess up your code with font sizes and all, here you go
      You can even generate the value of fontsize_formats with some sweet JS, it will be auto populated
      tinymce.init({
          selector: '...',
          toolbar: 'fontsizeselect',
          fontsize_formats: "8pt 10px 12% 14px 18px 24px 36px 100%"
      });

      http://stackoverflow.com/questions/28132337/getting-the-tinymce-4-font-sizes-drop-down-to-set-the-font-size-in-px-instead-of

      http://jsfiddle.net/g51nrhhf/

      Whatelse are you looking to accomplish? I read something about CSS something something, it was not clear to me.
      Cheers
        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.
        • 36516
        • 179 Posts
        Yes, it all makes good sense. I've been able to achieve everything I wanted, I think. A dropdown of custom classes to attach to any selected object might be nice, and I'm sure I can do it, but my initial attempts at using style_formats in TinyMCE RTE system settings didn't appear to work at all. I imagine with this plugin it'll actually behave, though.

        Regarding CSS, in the original TinyMCE (perhaps an older version of the core) there was a button that provoked a CSS popup with comprehensive control of inline styling, including text formatting, box model, borders, alignment, etc.

        Though I've managed to achieve the specific controls I think I need in this particular case, and may never really be able to justify exposing the complete CSS control set, I do wonder where that capability has gone.
          • 42562
          • 1,145 Posts
          If you find me a snapshot, I can attempt to replicate that feature.

          (some vagrant ideas)
          1. TinyMCE allows you to detect what element you are in.
          2. It allows you to run JS when you double click within an element

          With this in mind, you can create fancy dropdown menus (using tinymce.ui.Factory) on the fly, or activate/deactivate already created menus according to the element you are in.
          And since the 'this' variable is exposed to you, you can affect the particular element however you want, in this case.. addClass/removeClass

          All this is usually my first approach DIY!

          ... but alas TinyMCE has what you talking about, as you mentioned in, styles_formats
          Here is playground for you http://fiddle.tinymce.com/
            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.
            • 36516
            • 179 Posts
            If "snapshot" is Apple for "screenshot", check this one out. If not, you probably didn't need me to show you this at all!
              • 42562
              • 1,145 Posts
              That's what I needed, thanks.

              It seems it was killed in v4
              http://www.tinymce.com/forum/viewtopic.php?id=32820.

              A little jQuery and you should have your very own CSS picker
                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.
                • 36516
                • 179 Posts
                Thanks for that. Seems this plugin really does cover all the bases. A little more reading of the documentation and I should be able to get it to do almost anything I might need.

                Of the three TinyMCE Modx addons on the extras site this is the one I tried last, and only really because of the name. Oh, and possibly the description which for some reason prioritises the file browser integration and rather confuses the issue for people with simpler requirements. I haven't even thought about using an alterative file browser yet.

                I was happy to find TinyMCE RTE because it looked like a cleaner, more modern version of the default. After some reading it became clear it was different because of TinyMCE v4 or some such. But as you've mentioned, 'Wrapper is a superior implementation of the same and lets me achieve everything I set out to do.

                The name really does sell it short, though perhaps accurately.

                In any case, I hugely appreciate the time you've devoted to helping me with this.
                  • 42562
                  • 1,145 Posts
                  Ya wilcome!, I am glad to help.

                  The name really does sell it short, though perhaps accurately.
                  This most constructive comment must be attended to.
                  I reckoned there is one thing, and then there is another: the two, however being relatives, remain distinct entities.

                  TinymceWrapper has its MCE in lower case (a sort of respect) so that the plugin nor my intention behind it will never purport to be TinyMCE itself, in the slightest.
                  TinyMCE is a powerful piece of work, if not the most powerful. And it keeps getting better.
                  But if for some reason I should slack in maintenance, or design my MODx bridge in a way to ill-represent TinyMCE, I would be unjustly wronging reality a great deal.

                  So TinymceWrapper, not TinyMCE for MODx . In this way people should insult me or and TinymceWrapper but spare TinyMCE, of which, oftentimes, they know but a little.
                  Internet searches will reveal my scare. From Wordpress to Drupal. Users cursing TinyMCE.

                  Oh, and possibly the description which for some reason prioritises the file browser integration and rather confuses the issue for people with simpler requirements. I haven't even thought about using an alternative file browser yet.
                  A big issue was using TinyMCE in the frontend, and I was working on an ultimate (ultimate in my mind) frontend experience which is about to be released. So all of this must have influenced the description of the Extra.
                  Oh, and besides, variety has always been the soup of life. The native file browser will make you irreverent once you start doing some serious stuff frontend (or even backend).

                  In all, I will hate for the description to be daunting, or present the Extra as irrelevant to people with lighter requirements.

                  Cheers.
                  Thanks for feedback
                    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.
                    • 36516
                    • 179 Posts
                    I appreciate your position with regard to the naming of the extra.

                    On a different note, and at the risk of being really rather cheeky, and possibly even hijacking my own thread, I wonder if I could trouble you to bring your developer experience upon a completely unrelated Modx problem.

                    For years now I've perceived the lack of taxonomy/categorisation to be the single largest issue with Modx. The only thing that prevents it's use for blogging in as efficient a way as WordPress. A glaring omission that hasn't be properly solved until very recently.

                    Unfortunately the most promising solution, in the form of the extra Taxonomies by Everett Griffiths, seems to be in a state of disrepair and Everett might not have time to revisit it any time soon.

                    It would be great help to many, I believe, if someone with your experience could have a look at this thread, and see if anything can be done. The problem seems like something that should be very simple for someone with the right experience:

                    https://forums.modx.com/thread/95651/taxonomies-fatal-error

                    I won't hold you to it, though. You've been more than helpful already. This is my last great problem with Modx so it'd be great to put it to bed.
                      • 42562
                      • 1,145 Posts
                      Taxonomies, that beast is quite above my pay grade whether in using or developing one.
                      I remember using a client-side tagging system that had nothing to do with MODx, that saved my life. But I presume people want more granularity.

                      But as things are, I can stare at the problem in a different light. My rather poor developing skill has been the driving force in coming up with 'other than usual' solutions.
                      So, I'll place Taxonomy next on line. Let's see what happens. Time heals all my wounded ideas.
                      Cheers.
                        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.