Sha256: 2adf44e97865daddc6e6e0f7bd409114fe10781a08f439f7cc550e69c84cd930

Contents?: true

Size: 1.67 KB

Versions: 186

Compression:

Stored size: 1.67 KB

Contents

/**
 * editor_plugin_src.js
 *
 * Copyright 2012, Moxiecode Systems AB
 * Released under LGPL License.
 *
 * License: http://tinymce.moxiecode.com/license
 * Contributing: http://tinymce.moxiecode.com/contributing
 */

(function() {
	tinymce.create('tinymce.plugins.VisualBlocks', {
		init : function(ed, url) {
			var cssId;

			// We don't support older browsers like IE6/7 and they don't provide prototypes for DOM objects
			if (!window.NodeList) {
				return;
			}

			ed.addCommand('mceVisualBlocks', function() {
				var dom = ed.dom, linkElm;

				if (!cssId) {
					cssId = dom.uniqueId();
					linkElm = dom.create('link', {
						id: cssId,
						rel : 'stylesheet',
						href : url + '/css/visualblocks.css'
					});

					ed.getDoc().getElementsByTagName('head')[0].appendChild(linkElm);
				} else {
					linkElm = dom.get(cssId);
					linkElm.disabled = !linkElm.disabled;
				}

				ed.controlManager.setActive('visualblocks', !linkElm.disabled);
			});

			ed.addButton('visualblocks', {title : 'visualblocks.desc', cmd : 'mceVisualBlocks'});

			ed.onInit.add(function() {
				if (ed.settings.visualblocks_default_state) {
					ed.execCommand('mceVisualBlocks', false, null, {skip_focus : true});
				}
			});
		},

		getInfo : function() {
			return {
				longname : 'Visual blocks',
				author : 'Moxiecode Systems AB',
				authorurl : 'http://tinymce.moxiecode.com',
				infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/visualblocks',
				version : tinymce.majorVersion + "." + tinymce.minorVersion
			};
		}
	});

	// Register plugin
	tinymce.PluginManager.add('visualblocks', tinymce.plugins.VisualBlocks);
})();

Version data entries

186 entries across 184 versions & 8 rubygems

Version Path
goldencobra-2.3.4 app/assets/javascripts/goldencobra/html_editors/tinymce_v3/plugins/visualblocks/editor_plugin_src.js
goldencobra-2.3.3 app/assets/javascripts/goldencobra/html_editors/tinymce_v3/plugins/visualblocks/editor_plugin_src.js
wagn-1.21.1 rails/assets/tinymce/plugins/visualblocks/editor_plugin_src.js
wagn-1.21.0 rails/assets/tinymce/plugins/visualblocks/editor_plugin_src.js
wagn-1.20.4 rails/assets/tinymce/plugins/visualblocks/editor_plugin_src.js
wagn-1.20.3 rails/assets/tinymce/plugins/visualblocks/editor_plugin_src.js
wagn-1.20.2 rails/assets/tinymce/plugins/visualblocks/editor_plugin_src.js
wagn-1.20.1 rails/assets/tinymce/plugins/visualblocks/editor_plugin_src.js
wagn-1.20.0 rails/assets/tinymce/plugins/visualblocks/editor_plugin_src.js
ish_lib-0.0.8 vendor/assets/javascripts/.trash/tinymce/plugins/visualblocks/editor_plugin_src.js
ish_lib-0.0.8 vendor/assets/themeforest/alpona/html/js/tiny_mce/plugins/visualblocks/editor_plugin_src.js
wagn-1.19.6 rails/assets/tinymce/plugins/visualblocks/editor_plugin_src.js
wagn-1.19.5 rails/assets/tinymce/plugins/visualblocks/editor_plugin_src.js
wagn-1.19.4 rails/assets/tinymce/plugins/visualblocks/editor_plugin_src.js
wagn-1.19.3 rails/assets/tinymce/plugins/visualblocks/editor_plugin_src.js
wagn-1.19.2 rails/assets/tinymce/plugins/visualblocks/editor_plugin_src.js
wagn-1.19.1 rails/assets/tinymce/plugins/visualblocks/editor_plugin_src.js
wagn-1.19.0 rails/assets/tinymce/plugins/visualblocks/editor_plugin_src.js
tinymce-rails-3.5.11.1 vendor/assets/javascripts/tinymce/plugins/visualblocks/editor_plugin_src.js
wagn-1.18.6 rails/assets/tinymce/plugins/visualblocks/editor_plugin_src.js