sjdemartini / mui-tiptap

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

Don't apply built-in styles #221

Open joelburget opened 4 months ago

joelburget commented 4 months ago

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

In my application (letter editor for openletter.net) we already have styles and don't want to apply any from src/styles.ts. It would be nice if we could turn this off.

Describe the solution you'd like

I'll focus on RichTextEditor since that's the component we're using, but I assume the same would apply to RichTextContent, etc. If there was a prop applyDefaultStyles which could default to true, I think that would solve the problem.

<RichTextEditor applyDefaultStyles={false} />

Describe alternatives you've considered

None that seem good.

joelburget commented 4 months ago

I should add that I'd be happy to contribute this if we settle on a design that you're happy with.

sjdemartini commented 4 months ago

I hadn't considered this before. Are you specifically referring to styles within the editor content (i.e. the Prosemirror/Tiptap rich text content itself), as opposed to the surrounding mui-tiptap stuff (outlined field, menu bar, etc.)? Understandable suggestion and there isn't a clean workaround right now, since you'd have to (seemingly painstakingly) override each separate style.

joelburget commented 4 months ago

That's exactly right. I'm happy with the surrounding mui-tiptap stuff, so I only care about the editor content.