Sha256: 3ed2f3c7e177fc9a0414aa84f55eab910acae5fcd72583e9872cb46be12547df

Contents?: true

Size: 815 Bytes

Versions: 4

Compression:

Stored size: 815 Bytes

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
 */

define(
['aloha/registry'],
function(Registry) {
	

	/**
	 * The Editor Manager maps data types to editor classes.
	 *
	 * @name block.editormanager
	 * @class Editor manager singleton
	 */
	return new (Registry.extend(
	/** @lends block.editormanager */
	{
		/**
		 * Create an editor from the given definition. Acts as a factory method
		 * for editors.
		 *
		 * @param {Object} definition
		 */
		createEditor: function(definition) {
			if (!this.has(definition.type)) {
				throw 'Editor for type "' + definition.type + '" not found.';
			}
			var Editor = this.get(definition.type);
			return new Editor(definition);
		}
	}))();
});

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
locomotive-aloha-rails-0.20.1.5 vendor/assets/javascripts/aloha/plugins/common/block/lib/editormanager.js
free_text-0.0.3 app/assets/javascripts/aloha-0.10.0/plugins/common/block/lib/editormanager.js
locomotive-aloha-rails-0.20.1.4 vendor/assets/javascripts/aloha/plugins/common/block/lib/editormanager.js
locomotive-aloha-rails-0.20.1.3 vendor/assets/javascripts/aloha/plugins/common/block/lib/editormanager.js