feat/enh: create note from input

This commit is contained in:
Timothy Jaeryang Baek
2025-12-09 20:49:46 -05:00
parent 65d4b22c7c
commit 00c2b6ca40
5 changed files with 93 additions and 20 deletions

View File

@@ -107,7 +107,7 @@ export const downloadPdf = async (note) => {
pdf.save(`${note.title}.pdf`);
};
export const createNoteHandler = async (title: string, content?: string) => {
export const createNoteHandler = async (title: string, md?: string, html?: string) => {
// $i18n.t('New Note'),
const res = await createNewNote(localStorage.token, {
// YYYY-MM-DD
@@ -115,8 +115,8 @@ export const createNoteHandler = async (title: string, content?: string) => {
data: {
content: {
json: null,
html: content ?? '',
md: content ?? ''
html: html || md || '',
md: md || ''
}
},
meta: null,