diff --git a/ElectronClient/gui/NoteEditor/NoteBody/AceEditor/AceEditor.tsx b/ElectronClient/gui/NoteEditor/NoteBody/AceEditor/AceEditor.tsx index 93841f3b78..7d2b915b6e 100644 --- a/ElectronClient/gui/NoteEditor/NoteBody/AceEditor/AceEditor.tsx +++ b/ElectronClient/gui/NoteEditor/NoteBody/AceEditor/AceEditor.tsx @@ -228,9 +228,6 @@ function AceEditor(props: NoteBodyEditorProps, ref: any) { useImperativeHandle(ref, () => { return { content: () => props.content, - setContent: (body: string) => { - aceEditor_change(body); - }, resetScroll: () => { resetScroll(); }, @@ -246,11 +243,6 @@ function AceEditor(props: NoteBodyEditorProps, ref: any) { throw new Error(`Unsupported scroll options: ${options.type}`); } }, - clearState: () => { - if (!editor) return; - editor.clearSelection(); - editor.moveCursorTo(0, 0); - }, supportsCommand: (/* name:string*/) => { // TODO: not implemented, currently only used for "search" command // which is not directly supported by Ace Editor. diff --git a/ElectronClient/gui/NoteEditor/NoteBody/TinyMCE/TinyMCE.tsx b/ElectronClient/gui/NoteEditor/NoteBody/TinyMCE/TinyMCE.tsx index 85f305ee97..ec0d81a7d5 100644 --- a/ElectronClient/gui/NoteEditor/NoteBody/TinyMCE/TinyMCE.tsx +++ b/ElectronClient/gui/NoteEditor/NoteBody/TinyMCE/TinyMCE.tsx @@ -199,9 +199,6 @@ const TinyMCE = (props:NoteBodyEditorProps, ref:any) => { if (!editorRef.current) return ''; return prop_htmlToMarkdownRef.current(props.contentMarkupLanguage, editorRef.current.getContent(), props.contentOriginalCss); }, - setContent: (/* body: string*/) => { - console.warn('TinyMCE::setContent - not implemented'); - }, resetScroll: () => { if (editor) editor.getWin().scrollTo(0,0); }, @@ -220,11 +217,6 @@ const TinyMCE = (props:NoteBodyEditorProps, ref:any) => { } else { throw new Error(`Unsupported scroll options: ${options.type}`); } - - - }, - clearState: () => { - console.warn('TinyMCE::clearState - not implemented'); }, supportsCommand: (name:string) => { // TODO: should also handle commands that are not in this map (insertText, focus, etc); diff --git a/ElectronClient/gui/NoteEditor/NoteEditor.tsx b/ElectronClient/gui/NoteEditor/NoteEditor.tsx index 70eb52ae95..58c964b92b 100644 --- a/ElectronClient/gui/NoteEditor/NoteEditor.tsx +++ b/ElectronClient/gui/NoteEditor/NoteEditor.tsx @@ -15,7 +15,7 @@ import useDropHandler from './utils/useDropHandler'; import useMarkupToHtml from './utils/useMarkupToHtml'; import useFormNote, { OnLoadEvent } from './utils/useFormNote'; import styles_ from './styles'; -import { NoteTextProps, FormNote, ScrollOptions, ScrollOptionTypes, OnChangeEvent, NoteBodyEditorProps } from './utils/types'; +import { NoteEditorProps, FormNote, ScrollOptions, ScrollOptionTypes, OnChangeEvent, NoteBodyEditorProps } from './utils/types'; import { attachResources } from './utils/resourceHandling'; const { themeStyle } = require('../../theme.js'); @@ -33,7 +33,7 @@ const eventManager = require('../../eventManager'); const NoteRevisionViewer = require('../NoteRevisionViewer.min'); const TagList = require('../TagList.min.js'); -function NoteEditor(props: NoteTextProps) { +function NoteEditor(props: NoteEditorProps) { const theme = themeStyle(props.theme); const [showRevisions, setShowRevisions] = useState(false); diff --git a/ElectronClient/gui/NoteEditor/styles/index.ts b/ElectronClient/gui/NoteEditor/styles/index.ts index dbf45a34d6..49556b97a9 100644 --- a/ElectronClient/gui/NoteEditor/styles/index.ts +++ b/ElectronClient/gui/NoteEditor/styles/index.ts @@ -1,8 +1,8 @@ -import { NoteTextProps } from '../utils/types'; +import { NoteEditorProps } from '../utils/types'; const { buildStyle } = require('../../../theme.js'); -export default function styles(props: NoteTextProps) { +export default function styles(props: NoteEditorProps) { return buildStyle('NoteEditor', props.theme, (theme: any) => { return { root: { diff --git a/ElectronClient/gui/NoteEditor/utils/types.ts b/ElectronClient/gui/NoteEditor/utils/types.ts index 2940018bbc..1f562955d8 100644 --- a/ElectronClient/gui/NoteEditor/utils/types.ts +++ b/ElectronClient/gui/NoteEditor/utils/types.ts @@ -1,7 +1,7 @@ // eslint-disable-next-line no-unused-vars import AsyncActionQueue from '../../../lib/AsyncActionQueue'; -export interface NoteTextProps { +export interface NoteEditorProps { style: any; noteId: string; theme: number;