🆕 Feature request
Font plugin: support for points to set the font-size
💻 Version of CKEditor
inline build v11.1.1, font-plugin v10.0.3
📋 Steps to reproduce
call setData() with html text:
<p><span style=\"font-size:10pt;\">some text </span></p>
✅ Expected result
Font size applied.
❎ Actual result
Font size remains unchanged for this element.
You can achieve this using configuration:
ClassicEditor
.create( document.querySelector( '#editor' ), {
plugins: [ ArticlePluginSet, FontSize ],
toolbar: [
'heading', '|', 'fontSize' //...,
],
fontSize: {
options: [
generatePtSetting( '10' ),
generatePtSetting( '12' ),
generatePtSetting( '14' ),
'default',
generatePtSetting( '18' ),
generatePtSetting( '20' ),
generatePtSetting( '22' ),
]
}
} );
function generatePtSetting( size ) {
return {
model: size,
title: size,
view: {
name: 'span',
styles: {
'font-size': `${ size }pt`
}
}
};
}
In action:

Most helpful comment
You can achieve this using configuration:
In action:
