@tanglemedia/directus-collection-flex-editor
v0.0.13
Published
Creates the flex table and some basic related nodes like image, resource, embed, and section
Maintainers
Readme
@tanglemedia/directus-collection-flex-editor
Installs the Flex Content Collection and easily adds the flex content editor to a Directus collection
The package will install the following collections:
- Flex Content Collection (
tngl_flex_content)- Table that contains the flex content editor and plain fields that is supposed to store the content of a directus collection
- Flex Content Nodes Collection (
tngl_flex_content_nodes)- Junction table between the flex content table and node components
- The node components are separate tables. These node components are relational data types that can be added to the content editor
- Embed
- Image
- Resource
- Section
It automatically sets the following:
- Creates a new role called Website. If the Website role already exist, it will not create a new one.
- Website role will have READ permission to all collections in this package
Requirements
- Directus >= 10.10.1
- Node >= 18.x.x
Install
Before you proceed, install the following Directus extensions
- directus-extension-inline-form-interface
- directus-extension-flexible-editor
- @tanglemedia/directus-extension-plainify-flex
- to generate plainified version of the flex content
- @tanglemedia/directus-collection-embed
- to relate the embed node component to the
tngl_embedtable
- to relate the embed node component to the
- @tanglemedia/directus-collection-resource
- to relate the resource node component to the
tngl_resourcetable
- to relate the resource node component to the
- @tanglemedia/directus-collection-section-banner
- to relate the resource node component to the
tngl_secbannertable
- to relate the resource node component to the
Add the following variables to your Directus env file:
FLEX_COLLECTION- comma-separated names of collections that you want to add the flex content editor into
- make sure these tables are installed (exist) first before you install this package
npm i @tanglemedia/directus-collection-flex-editornpx directus bootstrapto update your database and restart directus
