{% import '_includes/forms.twig' as forms %} {{ forms.componentSelectField({ label: 'CKEditor Config'|t('ckeditor'), id: 'cke-config', name: 'ckeConfig', options: plugin('ckeditor').ckeConfigs.getAll(), value: ckeConfig ?? null, limit: 1, createAction: 'ckeditor/cke-configs/edit', }) }} {% embed '_includes/forms/field' with { label: 'Field Limit'|t('app'), instructions: "The maximum number of words or characters the field is allowed to have."|t('ckeditor'), id: 'field-limit', errors: field.getErrors(field.wordLimit ? 'wordLimit' : 'characterLimit') } %} {% import "_includes/forms" as forms %} {% block input %}
{{ forms.text({ id: 'fieldLimit', name: 'fieldLimit', value: field.wordLimit ?? field.characterLimit, size: 3, }) }} {{ forms.select({ id: 'limitUnit', name: 'limitUnit', options: [ { value: 'words', label: 'Words'|t('ckeditor') }, { value: 'chars', label: 'Characters'|t('app') }, ], value: field.characterLimit ? 'chars' : 'words' }) }}
{% endblock %} {% endembed %} {{ forms.lightswitchField({ id: 'show-word-count', name: 'showWordCount', label: 'Show word count'|t('ckeditor'), on: field.showWordCount }) }} {{ forms.lightswitchField({ id: 'parse-embeds', name: 'parseEmbeds', label: 'Parse embeds'|t('ckeditor'), instructions: 'Whether `` tags should be parsed and replaced with the provider’s embed code.'|t('ckeditor'), warning: 'This should only be enabled if the field output is cached.'|t('ckeditor'), on: field.parseEmbeds, }) }} {% if userGroupOptions|length %}
{{ forms.checkboxSelectField({ id: 'sourceEditingGroups', name: 'sourceEditingGroups', label: 'Who should see the “Source” button?'|t('ckeditor'), options: userGroupOptions, values: field.sourceEditingGroups, allLabel: 'All users'|t('app'), showAllOption: true, }) }}
{% endif %}
{% set headlessMode = craft.app.config.general.headlessMode %} {% set entryTypes = entryTypeRows ?? [] %} {{ forms.entryTypeSelectField({ label: 'Entry Types'|t('app'), instructions: 'Choose the types of entries that can be created in this field.'|t('app'), id: 'entry-types', name: 'entryTypes[]', values: field.getEntryTypes(), allowOverrides: true, create: true, errors: field.getErrors('entryTypes'), data: {'error-key': 'entryTypes'}, }) }} {{ forms.lightswitchField({ id: 'expand-entry-buttons', name: 'expandEntryButtons', label: 'Show toolbar buttons for entry types with icons'|t('ckeditor'), instructions: 'Whether entry types with icons should be shown as separate buttons in the toolbar.' |t('ckeditor'), on: field.expandEntryButtons, reverseToggle: 'create-button-label-wrapper', }) }}
{{ 'Assets'|t('app') }}
{{ "Advanced"|t('ckeditor') }}