danyaPostfactum / modx-ace

ACE editor integration into MODx
24 stars 23 forks source link

Custom TV input type for ACE editor #6

Open bertoost opened 12 years ago

bertoost commented 12 years ago

Should be cool to have a custom ACE input TV option. With this option you've being able to create a "code" TV field for resources. This is useful to developers (using resource-groups to hide that field for clients ;-) hehe).

adamwintle commented 10 years ago

This is a good idea and something I was just looking for. Does anyone know if this happened or if there's a way to do this yet?

danyaPostfactum commented 10 years ago

@adamwintle there is a proposed patch (https://github.com/danyaPostfactum/modx-ace/pull/9). Can you explain please why do you need such kind of tv? You can use a plain textarea tv.

adamwintle commented 10 years ago

For some of my templates I've got a headerExtra and a footerExtra TV (which is hidden from client's like Bert mentioned) so we can add some extra code to a page's header or footer if needed (for a Google Map or a gallery, etc)

It would be very useful if these could use the Ace code editor with the tabbing, code highlighting plus other features. Just using a plain textarea isn't so useful for code editing.

danyaPostfactum commented 10 years ago

Thanks. I'll take into consideration. By the way, if you don't use WYSIWYG (but your clients can always use it), you can create use_editor user setting and set to false and every rte tv will turn into an ace editable area.

pixelchutes commented 10 years ago

:+1:

Did not know about the RTE TV conversion > Ace with use_editor disabled. Is there anyway to make it apply to textarea input TVs, too?

Just thinking about the use case where a Rich Text editor is preferred for formatted, text input only, but then other TVs used for handling extra code (HTML/CSS/JavaScript) at the Resource level, where Ace makes perfect sense...syntax highlighting FTW!

nong-monogon commented 9 years ago

Any update on this? Want to use Ace on TV text area

matdave commented 8 years ago

+1... 00,000

sonicpunk commented 8 years ago

crickets It would be great if someone posted a solution to this!

evd commented 8 years ago

You can use plugin https://github.com/danyaPostfactum/modx-ace/pull/9#issuecomment-76466239

sonicpunk commented 8 years ago

Thanks for the Link!