Skip to main content

Config hovering toolbar


const hoveringToolbar: ThemeConfigProps["hoveringToolbar"] = {
list({ isCollapsed, selection }) {
if (isCollapsed) {
return [];
}
return [
TextFormat.FONT_FAMILY,
TextFormat.FONT_SIZE,
TextFormat.BOLD,
TextFormat.ITALIC,
TextFormat.UNDERLINE,
TextFormat.STRIKETHROUGH,
TextFormat.TEXT_COLOR,
TextFormat.BACKGROUND_COLOR,
TextFormat.LINK,
() => <EmojiPlugin />, // Your tools item
TextFormat.MERGETAG,
TextFormat.REMOVE_FORMAT,
];
},
};


const config = Retro.useCreateConfig({
...
hoveringToolbar: hoveringToolbar,
});