mirror of
https://github.com/usememos/memos.git
synced 2025-06-05 22:09:59 +02:00
feat: tag suggestions (#2036)
* feat: figure out how to read caret position * feat: figure out how to read caret position * feat: create and style Editor/TagSuggestions.txs * feat: progress on detect when to show and hide * feat: progress on when to show and hide and setting position * feat: toggling and exact placement done * fix: pnpm lock problems * feat: filter suggestions by partially typed tag name * style: prettier * chore: add types package for textarea-caret * feat: handle option click * style: prettier * style: reorder imports Co-authored-by: boojack <stevenlgtm@gmail.com> --------- Co-authored-by: boojack <stevenlgtm@gmail.com>
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
import { forwardRef, ReactNode, useCallback, useEffect, useImperativeHandle, useRef } from "react";
|
||||
import TagSuggestions from "./TagSuggestions";
|
||||
import "@/less/editor.less";
|
||||
|
||||
export interface EditorRefActions {
|
||||
@ -134,6 +135,7 @@ const Editor = forwardRef(function Editor(props: Props, ref: React.ForwardedRef<
|
||||
onPaste={onPaste}
|
||||
onInput={handleEditorInput}
|
||||
></textarea>
|
||||
<TagSuggestions editorRef={editorRef} editorActions={ref} />
|
||||
</div>
|
||||
);
|
||||
});
|
||||
|
Reference in New Issue
Block a user