Skip to content

How to use in custom plugins? #12

Open

Description

@bertoost

Is it possible to use this field in custom plugins?
For example;

{% if craft.app.plugins.isPluginEnabled('code-mirror') %}

    CODE MIRROR FIELD HERE

{% else %}
    {{ forms.textareaField({
        label: 'Template'|t('app'),
        name: 'template',
        value: template,
        rows: 8,
        errors: model.getErrors('template'),
    }) }}
{% endif %}

Couldn't find anything about it.. do you know?

Activity

  1. khalwat commented on Nov 4, 2022

    @khalwat

    You can use Code Editor for this: https://github.com/nystudio107/craft-code-editor/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions