diff --git a/package.json b/package.json index bd113d31a..d2673b115 100644 --- a/package.json +++ b/package.json @@ -62,6 +62,7 @@ "sharp": "^0.32.6", "svelte-easy-crop": "^2.0.1", "tailwind-merge": "^2.0.0", - "theme-change": "^2.5.0" + "theme-change": "^2.5.0", + "tiptap-markdown": "^0.8.4" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c329d6622..dfc7eb640 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -53,6 +53,9 @@ dependencies: theme-change: specifier: ^2.5.0 version: 2.5.0 + tiptap-markdown: + specifier: ^0.8.4 + version: 0.8.4(@tiptap/core@2.1.11) devDependencies: '@clack/prompts': @@ -958,6 +961,21 @@ packages: resolution: {integrity: sha512-RbSSoHliUbnXj3ny0CNFOoxrIDV6SUGyStHsvDqosw6CkdPV8TtWGlfecuK4ToyMEAql6pzNxgCFKanovUzlgQ==} dev: true + /@types/linkify-it@3.0.5: + resolution: {integrity: sha512-yg6E+u0/+Zjva+buc3EIb+29XEg4wltq7cSmd4Uc2EE/1nUVmxyzpX6gUXD0V8jIrG0r7YeOGVIbYRkxeooCtw==} + dev: false + + /@types/markdown-it@12.2.3: + resolution: {integrity: sha512-GKMHFfv3458yYy+v/N8gjufHO6MSZKCOXpZc5GXIWWy8uldwfmPn98vp81gZ5f9SVw8YYBctgfJ22a2d7AOMeQ==} + dependencies: + '@types/linkify-it': 3.0.5 + '@types/mdurl': 1.0.5 + dev: false + + /@types/mdurl@1.0.5: + resolution: {integrity: sha512-6L6VymKTzYSrEf4Nev4Xa1LCHKrlTlYCBMTlQKFuddo1CvQcE52I0mwfOJayueUC7MJuXOeHTcIU683lzd0cUA==} + dev: false + /@types/node@20.8.2: resolution: {integrity: sha512-Vvycsc9FQdwhxE3y3DzeIxuEJbWGDsnrxvMADzTDF/lcdR9/K+AQIeAghTQsHtotg/q0j3WEOYS/jQgSdWue3w==} @@ -2458,6 +2476,10 @@ packages: resolution: {integrity: sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==} dev: false + /markdown-it-task-lists@2.1.1: + resolution: {integrity: sha512-TxFAc76Jnhb2OUu+n3yz9RMu4CwGfaT788br6HhEDlvWfdeJcLUsxk1Hgw2yJio0OXsxv7pyIPmvECY7bMbluA==} + dev: false + /markdown-it@13.0.2: resolution: {integrity: sha512-FtwnEuuK+2yVU7goGn/MJ0WBZMM9ZPgU9spqlFs7/A/pDIUNSOQZhUgOqYCficIuR2QaFnrt8LHqBWsbTAoI5w==} hasBin: true @@ -3729,6 +3751,18 @@ packages: globalyzer: 0.1.0 globrex: 0.1.2 + /tiptap-markdown@0.8.4(@tiptap/core@2.1.11): + resolution: {integrity: sha512-aCwr8cpVdZeb/2J0ffz8PvpLmQBcFE9GOxk2vB0Y9zlJEGWnSiGo1BWnwaeiyAdQqfBzV7NyNg+oz2A/MbC/Sg==} + peerDependencies: + '@tiptap/core': ^2.0.3 + dependencies: + '@tiptap/core': 2.1.11(@tiptap/pm@2.1.11) + '@types/markdown-it': 12.2.3 + markdown-it: 13.0.2 + markdown-it-task-lists: 2.1.1 + prosemirror-markdown: 1.11.2 + dev: false + /to-regex-range@5.0.1: resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} engines: {node: '>=8.0'} diff --git a/src/lib/components/MarkdownEditor.svelte b/src/lib/components/MarkdownEditor.svelte new file mode 100644 index 000000000..9d4e0e869 --- /dev/null +++ b/src/lib/components/MarkdownEditor.svelte @@ -0,0 +1,75 @@ + + +