Open benbucksch opened 6 months ago
OnBeforeCreate()
still runs after addExtensions()
, it is very important so we know extensions are already in the editor and we don't alter themIf you need to get the list of other extensions during your own extension startup, you run into an inherent problem: You are also an extension, and you might not be able to guarantee the order of loading, so if you do this at startup, the other extension that you're trying to list might not be loaded yet.
If that's your problem, I see a number of potential solutions:
Thanks for the solutions!
<tag><p></p></tag>
*
or all HTML contents, we need to pass in all the node/mark types for types
to add the attribute for all types.Have you tried to google whether other people tried to solve the same problem (esp. the whitelist) and had ideas?
Have you tried to google whether other people tried to solve the same problem (esp. the whitelist) and had ideas?
I have googled the problem and the only possible solution I've seen is to destroy and reinitialize the editor. The UUID pro extension is adding an attribute to all tags which something similar to the global attribute problem.
Update I might be able to implement it by creating a ProseMirror plugin and having the extension call that (for attributes only).
Update
I might be able to implement it by creating a ProseMirror plugin and having the extension call that (for attributes only).
Won't work because it doesn't create the schema.
Update
[tag]: [attributes]
the tag is but the extension names are not the same as the tag names. Do we allow tags or extension names?
Objective
Create a TipTap extension which allows arbitrary HTML elements and attributes, and is configured with simple arrays to list the elements and attributes.
Config format
The format for configuration should look exactly like this:
insane
.*
stands for any HTML element name.Interop
Whitelist
.Importance