3 ms·
Can this do code-collapse? I'd love to plugin the Ace editor like a textarea and replace almost all of the JS at https://zetabee.com/text https://zetabee.com/te
by chime 16y ago
Can this do code-collapse? I'd love to plugin the Ace editor like a textarea and replace almost all of the JS at https://zetabee.com/text https://zetabee.com/text - I see that it supports hidden characters so maybe there is a way to hide entire chunks of text (while preserving them during cut-copy-paste). Has anyone worked with Ace? I tried customizing SkyWriter but it was more work than just rolling my own JS.
The demo source https://github.com/ajaxorg/ace/blob/master/demo/startup.js https://github.com/ajaxorg/ace/blob/master/demo/startup.js is pretty clean but it doesn't appear if there is a way to extend the editor's features via plugins.
- sharms 16y agoFrom the article, wrt extending: "Along the way, we repackaged the plugin system as “pilot” and the command line, which has become even smoother to use, is in its own package called “cockpit“. You can use just these components in your own projects if you want to make them extensible or keyboard-friendly."
- chime 16y agoThanks. I dug in and looks like it's still a non-JS system: https://github.com/mozilla/cockpit https://github.com/mozilla/cockpit - I was hoping there'd be something like a jQuery.fn.plugin system to hook on to the Ace editor and override specific things.
- dangoor 16y agoIt's definitely all JS. There are hooks to plug in specific things, but not any arbitrary behavior. code folding is a nice feature though, and one I'd expect we'll see along the way. code folding requires some work though, because it changes how line positions are computed.