-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
List of allowed headings should be configurable #2418
Comments
Actually, the configuration should set how deep headings nesting is allowed, defaulting to 3, up to 5 (or 6 if we also configure to start with This is not a requirement right now tough. |
Actually, in my case, I only need |
We simply need to expose this in the Also, I don't like the name of that property (which then repeates in the headings command API) because it's derived from the CKE4's format feature. So it should not be "formats" but... "headings"? :P PS. I'm going to rename this feature today, so it's not called "headings" finally (it should be "heading"). |
Hum... I don't think this is to be changed: https://github.com/ckeditor/ckeditor5-headings/issues/8#issuecomment-223593035 |
@Reinmar: How would this work with locales? Because strings like |
It's tricky, but we had an idea for that. Basically, we can provide localization only for the default options. The "localisator", while building the editor, will scan for Now, if someone defined headings: [
{ name: 'Paragraph', ... }
{ name: 'Super heading', ... }
} And used Polish locale, then you'll have the following options: "Akapit", "Super heading". So basically, it's your fault that only half of the texts were translated. You need to take care of passing the right strings. But, if you're just using a subset of the default settings (which contains "Paragraph" and "Heading 1-3") like this: headings: [
{ name: 'Paragraph', ... }
{ name: 'Heading 1', ... }
} Then it will work perfectly even in Polish locale, because all strings will be translated automatically (cause we treat the setting as a translation ids). |
@fredck: https://github.com/ckeditor/ckeditor5-headings/issues/6 there's a ticket for that. And the comment is later than the one in #2408. So we changed the opinion :D. |
Well, I don't see much discussion there, still "heading" sounds weird. |
Feature: Enabled configuration and localization of available headings (see `config.heading.options`). Closes #33. BREAKING CHANGES: The `heading` command now accepts `id` option, not `formatId`.
It should be configurable if one wants to have all headers (
h2
,h3
andh4
), or only part of them.The text was updated successfully, but these errors were encountered: