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"
            />  
  • 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 Oct 12 '16 at 17:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.