I'm hoping to learn how to duplicate features and adapt them.
As example, I'm trying to create a button that does exactly what the bold button does, except for a minor change.
The duplicated new feature would enclose highlighted text with <h3></h3>
It seems creating new features this way would be a really simple job, once I know how to duplicate features. As an example, how would I duplicate the bold feature?
Thank you!
As example, I'm trying to create a button that does exactly what the bold button does, except for a minor change.
The duplicated new feature would enclose highlighted text with <h3></h3>
It seems creating new features this way would be a really simple job, once I know how to duplicate features. As an example, how would I duplicate the bold feature?
Thank you!
Re: Duplicating The Bold Feature?
I found the basicstyles plugin, where it seems bold, italic, underline etc are defined.
ckeditor/_source/plugins/basicstyles/plugin.js
I edited this file to add these lines...
addButtonCommand( 'Heading' , lang.heading , 'heading' , config.coreStyles_heading );
And...
CKEDITOR.config.coreStyles_heading = { element : 'h3' };
Then I added the command "heading" to a button.
This doesn't work, so I assume there's more to creating a new basic style. Tips are most welcome, thanks.
Re: Duplicating The Bold Feature?
Why don't you try to go through the CKEditor tutorials first? The articles published so far explain the basics of creating custom plugins and they should be a good starting point for what you are trying to achieve.
By the way, it is really encouraging to see someone who is willing to dig into code first by himself. Good luck in your endeavours!
Documentation Manager, CKSource
See CKEditor 5 docs, CKEditor 4 docs, CKEditor 3 docs, CKFinder 3 docs, CKFinder 2 docs for help.
Visit the new CKEditor SDK for samples showcasing editor features to try out and download!