Hi, I want to implement that, as soon as the user starts typing, all added elements get a font which is preselected.
e.g. I set the default font to be X in the configuration. I click on the editor and start typing. The default font is not applied to the text im writing. As of ckEditor 4.3.1 defautl package.
I need the font type/size to be included in the editor content (no external styles).
For example I would like the ckEditor, when it adds the wrapping p tags, to add styling information automatically.
Any ideas on how to solve this?
Jonas
here is the solution:
here is the solution:
editor.on('instanceReady', function (ev) {
editor['applyStyle'](style);
});
editor.on('key', function(ev) {
if (editor.getData() == '') {
editor['applyStyle'](style);
}
});
Awsome, thanks!
Awsome, thanks!
Customer and Community Manager, CKSource
Follow us on: Facebook, Twitter, LinkedIn
If you think you found a bug in CKEditor, read this!