Opened 6 years ago

Closed 6 years ago

#10918 closed Bug (invalid)

Activating the constructor even if the plugin is disabled

Reported by: Roberto Roncato Owned by:
Priority: Normal Milestone:
Component: General Version:
Keywords: Cc:

Description

I have a situation in which in the same page I would activate ckeditor with bbcode active only on certain textarea

So on the textarea I'm interested, I activate the editor instance with removePlugins: 'bbcode'. The problem is that in these instances, the image dialog is modified omitting some plugin information (height, width, ...)

Looking at the source code of the bbcode plugin, I suppose it is always called even if the plugin is disabled

BBCODE plugin source:

(function() {
	CKEDITOR.on( 'dialogDefinition', function( ev ) {
		var tab,
			name = ev.data.name,
			definition = ev.data.definition;

		if ( name == 'link' ) {
			definition.removeContents( 'target' );
			definition.removeContents( 'upload' );
			definition.removeContents( 'advanced' );
			tab = definition.getContents( 'info' );
			tab.remove( 'emailSubject' );
			tab.remove( 'emailBody' );
		} else if ( name == 'image' ) {
			definition.removeContents( 'advanced' );
			tab = definition.getContents( 'Link' );
			tab.remove( 'cmbTarget' );
			tab = definition.getContents( 'info' );
			tab.remove( 'txtAlt' );
			tab.remove( 'basic' );
		}
	});

        ...

Change History (1)

comment:1 Changed 6 years ago by Jakub Ś

Keywords: removed plugin activation removed
Resolution: invalid
Status: newclosed
Version: 4.2.1
  1. I have tried CKEditor code. I have used config.extraPlugins = 'bbcode'; in config.js and CKEDITOR.replace( 'editor1', {removePlugins: 'bbcode'} ); on HTML page and it works without problems. Extra inputs aren't removed.
  1. If you get problem with this behaviour either try above code or call extraPlugins only on textareas here bbcode should be used CKEDITOR.replace( 'editor1', {extraPlugins: 'bbcode'} );
Note: See TracTickets for help on using tickets.
© 2003 – 2019 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy