Milkdown / milkdown

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

[Feature] Allow passing options to floating ui in plugin-tooltip #1436

Open edtownend opened 2 months ago

edtownend commented 2 months ago

Initial checklist

Problem

Since moving from tippy to floating ui the only option that can be passed to floading ui is the offset parameter. For my specific use case I'd like to provide a custom value to placement (which is now hardcoded to 'top') but I could imagine other users might have other options. Thanks for considering this!

Solution

Extend TooltipProviderOptions with a floatingUIOptions parameter similar to the tippyOptions parameter that came before

Alternatives

Also select options such as placement could be added direct to TooltipProviderOptions

Saul-Mirone commented 2 months ago

Good point