mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-04-30 03:16:25 +02:00
fix: pull-based clipboard text and cursor at end with br
This commit is contained in:
parent
4a5a28805d
commit
f3d6ae95e1
5 changed files with 16 additions and 21 deletions
|
|
@ -119,7 +119,9 @@ export const InlineMentionEditor = forwardRef<InlineMentionEditorRef, InlineMent
|
|||
|
||||
useEffect(() => {
|
||||
if (!initialText || !editorRef.current) return;
|
||||
editorRef.current.textContent = initialText + "\n";
|
||||
editorRef.current.innerText = initialText;
|
||||
editorRef.current.appendChild(document.createElement("br"));
|
||||
editorRef.current.appendChild(document.createElement("br"));
|
||||
setIsEmpty(false);
|
||||
onChange?.(initialText, Array.from(mentionedDocs.values()));
|
||||
editorRef.current.focus();
|
||||
|
|
|
|||
|
|
@ -332,7 +332,7 @@ const Composer: FC = () => {
|
|||
|
||||
const [quickAskText, setQuickAskText] = useState<string | undefined>();
|
||||
useEffect(() => {
|
||||
return window.electronAPI?.onQuickAskText((text) => {
|
||||
window.electronAPI?.getQuickAskText().then((text) => {
|
||||
if (text) setQuickAskText(text);
|
||||
});
|
||||
}, []);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue