mirror of
https://github.com/Novaloop-AG/healthchat-web.git
synced 2026-11-26 11:38:37 +00:00
move quote formatting out of react component
This commit is contained in:
+1
-1
@@ -45,7 +45,7 @@ export function getCaretOffsetAndText(editor, sel) {
|
||||
return {caret: offset, text};
|
||||
}
|
||||
|
||||
export function getSelectionOffsetAndText(editor, selectionNode, selectionOffset) {
|
||||
function getSelectionOffsetAndText(editor, selectionNode, selectionOffset) {
|
||||
// sometimes selectionNode is an element, and then selectionOffset means
|
||||
// the index of a child element ... - 1 🤷
|
||||
if (selectionNode.nodeType === Node.ELEMENT_NODE && selectionOffset !== 0) {
|
||||
|
||||
Reference in New Issue
Block a user