Description
Custom Lexical Nodes that can be authored in React that can take other Lexical Node as children. The nodes that these children take should be checked that they are an instance of a specifc user defined or built in Lexical Node.
Use Case
I'm working on a script editor, and I need to make sure that DialogueNode in scripts take a CharacterNode and ParentheticalNode and ConversationNode. There is a hierarchy to scripts in terms of the elements that make up a script for example a hierarchy like so:
SceneNode
ActionNode
DialogueNode
CharacterNode
ParentheticalNode
ConversationNode
TransitionNode
Implementation
- Should add a new NodeType to extend from OR add a method On DecoratorNode that lets you specify a method that check child node types.
- Ability to click around the editor and select nodes in a hierarchy-aware way. For example if I click between 2
SceneNode Children Nodes It should select the Scene Node. This is important for building plugins that can show specific child nodes you can select from to insert into the active Node.
Impact
It would benefit editors that work with content that is Hierarchical in nature like scripts, script breakdowns, A/V scripts, etc.
Side Question
SceneNode takes some meta data that I would like to capture not via a modal or input outside of the content-editable, I would like to try to capture it within the editor itself it needs to capture Location, Title, and Time. Ie. INT. MOUNTAINOUS TERRAIN - DUSK Where INT. is the Location, MOUNTAINOUS TERRAIN is Title, and DUSK is Time. When I use SlashCommandPlugin it makes a popover appear with Nodes to insert. When I click SceneNode I'd like to show placeholder type of UI on the header line of the SceneNode. At the moment this is pretty hard to implement and feel like i'm using lexical wrong here, is there a good way to do this?
Description
Custom Lexical Nodes that can be authored in React that can take other Lexical Node as children. The nodes that these children take should be checked that they are an instance of a specifc user defined or built in Lexical Node.
Use Case
I'm working on a script editor, and I need to make sure that
DialogueNodein scripts take aCharacterNodeandParentheticalNodeandConversationNode. There is a hierarchy to scripts in terms of the elements that make up a script for example a hierarchy like so:Implementation
SceneNodeChildren Nodes It should select the Scene Node. This is important for building plugins that can show specific child nodes you can select from to insert into the active Node.Impact
It would benefit editors that work with content that is Hierarchical in nature like scripts, script breakdowns, A/V scripts, etc.
Side Question
SceneNodetakes some meta data that I would like to capture not via a modal or input outside of the content-editable, I would like to try to capture it within the editor itself it needs to captureLocation,Title, andTime. Ie.INT. MOUNTAINOUS TERRAIN - DUSKWhereINT.is the Location,MOUNTAINOUS TERRAINis Title, andDUSKis Time. When I useSlashCommandPluginit makes a popover appear with Nodes to insert. When I clickSceneNodeI'd like to show placeholder type of UI on the header line of the SceneNode. At the moment this is pretty hard to implement and feel like i'm using lexical wrong here, is there a good way to do this?