auto-quote highlighted text
This commit is contained in:
parent
44ed5e8f56
commit
09bd4e2f42
@ -452,7 +452,13 @@ quickReply: (e) ->
|
|||||||
|
|
||||||
textarea: $('textarea', qr)
|
textarea: $('textarea', qr)
|
||||||
#goddamit moot
|
#goddamit moot
|
||||||
|
#xx
|
||||||
textarea.value += '>>' + this.parentNode.id.match(/\d+$/)[0] + '\n'
|
textarea.value += '>>' + this.parentNode.id.match(/\d+$/)[0] + '\n'
|
||||||
|
selection: window.getSelection()
|
||||||
|
selid: x('ancestor::td', selection.anchorNode)?.id
|
||||||
|
if selid == x('ancestor::td', this).id
|
||||||
|
if selText: selection.toString()
|
||||||
|
textarea.value += ">$selText\n"
|
||||||
textarea.focus()
|
textarea.focus()
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -462,7 +462,7 @@ cursor: pointer; \
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
quickReply = function quickReply(e) {
|
quickReply = function quickReply(e) {
|
||||||
var a, clone, div, input, qr, textarea, xpath;
|
var _c, a, clone, div, input, qr, selText, selection, selid, textarea, xpath;
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
if (!(qr = $('#qr'))) {
|
if (!(qr = $('#qr'))) {
|
||||||
qr = tag('div');
|
qr = tag('div');
|
||||||
@ -503,7 +503,11 @@ cursor: pointer; \
|
|||||||
}
|
}
|
||||||
textarea = $('textarea', qr);
|
textarea = $('textarea', qr);
|
||||||
//goddamit moot
|
//goddamit moot
|
||||||
|
//xx
|
||||||
textarea.value += '>>' + this.parentNode.id.match(/\d+$/)[0] + '\n';
|
textarea.value += '>>' + this.parentNode.id.match(/\d+$/)[0] + '\n';
|
||||||
|
selection = window.getSelection();
|
||||||
|
selid = (_c = x('ancestor::td', selection.anchorNode)) == undefined ? undefined : _c.id;
|
||||||
|
selid === x('ancestor::td', this).id ? (selText = selection.toString()) ? textarea.value += (">" + selText + "\n") : null : null;
|
||||||
return textarea.focus();
|
return textarea.focus();
|
||||||
};
|
};
|
||||||
watch = function watch() {
|
watch = function watch() {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user