Sha256: 8df2022864c0755949ad5b3f35c654f1be490ea37fee9da8fd0745b3b8a4f552

Contents?: true

Size: 1.27 KB

Versions: 9

Compression:

Stored size: 1.27 KB

Contents

/*!
* Aloha Editor
* Author & Copyright (c) 2010 Gentics Software GmbH
* aloha-sales@gentics.com
* Licensed unter the terms of http://www.aloha-editor.com/license.html
*/

/**
 * @name contenthandler
 * @namespace Content handler plugin
 */
define( [
	'aloha',
	'aloha/plugin',
	'aloha/jquery',
	'aloha/contenthandlermanager',
	'contenthandler/wordcontenthandler',
	'contenthandler/genericcontenthandler',
	'contenthandler/oembedcontenthandler',
	'contenthandler/sanitizecontenthandler'
], function( Aloha,
			 Plugin,
			 jQuery,
			 ContentHandlerManager,
			 WordContentHandler,
			 GenericContentHandler, 
			 OembedContentHandler,
			 SanitizeContentHandler ) {
	

	/**
	 * Register the plugin with unique name
	 */
	var ContentHandlerPlugin = Plugin.create( 'contenthandler', {
		settings : {},
		dependencies : [],
		init : function () {
			var that = this,
				handler, cc,
				contentHandler = [ 'word', 'generic', 'sanitize' ], //  'oembed' deactivated
				i, j = contentHandler.length;

			// Register available content handler
			for ( i = 0; i < j; i++ ) {
				handler = contentHandler[ i ];
				cc = handler.charAt( 0 ).toUpperCase() + handler.slice( 1 );
				ContentHandlerManager
					.register( handler, eval( cc + 'ContentHandler' ) );
			}
		}
	} );

	return ContentHandlerPlugin;
});

Version data entries

9 entries across 9 versions & 3 rubygems

Version Path
locomotive-aloha-rails-0.20.1.5 vendor/assets/javascripts/aloha/plugins/common/contenthandler/lib/contenthandler-plugin.js
aloha-rails-0.0.2 vendor/assets/javascripts/aloha/plugins/common/contenthandler/lib/contenthandler-plugin.js
free_text-0.0.3 app/assets/javascripts/aloha-0.10.0/plugins/common/contenthandler/lib/contenthandler-plugin.js
locomotive-aloha-rails-0.20.1.4 vendor/assets/javascripts/aloha/plugins/common/contenthandler/lib/contenthandler-plugin.js
locomotive-aloha-rails-0.20.1.3 vendor/assets/javascripts/aloha/plugins/common/contenthandler/lib/contenthandler-plugin.js
locomotive-aloha-rails-0.20.1.2 vendor/assets/javascripts/aloha/plugins/common/contenthandler/lib/contenthandler-plugin.js
locomotive-aloha-rails-0.20.1.1 vendor/assets/javascripts/aloha/plugins/common/contenthandler/lib/contenthandler-plugin.js
aloha-rails-0.0.1 vendor/assets/javascripts/aloha/plugins/common/contenthandler/lib/contenthandler-plugin.js
locomotive-aloha-rails-0.20.1 vendor/assets/javascripts/aloha/plugins/common/contenthandler/lib/contenthandler-plugin.js