mdx-editor / editor

A rich text editor React component for markdown
https://mdxeditor.dev
MIT License
1.57k stars 124 forks source link

[FR] Support `options` prop in StrikeThroughSupSubToggles component #519

Closed tomerlichtash closed 1 week ago

tomerlichtash commented 1 week ago

Describe the bug The component StrikeThroughSupSubToggles does not support an options prop. This is seem arbitrary, as its neighbour component in the same file, BoldItalicUnderlineToggles - does support an options prop.

The options prop allows the user to decide which buttons of the toggle group will appear. In the case of StrikeThroughSupSubToggles - this option is quite missing, as Strikethrough is very popular, unlike sub/sup formatting.

Reproduction See StrikeThroughSupSubToggles

Expected behavior Use the same pattern as in BoldItalicUnderlineToggles and check if options.includes the option in the group before rendering.

Screenshots image

Desktop (please complete the following information):

Additional context Add any other context about the problem here.

tomerlichtash commented 1 week ago

Please excuse me for the bug label, this is definitely a feature-request. If you think this can fit with your project, I would be happy to contribute this PR myself.