X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/b9558104eca9970ffba7f8e461e4878e70214114..796338e669626012da93ebea5ec7afa482a70ed7:/src/editor/plugins/core/core.js diff --git a/src/editor/plugins/core/core.js b/src/editor/plugins/core/core.js index ade5d93..935b6d4 100644 --- a/src/editor/plugins/core/core.js +++ b/src/editor/plugins/core/core.js @@ -266,7 +266,11 @@ var createLinkFromSelection = function(callback, params) { executeButtonText: gettext('Apply'), cancelButtonText: gettext('Cancel'), fields: [ - {label: gettext('Link'), name: 'href', type: 'input'} + {label: gettext('Link'), name: 'href', type: 'input', + prePasteHandler: function(text) { + return params.fragment.document.getLinkForUrl(text); + }.bind(this) + } ] }), action = this;