npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@okam/directus-flexible-content

v1.2.23

Published

## Exports - FlexibleEditorContent (Component) - TRenderingNodes (Type) - JSONContent (Type)

Downloads

21

Readme

directus-flexible-content

Exports

  • FlexibleEditorContent (Component)
  • TRenderingNodes (Type)
  • JSONContent (Type)

FlexibleEditorContent Component

Props

| name | type | description | |--------------------|-------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | jsonContent | JSONContent | This prop takes in the json data returned from the flexible editor in directus. | | editorNodes | EditorNodes[] | undefined | null | This prop takes in the editor nodes data from directus. | | serializers | Extensions | undefined | This prop takes in the different tiptap extensions that the flexible editor uses. There are already a bunch pre-installed in the package (see 'src/lib/components/FlexibleEditorContent/extensions') | | config | TBlockSerializerConfig | undefined | This takes in a BlockDispatcher config object for relation blocks placed in the flexible editor. | | nodes | TRenderingNodes | undefined | This takes in a config object for remapping default HTML semantic tags to React Components. | | remappedAttributes | Record<string, string> | undefined | This allows to remap HTML attributes to fix warnings or errors made by tiptap. |

Configuring the flexible editor inside directus :

Adding blocks to the flexible editor options : the related blocks are handled in the Editor Nodes field beside the flexible editor field. You can add more collections by going in the relationship menu of the editor nodes and selecting additional collections in the associated collections section.

https://github.com/user-attachments/assets/576bdb52-f9bc-4835-ab2a-4c59995ae77f

Most of the time, if you want to insert blocks inside the flexible editor, you will need to follow the With relation nodes and exisiting items tutorial. Note that it is important to prefix related blocks for selection with related_ so that a related block would look like related_{block-collection} so if you have a block_faqs your related collection key should be related_block_faqs.

IMPORTANT: when configuring the many to many relation inside your related_{block-collection} collection. The key of the field should always be blocks. image

Querying

Here is an example of what querying should look like :

flexible_editor
editor_nodes {
  id
  collection
  item {
    ... on related_block_quote {
      id
      blocks {
        id # id should always be present in the query for the blocks otherwise the block will not be displayed.
        item: block_quote_id { # You should always rename `block_[x]_id` to item
          ...BlockQuote
        }
      }
    }
    ... on related_block_button {
      id
      blocks {
        id
        item: block_button_id {
          ...BlockButton
        }
      }
    }
    ... on related_block_faqs {
      id
      blocks {
        id
        item: block_faqs_id {
          ...BlockFaqs
        }
      }
    }
  }
}