createlink-base-debug.js revision 1e44d35dd310d594ecc977ee4ed7cf6ef3746045
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Adds prompt style link creation. Adds an override for the <a href="Plugin.ExecCommand.html#method_COMMANDS.createlink">createlink execCommand</a>.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * @module editor
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * @submodule createlink-base
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Adds prompt style link creation. Adds an override for the <a href="Plugin.ExecCommand.html#method_COMMANDS.createlink">createlink execCommand</a>.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * @class Plugin.CreateLinkBase
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Strings used by the plugin
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * @property STRINGS
dc20a3024900c47dd2ee44b9707e6df38f7d62a5as * String used for the Prompt
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * @property PROMPT
8d96b23e24cf8db8618f698bfa580a25d7dc6029Alan Wright PROMPT: 'Please enter the URL for the link to point to:',
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * String used as the default value of the Prompt
8d96b23e24cf8db8618f698bfa580a25d7dc6029Alan Wright * @property DEFAULT
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Override for the createlink method from the <a href="Plugin.CreateLinkBase.html">CreateLinkBase</a> plugin.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * @for ExecCommand
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * @method COMMANDS.createlink
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * @param {String} cmd The command executed: createlink
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * @return {Node} Node instance of the item touched by this command.
dc20a3024900c47dd2ee44b9707e6df38f7d62a5as url = prompt(CreateLinkBase.STRINGS.PROMPT, CreateLinkBase.STRINGS.DEFAULT);
8d96b23e24cf8db8618f698bfa580a25d7dc6029Alan Wright //We have a selection
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw //No selection, insert a new node..
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw this.get('host').execCommand('inserthtml', '<a href="' + url + '">' + url + '</a>');
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw}, '@VERSION@' ,{requires:['editor-base'], skinnable:false});