User tests: Successful: Unsuccessful:
Pull Request for Issue #20062
getInput() method of file
libraries/src/Form/Field/EditorField.php
(form field element type="editor" in the our XML files)
https://github.com/joomla/joomla-cms/blob/staging/libraries/src/Form/Field/EditorField.php#L245
is passing "syntax" (syntax highlighting) in $params array
https://github.com/joomla/joomla-cms/blob/staging/libraries/src/Form/Field/EditorField.php#L254
but the display()
method in codemirror.php file is not using $params['syntax']
instead it uses: $this->params->get('syntax' ...
This PR patches display()
method in codemirror.php file to use $params['syntax']
, similar like $params['readonly']
is used
XML for testing
<form>
<field name="html" type="editor" filter="raw" editor="codemirror|none" syntax="html"/>
<field name="css" type="editor" filter="raw" editor="codemirror|none" syntax="css"/>
<field name="js" type="editor" filter="raw" editor="codemirror|none" syntax="js"/>
</form>
The 1st editor will have HTML syntax highlighting
The 2nd editor will have CSS syntax highlighting
The 3nd editor will have JS syntax highlighting
All codemirror editors have HTML syntax highlighting
None
Status | New | ⇒ | Pending |
Category | ⇒ | Front End Plugins |
I have tested this item
Tested on com_content all works
Status | Pending | ⇒ | Ready to Commit |
Ready to Commit after two successful tests.
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2018-04-07 14:32:41 |
Closed_By | ⇒ | mbabker | |
Labels |
Added:
?
?
|
I have tested this item✅ successfully on 0f8eba2
Test with this xml
Works great, I would like to see the nearest version
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/20063.