Sha256: 71a3b0cc2d053d6b8b8cec77caa8f6c78ed36ed6c1e0ba52df719f66182b44ff

Contents?: true

Size: 986 Bytes

Versions: 15

Compression:

Stored size: 986 Bytes

Contents

(function(punymce) {
	punymce.plugins.Link = function(ed) {
		var I18n = punymce.I18n;

		if (!ed.settings.link || ed.settings.link.skip_css)
			punymce.DOM.loadCSS(punymce.baseURL + '/plugins/link/css/editor.css');

		// Add image command
		punymce.extend(ed.commands, {
			mceInsertLink : function(u, v, e) {
				var tx, f = ed.selection.getNode();

				tx = prompt(I18n.enterhref, f.nodeName == "A" ? ed.dom.getAttr(f, "href") : "");
				if (tx) {
					if (ed.selection.isCollapsed())
						ed.selection.setContent('<a href="' + tx + '">' + tx + '</a>');
					else
						ed.execCommand('CreateLink', 0, tx);
				}
			}
		});

		// Add tools
		punymce.extend(ed.tools, {
			link : {cmd : 'mceInsertLink', title : I18n.link},
			unlink : {cmd : 'Unlink', title : I18n.unlink}
		});
	};

	// English i18n strings
	punymce.extend(punymce.I18n, {
		link : 'Insert link',
		unlink : 'Unlink',
		enterhref : 'Enter the URL of the link'
	});
})(punymce);

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
radiant-forum-extension-2.1.6 public/punymce/plugins/link/link_src.js
radiant-forum-extension-2.1.4 public/punymce/plugins/link/link_src.js
radiant-forum-extension-2.1.3 public/punymce/plugins/link/link_src.js
radiant-forum-extension-2.1.2 public/punymce/plugins/link/link_src.js
radiant-forum-extension-2.1.1 public/punymce/plugins/link/link_src.js
radiant-forum-extension-2.0.9 public/punymce/plugins/link/link_src.js
radiant-forum-extension-2.0.8 public/punymce/plugins/link/link_src.js
radiant-forum-extension-2.0.7 public/punymce/plugins/link/link_src.js
radiant-forum-extension-2.0.6 public/punymce/plugins/link/link_src.js
radiant-forum-extension-2.0.5 public/punymce/plugins/link/link_src.js
radiant-forum-extension-2.0.4 public/punymce/plugins/link/link_src.js
radiant-forum-extension-2.0.3 public/punymce/plugins/link/link_src.js
radiant-forum-extension-2.0.2 public/punymce/plugins/link/link_src.js
radiant-forum-extension-2.0.1 public/punymce/plugins/link/link_src.js
radiant-forum-extension-2.0.0 public/punymce/plugins/link/link_src.js