-
I'm trying to use left/right/center align commands in my editor. But they are not working. How I'm triggering commands editor.dispatchCommand(FORMAT_ELEMENT_COMMAND, 'center') Please help |
Beta Was this translation helpful? Give feedback.
Answered by
syed-qure
Jan 18, 2023
Replies: 2 comments 2 replies
-
I have not tried to build the toolbar manually, but this is the official toolbar template: |
Beta Was this translation helpful? Give feedback.
2 replies
-
The fix was to import import { FORMAT_ELEMENT_COMMAND } from 'lexical' |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
syed-qure
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The fix was to import
FORMAT_ELEMENT_COMMAND
from proper package