You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to change the behavior of the tab key such that, when the tab key is pressed, it inserts a '\t' or 	 at the start of the paragraph. This is how I insert the tab with a custom button in the toolbar. The current implementation from listsPlugin() just indents an entire paragraph.
I'm not exactly sure how to implement this, but I think creating a custom realmPlugin is the way to go. However, I'm a bit confused on the documentation for creating a custom realmPlugin. How do I add my own custom realmPlugin to MDX Editor? I'm assuming it needs a custom Lexical node that needs to be initialized with MDX Editor itself.
For example, if I want a custom Lexical node for highlighting selected text, I have the following code:
Note that this is just an example for highlighting selected text. I'm planning to create another custom Lexical node for changing the tab key behavior, but I'm not sure if this is the right approach.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm trying to change the behavior of the tab key such that, when the tab key is pressed, it inserts a '\t' or
	
at the start of the paragraph. This is how I insert the tab with a custom button in the toolbar. The current implementation from listsPlugin() just indents an entire paragraph.I'm not exactly sure how to implement this, but I think creating a custom realmPlugin is the way to go. However, I'm a bit confused on the documentation for creating a custom realmPlugin. How do I add my own custom realmPlugin to MDX Editor? I'm assuming it needs a custom Lexical node that needs to be initialized with MDX Editor itself.
For example, if I want a custom Lexical node for highlighting selected text, I have the following code:
Note that this is just an example for highlighting selected text. I'm planning to create another custom Lexical node for changing the tab key behavior, but I'm not sure if this is the right approach.
Beta Was this translation helpful? Give feedback.
All reactions