{% import '_includes/forms.twig' as forms %} {% import 'codeeditor/codeEditor.twig' as codeEditor %} {% set readOnly = readOnly ?? false %} {% set baseMonacoOptions = { tabSize: 2, showUnused: false, } %} {% if readOnly %} {% set baseMonacoOptions = baseMonacoOptions|merge({ domReadOnly: true, readOnly: true }) %} {% endif %} {% set baseCodeEditorOptions = { wrapperClass: 'monaco-editor-background-frame', } %} {% if ckeConfig.uid %} {{ hiddenInput('uid', ckeConfig.uid) }} {% endif %} {{ forms.textField({ first: true, label: 'Name'|t('app'), id: 'name', name: 'name', value: ckeConfig.name, autofocus: true, required: true, errors: ckeConfig.getErrors('name'), data: {'error-key': 'name'}, disabled: readOnly, }) }} {% embed '_includes/forms/field.twig' with { label: 'Toolbar'|t('ckeditor'), instructions: 'Drag toolbar items into the editor.'|t('ckeditor'), id: 'toolbar', ckeConfig: ckeConfig, errors: ckeConfig.getErrors('toolbar'), data: {'error-key': 'toolbar'}, } %} {% block input %}