Use marks in custom extension


#1

hi again. like mentioned here: Initialize nested extensions and pass attrs to them i am using a custom extension, but i am not able to use here some marks/nodes like headline and lists. is there a possibility to activate them there?

i already tried marks: '_' in the schema, but is has no effect.

hope somebody has an answer to this.


#2

The nodes that are included in your schema should be available (though you may need to create UI elements to insert/choose them before you can actually use them). Your description doesn’t really tell me enough to guess what’s going wrong here.


#3

well i am creating one of my custom elements in prosemirror, which is basically a div with a special class. Then i want to use the headline-mark inside the text i have written there. But currently nothing happens, when i am pressing on the “heading”-button to format the text. Is there any information that i missed to give you? if so, which information?


#4

There’s no headline mark. Headings are a node type, just like paragraphs.


#5

a damn you’re right, sorry. but do i have to call each node in the content-attribute of the schema or is there option to make every node usable inside it?

or do i have to make something like: content: '(paragraph | heading | bullet_list | ordered_list) (paragraph | heading | bullet_list | ordered_list)*' to achive that the content could be any of those nodes?

thank you so much already again!


#6

This page might answer a lot of your questions.


#7

yes. thank you :scream: