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

How to pre-configure classes when inserting tags? #180

Closed
JhonatanRian opened this issue Jan 19, 2024 · 1 comment
Closed

How to pre-configure classes when inserting tags? #180

JhonatanRian opened this issue Jan 19, 2024 · 1 comment

Comments

@JhonatanRian
Copy link

How to configure "class" attribute when inserting tags? for example, when I select blockquote, the tag will be inserted in the field with css classes created by me, so when I render the content it will be the way I want it.
I tried this way but it didn't work:

"heading": {
            "options": [
                {
                    "model": "blockquote",
                    "title": "blockquote",
                    "class": "blockquote-content p-5",
                }
            ],
        },
@goapunk
Copy link
Contributor

goapunk commented Feb 29, 2024

@JhonatanRian I don't think that's possible, see ckeditor/ckeditor5#3323. You can however use css to change the appearance, e.g. with

.ck-content blockquote {
      margin-top: 5px;

}

@hvlads hvlads closed this as completed Mar 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants