1

I am trying to use CodeMirror as the editor for a field inside a component I am developing. I have specified the editor as codemirror in the form.xml file but I get a javascript error on the page:

Uncaught ReferenceError: CodeMirror is not defined.

Here is the entry in my form.xml file:

    <field name="myfield"
            type="editor"
            label="COM_MYCOMPONENT_MYFIELD_LABEL"
            description="COM_MYCOMPONENT_MYFIELD_DESC"
            default=""
            editor="codemirror|none"
            filter="raw"
            />  
1
  • I've tested your field definition in a J!3.6.2 and it is working fine. I've even tried to disable the CodeMirror plugin, but the control degrades to a text area and no javascript error. I suggest you look for script conflicts.
    – Pep Lainez
    Commented Oct 12, 2016 at 17:00

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.