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
wagn-1.16.8 rails/assets/tinymce/plugins/visualblocks/editor_plugin_src.js
wagn-1.16.7 rails/assets/tinymce/plugins/visualblocks/editor_plugin_src.js
wagn-1.16.6 rails/assets/tinymce/plugins/visualblocks/editor_plugin_src.js
wagn-1.16.5 rails/assets/tinymce/plugins/visualblocks/editor_plugin_src.js
wagn-1.16.4 rails/assets/tinymce/plugins/visualblocks/editor_plugin_src.js
wagn-1.16.3 rails/assets/tinymce/plugins/visualblocks/editor_plugin_src.js
wagn-1.16.2 rails/assets/tinymce/plugins/visualblocks/editor_plugin_src.js
wagn-1.16.1 rails/assets/tinymce/plugins/visualblocks/editor_plugin_src.js
wagn-1.16.0 rails/assets/tinymce/plugins/visualblocks/editor_plugin_src.js
tinymce-rails-3.5.11 vendor/assets/javascripts/tinymce/plugins/visualblocks/editor_plugin_src.js
wagn-1.15.7 rails/assets/tinymce/plugins/visualblocks/editor_plugin_src.js
wagn-1.15.6 rails/assets/tinymce/plugins/visualblocks/editor_plugin_src.js
wagn-1.15.5 rails/assets/tinymce/plugins/visualblocks/editor_plugin_src.js
wagn-1.15.4 rails/assets/tinymce/plugins/visualblocks/editor_plugin_src.js
wagn-1.15.3 rails/assets/tinymce/plugins/visualblocks/editor_plugin_src.js
wagn-1.15.2 rails/assets/tinymce/plugins/visualblocks/editor_plugin_src.js
wagn-1.15.1 rails/assets/tinymce/plugins/visualblocks/editor_plugin_src.js
wagn-1.15.0 rails/assets/tinymce/plugins/visualblocks/editor_plugin_src.js
wagn-1.15.pre2 rails/assets/tinymce/plugins/visualblocks/editor_plugin_src.js
wagn-1.15.pre rails/assets/tinymce/plugins/visualblocks/editor_plugin_src.js