Hi,
I've made a custom plugin that insert a custom html in the editor. But I'd like that the custom button that activate this plugin it'll be enabled only in the 'source view' mode. There's a way to do that?
Another way, when a user click on the button, the editor sould switch to the source view: how I can accomplish this?
Thanks in advance,
Aozora
I've made a custom plugin that insert a custom html in the editor. But I'd like that the custom button that activate this plugin it'll be enabled only in the 'source view' mode. There's a way to do that?
Another way, when a user click on the button, the editor sould switch to the source view: how I can accomplish this?
Thanks in advance,
Aozora

Re: enable custom button in sourceview mode
editor.addCommand( 'myCommand', { // This command and toolbar button associated with will only // enabled in 'source' mode. modes : { source:1 }, exec : function( editor ) { } } );