Milkdown / milkdown

🍼 Plugin driven WYSIWYG markdown editor framework.
https://milkdown.dev
MIT License
8.64k stars 386 forks source link

[Bug] How do you add a toolbar? #1401

Closed shadow7412 closed 1 month ago

shadow7412 commented 1 month ago

Initial checklist

Affected packages and versions

7.4.0

Link to runnable example

N/A

Steps to reproduce

On https://milkdown.dev/playground, the example is shown with a working toolbar. However I'm unable to find any documentation on how to actually enable it.

I've managed to find stuff like https://www.npmjs.com/package/@milkdown/plugin-menu (which I found by finding the PR for this feature on github) which seemed like the answer I needed, but it's deprecated with no guidance in the message as to what it has been replaced by.

Expected behavior

Source code for the way the preview is set up would be nice to have available. A message should be added to deprecated packages, guiding them to the acceptable alternatives.

Actual behavior

There do not seem to be any examples of how to enable this (presumably very commonly required) feature, despite it being teased in the playground.

Runtime

Firefox

OS

Windows, Linux

Build and bundle tools

Vite

Saul-Mirone commented 1 month ago

https://github.com/Milkdown/website/blob/main/src/components/playground-editor/index.tsx#L91C1-L117C13