Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't apply built-in styles #221

Open
joelburget opened this issue Apr 22, 2024 · 4 comments
Open

Don't apply built-in styles #221

joelburget opened this issue Apr 22, 2024 · 4 comments
Labels
enhancement New feature or request

Comments

@joelburget
Copy link

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
Copy link
Author

joelburget commented Apr 23, 2024

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

@sjdemartini sjdemartini added the enhancement New feature or request label Apr 30, 2024
@sjdemartini
Copy link
Owner

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
Copy link
Author

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

@markdon
Copy link

markdon commented Nov 26, 2024

The imposed styles (margin removals, text sizes, etc) make the content inside the editor inconsistent with content/UI outside of the editor. For now, I have some CSS that undoes some of the most obvious inconsistencies.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants