Sha256: ec69404e1d67c995634ab299b9f0a6f1147a00adc14df312d7ca88a6a60ee8f4

Contents?: true

Size: 1.46 KB

Versions: 35

Compression:

Stored size: 1.46 KB

Contents

/**
 * Modified version of advlink
 * @author Tatemae
 * @copyright Copyright © 2009, Tatemae, All rights reserved.
 */
(function() {
	tinymce.create('tinymce.plugins.MuckLink', {
		init : function(ed, url) {
			this.editor = ed;
			// Register commands
			ed.addCommand('mceMuckLink', function() {
				var se = ed.selection;
				// No selection and not in link
				if (se.isCollapsed() && !ed.dom.getParent(se.getNode(), 'A'))
					return;
				ed.windowManager.open({
					file : jQuery('#tiny_mce_links_path').val(),
					width : parseInt(jQuery('#tiny_mce_links_width').val()) + parseInt(ed.getLang('mucklink.delta_width', 0)),
					height : parseInt(jQuery('#tiny_mce_links_height').val()) + parseInt(ed.getLang('mucklink.delta_height', 0)),
					inline : 1
				}, {
					plugin_url : url
				});
			});
			// Register buttons
			ed.addButton('mucklink', {
				title : 'Create Link',
				cmd : 'mceMuckLink',
				image : '/images/tinymce/link.jpg'
			});
			ed.addShortcut('ctrl+k', 'Create Link', 'mceMuckLink');
			ed.onNodeChange.add(function(ed, cm, n, co) {
				cm.setDisabled('link', co && n.nodeName != 'A');
				cm.setActive('link', n.nodeName == 'A' && !n.name);
			});
		},
		getInfo : function() {
			return {
				longname : 'Advanced file',
				author : 'Tatemae',
				authorurl : 'http://Tatemae.com',
				version : tinymce.majorVersion + "." + tinymce.minorVersion
			};
		}
	});
	// Register plugin
	tinymce.PluginManager.add('mucklink', tinymce.plugins.MuckLink);
})();

Version data entries

35 entries across 32 versions & 8 rubygems

Version Path
muck-activities-3.2.2 test/public/javascripts/tiny_mce/plugins/mucklink/editor_plugin.js
muck-activities-3.2.1 test/public/javascripts/tiny_mce/plugins/mucklink/editor_plugin.js
muck-services-3.3.3 test/public/javascripts/tiny_mce/plugins/mucklink/editor_plugin.js
muck-profiles-3.1.4 test/public/javascripts/tiny_mce/plugins/mucklink/editor_plugin.js
muck-auth-3.5.4 test/public/javascripts/tiny_mce/plugins/mucklink/editor_plugin.js
muck-auth-3.5.3 test/public/javascripts/tiny_mce/plugins/mucklink/editor_plugin.js
muck-profiles-3.1.3 test/public/javascripts/tiny_mce/plugins/mucklink/editor_plugin.js
muck-auth-3.5.2 test/public/javascripts/tiny_mce/plugins/mucklink/editor_plugin.js
muck-contents-3.1.7 public/javascripts/tiny_mce/plugins/mucklink/editor_plugin.js
muck-invites-3.4.1 test/public/javascripts/tiny_mce/plugins/mucklink/editor_plugin.js
muck-contents-3.1.6 public/javascripts/tiny_mce/plugins/mucklink/editor_plugin.js
muck-contents-3.1.5 public/javascripts/tiny_mce/plugins/mucklink/editor_plugin.js
muck-contents-3.1.4 public/javascripts/tiny_mce/plugins/mucklink/editor_plugin.js
muck-contents-3.1.3 public/javascripts/tiny_mce/plugins/mucklink/editor_plugin.js
muck-contents-3.1.2 public/javascripts/tiny_mce/plugins/mucklink/editor_plugin.js
muck-contents-3.1.1 public/javascripts/tiny_mce/plugins/mucklink/editor_plugin.js
muck-contents-3.1.0 public/javascripts/tiny_mce/plugins/mucklink/editor_plugin.js
muck-contents-3.0.2 public/javascripts/tiny_mce/plugins/mucklink/editor_plugin.js
muck-contents-3.0.2 test/rails_test/public/javascripts/tiny_mce/plugins/mucklink/editor_plugin.js
muck-profiles-3.0.2 test/rails_test/public/javascripts/tiny_mce/plugins/mucklink/editor_plugin.js