Skip to content
This repository has been archived by the owner on Aug 15, 2023. It is now read-only.

Latest commit

 

History

History
38 lines (24 loc) · 1.2 KB

README.md

File metadata and controls

38 lines (24 loc) · 1.2 KB

YAML Editor

This module loads an Ace editor for all textarea with data-yaml-editor attribute

Demo 📺

Demonstration of editor enabled textarea

Usage ☝️

Field widget

You can use the YAML editor for Text (plain, long) fields, simply go to Manage form display and select Textarea with YAML editor.

Code

When you need an editor for your YAML files add a data-yaml-editor to you textarea like:

$form['config'] = [
  '#type' => 'textarea',
  '#title' => t('Configuration'),
  '#attributes' => ['data-yaml-editor' => 'true'],
];

Supporters 😇

Here are some module which are already implementing the data-yaml-editor attribute:

Contributing 🔨

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.