We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 356
    • 31 Posts
    Sorry for such a silly question,

    I need to set up some users on my site in the way that prevent them from use html WYSIWYG editor at all. All they are permited is to plain-text edit the source of pages.

    I tried to set up html-type editor for them, but there is still a drop-down list under edit field that permit them to use another editor.

    How can I prevent that without re-writing admin panel template?

    MODx version is 1.0.4.
      • 26016
      • 561 Posts
      Not a silly question at all! 78% of users cannot handle WYSIWYG editing, as you have learned! smiley

      When you create a user, you can specify an editor, or "no editor". I’m always a super-admin, so I don’t honestly know if you can prevent a person from changing their editor preference if they’re a lesser security level. Maybe "Manager Manager" can help with that.

      You could also, I think, set the main admin config for "no editor", and then make your super-admin account have one, I think.

      Any of the above could be tried pretty easily, in any case.

      I hope that helps!
      Dave
        MODx and Wordpress development
        Linux, PHP 5.2, MySQL 5.0, Evo 1.05, Revo 2.08-pl, Firefox 4
        • 356
        • 31 Posts
        Dear Samba,

        thank you for the answer,
        but I’m already tried that, and user still have an option to choose WYSIWYG editor from drop-down list. In other words, setting editor to "no editor" just set up some default editor for the user, but won’t disable that user to choose something else at his will.

        Won’t work in my case. I need to allow users to plain-text-only editing, no HTML, no WYSIWYG-mess at all.

        Any ideas?

        Quote from: samba at Aug 31, 2010, 11:49 AM

        Not a silly question at all! 78% of users cannot handle WYSIWYG editing, as you have learned! smiley

        When you create a user, you can specify an editor, or "no editor". I’m always a super-admin, so I don’t honestly know if you can prevent a person from changing their editor preference if they’re a lesser security level. Maybe "Manager Manager" can help with that.

        You could also, I think, set the main admin config for "no editor", and then make your super-admin account have one, I think.

        Any of the above could be tried pretty easily, in any case.

        I hope that helps!
        Dave
          • 26016
          • 561 Posts
          Ah! I had forgotten that. Any ideas? Yes! Textpattern. (another system) They don’t even have WYSIWYG at all unless you add a plugin. The only caveat is that there are some proprietary tags for things.

          But in MODx, Why not just shut the WYSIWYG off altogether? If turning it off in the admin doesn’t work, you can certainly kill it by disabling the plugin. You’re obviously a good developer who doesn’t need any stinking WYSIWYG editor, right? wink

          Cheers, Dave
            MODx and Wordpress development
            Linux, PHP 5.2, MySQL 5.0, Evo 1.05, Revo 2.08-pl, Firefox 4
            • 356
            • 31 Posts
            Yes I can live without, but there are some people who still need that. Bad sad

            I use plain text content of some nodes to produce pretty looking pages, while some other nodes are to be edited in you-know-that-messy-html by some other people. Heh, that’s the life.

            The easy way to accomplish what I need is to edit up source of admin page where HTML editor is located, like

            if (can_use_html) {
            # include html editor and drop-down list of editors available
            } else {
            # include plain-text form and no drop down list at all
            }

            but like with any big project patching will void my future updates.
              • 3749
              • 24,544 Posts
              In MODx Revolution, you can set a user setting that disables the use of any RTE.
                Did I help you? Buy me a beer
                Get my Book: MODX:The Official Guide
                MODX info for everyone: http://bobsguides.com/modx.html
                My MODX Extras
                Bob's Guides is now hosted at A2 MODX Hosting
                • 356
                • 31 Posts
                Would love to migrate but can not afford, the site is up and running already.

                After all, Evo setting says I can set up editor that will be used by user, and in fact it only set default editor, so the control panel labels should be changed.
                  • 28042 ☆ A M B ☆
                  • 24,524 Posts
                  Edit the manager user. Open his User tab. Scroll down to the "Editor to use" select drop-down. Select "none". Save.

                  Edit the mm_rules chunk you are using (mm_demo_rules is installed by default). Add this line:
                  mm_hideFields('which_editor', '2');

                  The number should be the ID of the role of the users you don’t want to have the editor (you can find out which ID the role is in the Templates, TVs and Roles tab of the ManagerManager plugin).
                    Studying MODX in the desert - http://sottwell.com
                    Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                    Join the Slack Community - http://modx.org
                    • 356
                    • 31 Posts
                    Quote from: sottwell at Sep 08, 2010, 12:38 AM

                    Edit the manager user. Open his User tab. Scroll down to the "Editor to use" select drop-down. Select "none". Save.

                    Then I log out, log in as that user, try to edit a page, and under plaintext textarea there still is a drop down list with all the editors installed. So user can simple choose any of these, and the page’s code will be messed up.

                    Sorry, your solution won’t solve the problem.
                      • 28042 ☆ A M B ☆
                      • 24,524 Posts
                      Edit the mm_rules chunk you are using (mm_demo_rules is installed by default). Add this line:
                      Code:

                      mm_hideFields(’which_editor’, ’2’);

                      The number should be the ID of the role of the users you don’t want to have the editor (you can find out which ID the role is in the Templates, TVs and Roles tab of the ManagerManager plugin).
                        Studying MODX in the desert - http://sottwell.com
                        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                        Join the Slack Community - http://modx.org