9
board/static/board/post.js
Normal file
9
board/static/board/post.js
Normal file
@@ -0,0 +1,9 @@
|
||||
function doQuote(sender) {
|
||||
let id_text = $("#id_text");
|
||||
let caret = id_text[0].selectionStart;
|
||||
let text = id_text.val();
|
||||
let to_add = ">>" + sender.target.innerText + "\n";
|
||||
id_text.val(text.substring(0, caret) + to_add + text.substring(caret));
|
||||
}
|
||||
|
||||
$(document).on("click", ".post_id", doQuote);
|
||||
Reference in New Issue
Block a user