fix: automatically convert Super notes to Markdown for the Plaintext Backups feature

This commit is contained in:
Mo
2023-05-02 15:37:23 -05:00
parent 2eddc3a1c6
commit 75ecf4c393
11 changed files with 88 additions and 48 deletions

View File

@@ -6,7 +6,7 @@ import Icon from '../Icon/Icon'
import Modal, { ModalAction } from '../Modal/Modal'
import { EditorMenuItem } from '../NotesOptions/EditorMenuItem'
import { NoteViewController } from '../NoteView/Controller/NoteViewController'
import { exportSuperNote } from './SuperNoteExporter'
import { InvisibleSuperConverter } from './Tools/InvisibleMarkdownConverter'
const SuperNoteConverter = ({
note,
@@ -47,7 +47,7 @@ const SuperNoteConverter = ({
return note.text
}
return exportSuperNote(note, format)
return new InvisibleSuperConverter().convertString(note.text, format)
}, [format, note])
const componentViewer = useMemo(() => {