sjdemartini / mui-tiptap

A Material UI (MUI) styled WYSIWYG rich text editor, using Tiptap
MIT License
320 stars 44 forks source link

Add new menu buttons #52

Closed bryanjtc closed 1 year ago

bryanjtc commented 1 year ago

Is your feature request related to a problem? Please describe.

To make this package a true replacement for react-mui-draft-wysiwyg there are a few menu buttons that you can add.

Describe the solution you'd like

Implement the following suggestions:

Describe alternatives you've considered

A clear and concise description of any alternative solutions or features you've considered.

Additional context

Add any other context or screenshots about the feature request here.

sjdemartini commented 1 year ago

I am intending to add more explicit support and built-in buttons for all of these, so thank you for filing and detailing this in such an organized way @bryanjtc!

A couple of those are in fact already supported:

bryanjtc commented 1 year ago

Removing useRecommendedExtensions is a good idea. The demo should use the setup of the useRecommendedExtensions hook and all the other possible extensions and controls. Can I add my own custom control using the MenuButton component? Edit: Answering my own question, yes I can.

bryanjtc commented 1 year ago

The tooltip label should be a prop in all menu buttons to customize the label content.

sjdemartini commented 1 year ago

@bryanjtc Yes, that's the intention for MenuButton—to be a reusable base component so anyone can add their own menu buttons fairly easily. And agreed, I intend to have all props be overridable for all MenuButtons!

sjdemartini commented 1 year ago

FYI you can now override tooltipLabels (and any other props) for all of the MenuButton* components, in v1.0.0-beta.3

sjdemartini commented 1 year ago

The latest release v1.0.0-beta.5 includes several more controls components (undo, redo, horizontal rule, underline, and multiple options for text-align)

sjdemartini commented 1 year ago

The latest release v1.0.0-beta.10 features a new FontSize extension and MenuSelectFontSize controls component (see https://github.com/sjdemartini/mui-tiptap/pull/94 and #95 for some screenshots and examples).

bryanjtc commented 1 year ago

Ideas to improve the menu image button

Original react-mui-draft-wysiwyg image button: image Upload: image Url: image

Original mui-rte image button: image Allow modifying height and width: image Allow choosing between image or video image

bryanjtc commented 1 year ago

Font color/highlight customization ideas

Original react-mui-draft-wysiwyg image button: image Tiptap example image

sjdemartini commented 1 year ago

MenuSelectFontFamily has been added as of the v1.2.0 version just published:

Screenshot 2023-07-23 at 4 21 15 PM
devth commented 1 year ago

This project is amazing! Love the high velocity and quality ya'll are shipping. Thanks so much for building it. 🙏🏻

cgil commented 1 year ago

Second on the impressive speed! And also the text and highlight color input components

sjdemartini commented 1 year ago

Just commenting to say I haven't forgotten about this and aim to tackle the text and highlight color menu components soon. I have a WIP version but have a bit more work to do to polish it.

sjdemartini commented 1 year ago

I've released mui-tiptap v1.5.0 which includes the first version of the text-color and highlight-color menu controls (along with some building-block components you can use to build a more custom version). Implemented in https://github.com/sjdemartini/mui-tiptap/pull/135. Thanks for all the comments and suggestions in this thread!

I'm going to close out this issue, since those were the last outstanding extensions here which were missing support in mui-tiptap. I've added a separate issue https://github.com/sjdemartini/mui-tiptap/issues/136 to track future improvement ideas for the "Insert image" menu button, based on the above discussion.

Let me know if you have any feedback, and as usual feel free to file an issue if you come across bugs or have feature-request ideas!