Set custom icons / buttons of Link Tooltip Component in React #1723
-
I am writing a custom Milkdown editor for my React application. I already successfully implemented a tooltip menu with the help of const MilkdownEditorContent: React.FC = () => {
const pluginViewFactory = usePluginViewFactory();
useEditor((root) =>
Editor.make()
.config(nord)
.config(configureLinkTooltip)
.config((ctx) => {
ctx.set(rootCtx, root);
ctx.set(tooltip.key, {
view: pluginViewFactory({
component: MilkdownToolbar,
}),
});
ctx.update(linkTooltipConfig.key, (defaultConfig) => ({
...defaultConfig,
linkIcon: () => <MyIcon />, // I can put anything here it doesn't work because it is JSX
}));
})
.use(commonmark)
.use(gfm)
.use(linkTooltipPlugin)
.use(tooltip),
);
return <Milkdown />;
}; Is there a way to make it work, maybe by using something similar to |
Beta Was this translation helpful? Give feedback.
Answered by
Saul-Mirone
Mar 13, 2025
Replies: 1 comment
-
I don't think there's a way to make it work for now because the icon only accept dom and atomico |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
Keylekan
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I don't think there's a way to make it work for now because the icon only accept dom and atomico
html
directive.