Skip to content

Relationships and SlateJS #86

Answered by jmikrut
richardvanbergen asked this question in Q&A
Discussion options

You must be logged in to vote

Yo Richard,

There are a few ways to do what you are looking for!

To answer your first question, yes, you can use Relationships to link to existing documents within the Rich Text field. For this to work, you need to do a few things:

  1. Within the collection that you actually want to reference, set enableRichTextRelationship to true within that collection's admin options - see here for an example in our demo app
  2. Then, in your actual rich text field(s), specify the 'relationship' field type within the rich text field's admin.elements property like this:
    {
      name: 'richTextDemo',
      type: 'richText',
      label: 'Rich Text Demo',
      admin: {
        elements: [
          'h2',

Replies: 1 comment 7 replies

Comment options

You must be logged in to vote
7 replies
@richardvanbergen
Comment options

@jmikrut
Comment options

@jmikrut
Comment options

@richardvanbergen
Comment options

@jmikrut
Comment options

Answer selected by richardvanbergen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants