Toggle showing Toolbar when editor is selected/focused #2569
Unanswered
daniellin215
asked this question in
Q&A
Replies: 1 comment 5 replies
-
Correct me if I'm wrong, but this sounds like a generic coding problem and not specific to Plate, and as such might be better suited to StackOverflow. If you want to set your |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, I have multiple editors on a page and each editor should have its own toolbar. When an editor is selected or in focus, the toolbar should show up at the bottom. But when I click on a button in the toolbar, (ie. bold), the editor loses focus and the toolbar dissappears immediately and no changes are made. What should I do?
export const PlateEditor: React.FC = ({
card,
isCardEditable,
isCardDeletable,
}) => {
const ref = useRef<any | null>(null);
const [cardContent, setCardContent] = useState<TElement[]>(
card.content ? JSON.parse(card.content) : DEFAULT_VALUE
);
const [isFocused, setIsFocused] = useState(false);
Beta Was this translation helpful? Give feedback.
All reactions