User tests: Successful: Unsuccessful:
Pull Request for Issue # .
Instead of trying to determine the correct mode in PHP and explicitly set it in CodeMirror, use CodeMirror's built in functions to get the mode information. This means that (with no known exceptions) we can just pass the syntax
parameter and get the right mode. This also means many more modes should be available. For example, until now, setting syntax="less"
in the jform xml for the codemirror element would not give you less-mode. Now it should.
Try using codemirror with as many different modes as you can. HTML (obviously), CSS, JS, XML, PHP, etc.
The mode settings (such as syntax coloring) should be correct.
Until now, modes commonly used by Joomla users probably worked properly but some others (such as less
) might not have.
No, I think not.
Category | ⇒ | Front End Plugins |
Status | New | ⇒ | Pending |
Labels |
Added:
?
|
I have tested this item
Editing LESS files in Joomla template manager now has syntax highlighting !
Please note that you do not need to edit
administrator/components/com_templates/models/forms/source.xml
to change the 'syntax' attribute
because view.html.php sets it automatically to correct extension for currently loaded file
$this->form->setFieldAttribute('source', 'syntax', $ext);
Also tested with custom code that creates codemirror instances dynamically at browser,
Syntax highlighting now work if mode property is set !!!
I have tested this item
Just Updated to staging works now
Milestone |
Added: |
||
Status | Pending | ⇒ | Ready to Commit |
Labels |
Added:
?
|
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2017-10-09 23:23:23 |
Closed_By | ⇒ | mbabker | |
Labels |
if use 2 editors on page syntax attr don't work.
In editors use attr only from first field.
Thanks. Don't drink and code.