-
- 5 Posts
hi I have an issue when using Ace and Formit's utility snippet for radio buttons and checkboxes in a static/external file. For example this code works fine in a chunk(which is formit's official example:
<label>
Numbers:[[+fi.error.numbers]]
<select name="numbers" value="[[!+fi.numbers]]">
<option value="">Select an option...</option>
<option value="one" [[!+fi.numbers:FormItIsSelected=`one`]]>One</option>
<option value="two" [[!+fi.numbers:FormItIsSelected=`two`]]>Two</option>
<option value="three" [[!+fi.numbers:FormItIsSelected=`three`]]>Three</option>
</select>
</label>
But when I paste this same code into a static html file in my modx file panel this part of the syntax turns yellow and gives an error "Unexpected character in unquoted attributes":
[!+fi.numbers:FormItIsSelected=`one`]]
[!+fi.numbers:FormItIsSelected=`two`]]
[!+fi.numbers:FormItIsSelected=`three`]]
Is there any way I can get around this?
Thanks
-
- 167 Posts
Ace + CKEditor
I have enabled Ace for HTML/Source editing in resources
Modx setting > Editor to use > which_editor > Ace
But... it works only when "Rich Text" is unchecked
Is there a way to use ACE, resource side, with CKEditor / Source mode ?
[ed. note: johnxx last edited this post 9 years, 8 months ago.]
MODX lover
-
Développeur MODX / Webdesign / Solutions web
-
- 149 Posts
kevind_modx, This error is produced by HTML syntax checker. It's enabled for .html file extension and disabled for .tpl
johnxx, which_editor is ignored. You can set use_editor modx setting to false to get ace for resources. So, ace is used whenever RTE is not used. I should add this info into readme...
-
- 167 Posts
johnxx, which_editor is ignored. You can set use_editor modx setting to false to get ace for resources. So, ace is used whenever RTE is not used. I should add this info into readme...
Ideally I would prefer to enable/disable Ace by checking/unchecking "Rich Text" checkbox.
Your solution works fine. Thanks!
MODX lover
-
Développeur MODX / Webdesign / Solutions web
To use a Context Setting I had to hack the plugin at lines 85 and 105 to have it use
$modx->controller->context->getOption('use_editor')
instead of
$modx->getOption('use_editor')
However, I think this would break any User or Group setting.
-
- 98 Posts
Is there a way to use Ace for Template Variables? (Ultimately Text Areas, not Rich Text)
-
- 81 Posts
Thanks again for custom height.
Ace have a lot of commands, but I didn't find needful.
I've searching useful tool - get list of all variables(constants and functions).
This tool allows to check that is correctly written all vars.
P.S. Some times you spend a lot of time to find annoying lapses.
-
- 290 Posts
I've twice now tried Ace in ModX 2.3.3, but cannot get syntax highlighting or emmet functionality. Are there specific requirements for Ace in ModX?
Asking because this most recent test was in a local environment using MAMP. PHP etc all up to date, but maybe there's a specific module within MAMP that I need to turn on? Google didn't turn up anything specific between Ace, Emmet and MAMP...
Not sure about emmet, but Ace does code syntax highlighting just fine on installation.