mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-02-24 15:41:14 +01:00
chore: up deps
move blockquote style to generics.scss get rid of voodoo selection code, selection.toString() seems to work
This commit is contained in:
@@ -91,7 +91,7 @@
|
||||
"multiparty": "4.2.3",
|
||||
"nconf": "0.12.0",
|
||||
"nodebb-plugin-2factor": "6.0.2",
|
||||
"nodebb-plugin-composer-default": "10.0.11",
|
||||
"nodebb-plugin-composer-default": "10.0.12",
|
||||
"nodebb-plugin-dbsearch": "6.0.0",
|
||||
"nodebb-plugin-emoji": "5.0.2",
|
||||
"nodebb-plugin-emoji-android": "4.0.0",
|
||||
@@ -100,7 +100,7 @@
|
||||
"nodebb-plugin-spam-be-gone": "2.0.1",
|
||||
"nodebb-rewards-essentials": "0.2.1",
|
||||
"nodebb-theme-peace": "2.0.5",
|
||||
"nodebb-theme-persona": "13.0.11",
|
||||
"nodebb-theme-persona": "13.0.12",
|
||||
"nodebb-widget-essentials": "7.0.1",
|
||||
"nodemailer": "6.7.8",
|
||||
"nprogress": "0.2.0",
|
||||
|
||||
@@ -126,6 +126,15 @@
|
||||
}
|
||||
}
|
||||
|
||||
blockquote {
|
||||
font-style: italic;
|
||||
border-left: 4px solid $primary;
|
||||
padding: 1rem;
|
||||
p:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.necro-post {
|
||||
text-align: center;
|
||||
text-transform: uppercase;
|
||||
|
||||
@@ -331,22 +331,11 @@ define('forum/topic/postTools', [
|
||||
}
|
||||
});
|
||||
|
||||
if (content) {
|
||||
const bounds = document.createRange();
|
||||
bounds.selectNodeContents(content);
|
||||
const range = selection.getRangeAt(0).cloneRange();
|
||||
if (range.compareBoundaryPoints(Range.START_TO_START, bounds) < 0) {
|
||||
range.setStart(bounds.startContainer, bounds.startOffset);
|
||||
}
|
||||
if (range.compareBoundaryPoints(Range.END_TO_END, bounds) > 0) {
|
||||
range.setEnd(bounds.endContainer, bounds.endOffset);
|
||||
}
|
||||
bounds.detach();
|
||||
selectedText = range.toString();
|
||||
if (content && selection) {
|
||||
selectedText = selection.toString();
|
||||
const postEl = $(content).parents('[component="post"]');
|
||||
selectedPid = postEl.attr('data-pid');
|
||||
username = await getUserSlug($(content));
|
||||
range.detach();
|
||||
}
|
||||
return { text: selectedText, pid: selectedPid, username: username };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user