We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 37059
    • 368 Posts
    I have a minor but vexing gripe about the MODx manager and its relationship with It’s All Text (which I of course realize is its own project and outside the pervue of the MODx team). The cause of this issue goes a bit deeper and I think it might be worth an improvement request if others agree.

    When I open a resource for editing, take it directly to It’s All Text, make changes and return to save them in MODx, the Save button is disabled. Why? MODx apparently doesn’t realize that the text has changed. I have to do something silly like deleting a letter and adding it back before the Manager will let me save.

    Unless there’s some profound programming reason why this won’t work, I think you ought to be able to save a resource anytime you want, even if you haven’t changed anything at all.

    ???
      Jason
      • 3749
      • 24,544 Posts
      It’s a tough call. Having the Save button disabled tells you that you haven’t modified anything (and makes it possible to warn users that they are leaving a page without saving it).

      Since It’s All Text is outside of MODx, MODx has no easy way of telling that the field has been modified since no keypress events have occurred inside MODx. I’m not sure how the dirty flag is currently set, so it might be possible to detect it, but that would waste resources for everyone you doesn’t use It’s All Text.

      You could certainly file it as a feature request.

      Or, better yet, you could develop a first-class code editor plugin for MODx. wink

      BTW, have you tried CodeMirror?
        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
        • 37059
        • 368 Posts
        Quote from: BobRay at Dec 10, 2010, 05:16 PM


        BTW, have you tried CodeMirror?


        CodeMirror is getting there, but as far as I know you still can’t use it to edit resources, only elements. Additionally, its indenting behavior is unpredictable and results in very ugly code, at least for me.

        Not ragging on the developer at all, that’s just how I feel about it in its current state. smiley
          Jason
          • 3749
          • 24,544 Posts
          There are some options here http://codemirror.net/manual.html, although I don’t see much on controlling the style of the code formatting.

          You’re right about it not working on Resources, however, and I stopped using it when it inserted phantom parentheses in the code that caused a PHP error but didn’t appear in the editor (though I could see them in the cache).
            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
            • 37059
            • 368 Posts
            Good link to have anyway - thanks.
              Jason
              • 33337
              • 3,975 Posts
              You can use CTRL+ALT+S shortcut to save the doc. (works on Windows)

              Not a solution, but .... tongue
                Zaigham R - MODX Professional | Skype | Email | Twitter

                Digging the interwebs for #MODX gems and bringing it to you. modx.link
                • 37059
                • 368 Posts
                Quote from: zi at Dec 10, 2010, 05:42 PM

                You can use CTRL+ALT+S shortcut to save the doc. (works on Windows)

                Not a solution, but .... tongue

                Maybe I’m missing something, but that sure looks like a solution to me. You have made my day, zi! This not only resolves the issue about which I originally posted, it fixes another annoyance I didn’t mention - the lack of a keyboard shortcut to save.

                You’re my hero! grin
                  Jason
                  • 4971
                  • 964 Posts
                  Yes, thank Zi, I use to do a space-backspace routine to solve the problem...
                  but this is much better!
                    Website: www.mercologia.com
                    MODX Revo Tutorials:  www.modxperience.com

                    MODX Professional Partner
                    • 33337
                    • 3,975 Posts
                    Glad it helped! cool

                    Thanks to Shaun for putting them in.
                      Zaigham R - MODX Professional | Skype | Email | Twitter

                      Digging the interwebs for #MODX gems and bringing it to you. modx.link