We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 39194
    • 149 Posts
    Indeed. Thanks smiley
      • 1061
      • 81 Posts
      Hi danya_postfactum.
      Could U provide a feature for dynamic height in editor field?
      Full screen is useful but controlling height in place is more useful.
      For example then U edit element or resource U press combination Ctrl+0 and voila height is increased by 20% or something.
      The second thought that is setting, for Ace, in system settings - default height.
      Different users have different height resolution from 1200 to 768px.
      And for each user U can set height that is useful for him.

      [ed. note: alex_dutch last edited this post 10 years, 1 month ago.]
        • 46808
        • 2 Posts
        Howdy danya,

        Can we change the font in resources and elements to something else, like a monospace courier new or something? I found where to change the size in the Ace settings, but not the base font.

        Thanks!
        -- dunnamin
          • 39194
          • 149 Posts
          dunnamin, good idea. I'll think. For now you can create a modx plugin, that add <style> tag with @font-face (if needed) rule and such a rule:
          .ace_editor{
               font-family: 'Your Font', monospace;
          }


          Ace supports fixed-width fonts only.
            • 46808
            • 2 Posts
            Quote from: danya_postfactum at Mar 12, 2014, 08:52 AM
            dunnamin, good idea. I'll think. For now you can create a modx plugin, that add <style> tag with @font-face (if needed) rule and such a rule:
            .ace_editor{
                 font-family: 'Your Font', monospace;
            }

            Ace supports fixed-width fonts only.</style>

            Thanks, danya! I am thrilled with the way Ace works in ModX with your plugin. Thanks for adapting it and providing it to us smiley.
              • 45778
              • 75 Posts
              I can't seem to get word wrap to work on Ace. I'm using 1.4.3. I changed the word wrap setting in the system settings to Yes, but it's still not wrapping.
                • 45778
                • 75 Posts
                Hmm. Apparently the problem was with the way that AjaxManager interacted with Ace, because as soon as I turned off AjaxManager, the settings took effect.
                  • 39194
                  • 149 Posts
                  paulbohman, you just need to reload tab (F5) after you changed a setting. Because AjaxManager does not track settings changes.
                  • Dude! Ace new code completion (Ctrl+Space) is the bomb!
                    I've been using it for like 10 seconds and its already imprescindible smiley
                    Thanks for such an awesome feature. This improves productivity even more.
                    Kudos!

                    Just an idea:
                    It will become very handy to place a little Quick Edit or Edit button to the right of the hints list to quickly open up modElements like chunks,snippets,etc. I feel like i will need less the left pane with this addition. I read somewhere modx 2.3 automcompletion will do this, but this concept is even better as you don't have to leave the area where you're coding to trigger. (nor using the mouse to go to the omnisearch)

                    This is awesome. [ed. note: lithiumlab last edited this post 10 years, 1 month ago.]
                    • Agree with lithiumlab, the code completion is all sorts of awesome!

                      On a separate note, I have been using CodeMirror for so long that a few of Ace's Key Bindings are constantly throwing me off. For example, jumping between words on a given line via Alt+Left/Right arrows. In Ace, this seems to jump between tags?

                      I found that by disabling the default "Ace" key binding and using "Custom", it restores this functionality (confirmed here: http://ace.c9.io/build/kitchen-sink.html)

                      Is there currently any way to change the "Key Binding" Ace uses within MODX?

                      Also, does anyone know if Ace supports a "Code Formatting" (e.g. beautify) feature, like CodeMirror? e.g. http://codemirror.net/2/demo/formatting.html

                      UPDATE:

                      Did a quick search, and see the following Beautify commit just over a month ago. Perhaps in the next release?

                      https://github.com/ajaxorg/ace/commit/180fa0c4cb12344e5f4c8155671f1227d3f166fb#diff-6f61d61329d4a4aac145ae8a9fb67520 [ed. note: pixelchutes last edited this post 10 years ago.]
                        Mike Reid - www.pixelchutes.com
                        MODx Ambassador / Contributor
                        [Module] MultiMedia Manager / [Module] SiteSearch / [Snippet] DocPassword / [Plugin] EditArea / We support FoxyCart
                        ________________________________
                        Where every pixel matters.