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

Option to add class/id to the parent wrapper div #1332

Closed
atulmy opened this issue May 17, 2021 · 6 comments
Closed

Option to add class/id to the parent wrapper div #1332

atulmy opened this issue May 17, 2021 · 6 comments
Labels
Type: Feature The issue or pullrequest is a new feature

Comments

@atulmy
Copy link

atulmy commented May 17, 2021

The problem I am facing
The wrapper for the editor is a div without any class/id and is hard to style using CSS:
Screenshot 2021-05-17 at 6 33 20 PM

The solution I would like
Allow option to pass class/id to set to parent wrapper div

@atulmy atulmy added Type: Feature The issue or pullrequest is a new feature v2 labels May 17, 2021
@philippkuehn
Copy link
Contributor

You can do this already. Just add a class to your EditorContent component if you are using Vue or React.

@atulmy
Copy link
Author

atulmy commented May 18, 2021

EditorContent does not seem to accept className or id as a parameter, even after ignoring, it does not apply the class.

Screenshot 2021-05-18 at 5 33 51 PM

@philippkuehn
Copy link
Contributor

ah you are right. there was an issue. should be fixed in the latest @tiptap/react version.

@atulmy
Copy link
Author

atulmy commented May 18, 2021

Thanks!

andrewlu0 pushed a commit to trybaseplate/tiptap that referenced this issue Oct 20, 2023
@troovi
Copy link

troovi commented Jul 14, 2024

It's 2024 and you still don't have support for the className in EditorProvider component

@SimonTernoir
Copy link

SimonTernoir commented Aug 8, 2024

Have you tried using editorProps props?

editorProps={{
    attributes: { class: 'you-classNames-here },
}}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Feature The issue or pullrequest is a new feature
Projects
None yet
Development

No branches or pull requests

4 participants