Comments (1)
Hi, thanks for getting in touch. It looks like this is the default behaviour coming from CKEditor v5: https://github.com/ckeditor/ckeditor5/blob/dff5e8cd5432c67efab052d30f02fb6c6b37ffcb/packages/ckeditor5-heading/_src/heading.js#L52-L81
You can change it by adding your custom configuration in the field settings under Initialization Code
. The following snippet would change the default behaviour to map Heading 1
to h1
, Heading 2
to h2
etc and would add Heading 4
to the list:
return await ClassicEditor
.create(document.querySelector('#__EDITOR__'), {
heading: {
options: [
{ model: 'paragraph', title: 'Paragraph', class: 'ck-heading_paragraph' },
{ model: 'heading1', view: 'h1', title: 'Heading 1', class: 'ck-heading_heading1' },
{ model: 'heading2', view: 'h2', title: 'Heading 2', class: 'ck-heading_heading2' },
{ model: 'heading3', view: 'h3', title: 'Heading 3', class: 'ck-heading_heading3' },
{ model: 'heading4', view: 'h4', title: 'Heading 4', class: 'ck-heading_heading4' }
]
}
});
This is a good starting point if you’re looking for ways to customise your editor: https://ckeditor.com/docs/ckeditor5/latest/installation/getting-started/quick-start.html#sample-implementation-2
from ckeditor.
Related Issues (20)
- Multiple warnings in console after updates Craft CMS 4.7.3 and CKEditor 3.7.3 HOT 2
- Anchor Links option not available HOT 1
- Live preview is not triggered when using panel features HOT 4
- Adding id attribute to text or headings
- Twig Runtime Error – Twig\Error\RuntimeError Calling unknown method: craft\ckeditor\CkeConfig::listPlugin() HOT 3
- Link option "Link to an asset" is missing when CKEditor field is in a matrix block. HOT 3
- [4.0] Unable to initialize field without Element HOT 2
- Styles dropdown preview broken HOT 1
- [4.x] New Entry dropdown defaults to alphabetical ordering instead of the order set in field settings HOT 2
- [4.x] Editing copy/pasted embed entries will edit both the original and copied entry HOT 3
- Element without getFieldLayout results in an error HOT 2
- [4.x] In Craft 5, a nested entry whose entry type has since been deleted from Craft throws an error on the back-end and the front-end HOT 2
- [4.x] Images/assets button is missing from configurable ckeditor selection of toolbar items HOT 6
- Linking to Craft Entry appends persistent hashtag #entry:77@1:url HOT 4
- [4.x]: Error: Setting unknown property: craft\ckeditor\Field::configFile HOT 2
- Failed to run php craft ckeditor/convert: exit status 1 HOT 10
- Custom Config Not Appying to Field HOT 5
- FR: MODIFY_PURIFIER_CONFIG HOT 3
- Migrating Redactor Variables to CKEditor Placeholder HOT 3
- Iniciar sesión en la aplicación YouTube en una smart TV o videoconsola
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ckeditor.