Const
Singleton instance of LexicalCommandEmitter for broadcasting formatting commands from the VS Code extension to the Lexical editor webview.
Subscribe to commands in webview:
lexicalCommands.subscribe((command) => { console.log('Received command:', command);}); Copy
lexicalCommands.subscribe((command) => { console.log('Received command:', command);});
Emit command from extension:
lexicalCommands.emit('bold'); Copy
lexicalCommands.emit('bold');
Singleton instance of LexicalCommandEmitter for broadcasting formatting commands from the VS Code extension to the Lexical editor webview.