fnp
/
fnpeditor.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
editor: automatically convert pasted urls to attachments to a proper links with ...
[fnpeditor.git]
/
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
(file)
--- 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: [
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;
]
}),
action = this;