diff --git a/components.d.ts b/components.d.ts index 979f1bd..cfaafa9 100644 --- a/components.d.ts +++ b/components.d.ts @@ -15,6 +15,7 @@ declare module 'vue' { EditorOptions: typeof import('./src/components/editor/EditorOptions.vue')['default'] EditorView: typeof import('./src/components/editor/EditorView.vue')['default'] ElementDropdown: typeof import('./src/components/editor/bubble-menu/ElementDropdown.vue')['default'] + FloatingMenu: typeof import('./src/components/editor/floating-menu/FloatingMenu.vue')['default'] GenericButton: typeof import('./src/components/generic/GenericButton.vue')['default'] GenericDialog: typeof import('./src/components/generic/GenericDialog.vue')['default'] GenericErrorMessage: typeof import('./src/components/generic/GenericErrorMessage.vue')['default'] diff --git a/docs/USER_MANUAL.md b/docs/USER_MANUAL.md index 2864486..26ea67b 100644 --- a/docs/USER_MANUAL.md +++ b/docs/USER_MANUAL.md @@ -118,7 +118,7 @@ There are several ways to create a new note in Slate: - Click any note name in the breadcrumb to navigate to that note

- Breadcrumb Navigation + Breadcrumb Navigation

### 3.3 Hierarchical Organization @@ -200,6 +200,7 @@ The Slate editor uses a WYSIWYG (What You See Is What You Get) approach, meaning **Editor Layout:** - **Breadcrumb Bar**: Shows the note's position in the hierarchy - **Bubble menu**: Access formatting options and editor actions +- **Floating menu**: A compact menu that appears on empty lines near the cursor to quickly insert lists, headings, or multimedia - **Content Area**: Where you write and edit your notes - **Focus Mode Toggle**: Switch to distraction-free writing @@ -393,7 +394,7 @@ Slate supports exporting your notes to multiple formats: **To export the current note:** 1. Make sure the note you want to export is open in the editor -2. Click the **More options** button (⋯) in the editor toolbar +2. Click the **Export** button in the editor toolbar 3. Choose the export format: - Plain Text - Markdown @@ -489,7 +490,7 @@ If you want to reset all settings to their original values: ## 10. Keyboard Shortcuts -Most of the editing actions in Slate can be performed using keyboard shortcuts. Below is a comprehensive list of available shortcuts: +Most of the editing actions in Slate can be performed using keyboard shortcuts. Below is a comprehensive list of all available shortcuts: ### Text Formatting diff --git a/docs/resources/images/app.png b/docs/resources/images/app.png index ccb95d5..390aad8 100644 Binary files a/docs/resources/images/app.png and b/docs/resources/images/app.png differ diff --git a/docs/resources/images/breadcrumb-navigation.gif b/docs/resources/images/breadcrumb-navigation.gif new file mode 100644 index 0000000..4f0c9ff Binary files /dev/null and b/docs/resources/images/breadcrumb-navigation.gif differ diff --git a/docs/resources/images/breadcrumb-navigation.png b/docs/resources/images/breadcrumb-navigation.png deleted file mode 100644 index 4d794e2..0000000 Binary files a/docs/resources/images/breadcrumb-navigation.png and /dev/null differ diff --git a/docs/resources/images/code-blocks.gif b/docs/resources/images/code-blocks.gif index 2ff14ea..a31b595 100644 Binary files a/docs/resources/images/code-blocks.gif and b/docs/resources/images/code-blocks.gif differ diff --git a/docs/resources/images/focus-mode.gif b/docs/resources/images/focus-mode.gif index beae141..70b234e 100644 Binary files a/docs/resources/images/focus-mode.gif and b/docs/resources/images/focus-mode.gif differ diff --git a/docs/resources/images/insert-image.gif b/docs/resources/images/insert-image.gif index e5a82df..8be4480 100644 Binary files a/docs/resources/images/insert-image.gif and b/docs/resources/images/insert-image.gif differ diff --git a/docs/resources/images/insert-pdf.gif b/docs/resources/images/insert-pdf.gif index 2ee6e8d..4725ab6 100644 Binary files a/docs/resources/images/insert-pdf.gif and b/docs/resources/images/insert-pdf.gif differ diff --git a/docs/resources/images/move-note.gif b/docs/resources/images/move-note.gif index cc28cbf..d81c8df 100644 Binary files a/docs/resources/images/move-note.gif and b/docs/resources/images/move-note.gif differ diff --git a/docs/resources/images/note-links.gif b/docs/resources/images/note-links.gif index 606300b..b08223b 100644 Binary files a/docs/resources/images/note-links.gif and b/docs/resources/images/note-links.gif differ diff --git a/docs/resources/images/settings.gif b/docs/resources/images/settings.gif index 345156e..0c6e47e 100644 Binary files a/docs/resources/images/settings.gif and b/docs/resources/images/settings.gif differ diff --git a/docs/resources/images/text-formatting.gif b/docs/resources/images/text-formatting.gif index 91aee14..a8adc78 100644 Binary files a/docs/resources/images/text-formatting.gif and b/docs/resources/images/text-formatting.gif differ diff --git a/package-lock.json b/package-lock.json index 9b33800..790cef7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -177,7 +177,6 @@ "integrity": "sha512-BU2f9tlKQ5CAthiMIgpzAh4eDTLWo1mqi9jqE2OxMG0E/OM199VJt2q8BztTxpnSW0i1ymdwLXRJnYzvDM5r2w==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@ampproject/remapping": "^2.2.0", "@babel/code-frame": "^7.27.1", @@ -759,7 +758,6 @@ } ], "license": "MIT", - "peer": true, "engines": { "node": ">=18" }, @@ -783,7 +781,6 @@ } ], "license": "MIT", - "peer": true, "engines": { "node": ">=18" } @@ -1514,7 +1511,6 @@ "integrity": "sha512-zx0EIq78WlY/lBb1uXlziZmDZI4ubcCXIMJ4uGjXzZW0nS19TjSPeXPAjzzTmKQlJUZm0SbmZhPKP7tuQ1SsEw==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "chalk": "^4.1.1", "fs-extra": "^9.0.1", @@ -3736,7 +3732,6 @@ "resolved": "https://registry.npmjs.org/@tiptap/core/-/core-2.26.3.tgz", "integrity": "sha512-TaOJzu2v5ufsOx+yu94NqXE504zmupVdFCxH1g3hk5fzZ3gT57Lh9R/27OjwM4e6o+Z3DXDl8yfFMHIcR3zUkg==", "license": "MIT", - "peer": true, "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" @@ -3833,7 +3828,6 @@ "resolved": "https://registry.npmjs.org/@tiptap/extension-code-block/-/extension-code-block-2.26.3.tgz", "integrity": "sha512-3DbzKRfMqw9EGS7mGkpyopbRWTO+qpV52Mby4Ll2+OfhvGnHzSN4Q7xOsp+VeZr14GMEmua5Oq2e/gRypqXatQ==", "license": "MIT", - "peer": true, "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" @@ -4164,7 +4158,6 @@ "resolved": "https://registry.npmjs.org/@tiptap/pm/-/pm-2.26.3.tgz", "integrity": "sha512-8gUmdxWlUevmgq2mNvGxvf2CpDW097tVKECMWKEn8sf846kXv3CoqaGRhI3db4kfR+09uWZeRM7rtrjRBmUThg==", "license": "MIT", - "peer": true, "dependencies": { "prosemirror-changeset": "^2.3.0", "prosemirror-collab": "^1.3.1", @@ -4560,7 +4553,6 @@ "integrity": "sha512-ENHwaH+JIRTDIEEbDK6QSQntAYGtbvdDXnMXnZaZ6k13Du1dPMmprkEHIL7ok2Wl2aZevetwTAb5S+7yIF+enA==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "undici-types": "~7.8.0" } @@ -4755,7 +4747,6 @@ "integrity": "sha512-gTtSdWX9xiMPA/7MV9STjJOOYtWwIJIYxkQxnSV1U3xcE+mnJSH3f6zI0RYP+ew66WSlZ5ed+h0VCxsvdC1jJg==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@typescript-eslint/scope-manager": "8.41.0", "@typescript-eslint/types": "8.41.0", @@ -5329,7 +5320,6 @@ "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.5.16.tgz", "integrity": "sha512-rQR6VSFNpiinDy/DVUE0vHoIDUF++6p910cgcZoaAUm3POxgNOOdS/xgoll3rNdKYTYPnnbARDCZOyZ+QSe6Pw==", "license": "MIT", - "peer": true, "dependencies": { "@babel/parser": "^7.27.2", "@vue/compiler-core": "3.5.16", @@ -6012,7 +6002,6 @@ "integrity": "sha512-xP/9odQ9tt2pEuMgo0Oobklhu1lObgL1KmejZeyxVStwnrSTbFmn1AAqPq5pfXizUsyv2PR5+id9frrarx/c4w==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@types/node": "^20.11.30", "@types/sinonjs__fake-timers": "^8.1.5", @@ -6240,7 +6229,6 @@ "integrity": "sha512-iUTV8tpeHyZN08fhk6x4xm90wbPlms83UAn3HDiiJ1l5jf6wB7xfpbxG4Y6/tEGzUWyAevg69JXbgAZmfpBzqA==", "dev": true, "license": "MIT", - "peer": true, "engines": { "node": ">=18.20.0" }, @@ -6292,7 +6280,6 @@ "integrity": "sha512-BXx8RXFUW2M4dcO6t5Le95Hi2ZkTQBRsvBQqLekT2rZ6Xmw8ZKZBPf0FptnoftFGg6dYmwnDidYv/0+4PiHjpQ==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "chalk": "^5.1.2", "loglevel": "^1.6.0", @@ -6648,7 +6635,6 @@ "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", "dev": true, "license": "MIT", - "peer": true, "bin": { "acorn": "bin/acorn" }, @@ -7773,7 +7759,6 @@ } ], "license": "MIT", - "peer": true, "dependencies": { "caniuse-lite": "^1.0.30001688", "electron-to-chromium": "^1.5.73", @@ -9215,7 +9200,6 @@ "resolved": "https://registry.npmjs.org/css-render/-/css-render-0.15.14.tgz", "integrity": "sha512-9nF4PdUle+5ta4W5SyZdLCCmFd37uVimSjg1evcTqKJCyvCEEj12WKzOSBNak6r4im4J4iYXKH1OWpUV5LBYFg==", "license": "MIT", - "peer": true, "dependencies": { "@emotion/hash": "~0.8.0", "csstype": "~3.0.5" @@ -9369,7 +9353,6 @@ "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-3.6.0.tgz", "integrity": "sha512-fRHTG8g/Gif+kSh50gaGEdToemgfj74aRX3swtiouboip5JDLAyDE9F11nHMIcvOaXeOC6D7SpNhi7uFyB7Uww==", "license": "MIT", - "peer": true, "funding": { "type": "github", "url": "https://github.com/sponsors/kossnocorp" @@ -9697,8 +9680,7 @@ "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1312386.tgz", "integrity": "sha512-DPnhUXvmvKT2dFA/j7B+riVLUt9Q6RKJlcppojL5CoRywJJKLDYnRlw0gTFKfgDPHP5E04UoB71SxoJlVZy8FA==", "dev": true, - "license": "BSD-3-Clause", - "peer": true + "license": "BSD-3-Clause" }, "node_modules/didyoumean": { "version": "1.2.2", @@ -10825,6 +10807,17 @@ "node": ">= 0.8" } }, + "node_modules/encoding": { + "version": "0.1.13", + "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.13.tgz", + "integrity": "sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "iconv-lite": "^0.6.2" + } + }, "node_modules/encoding-sniffer": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/encoding-sniffer/-/encoding-sniffer-0.2.0.tgz", @@ -10852,6 +10845,20 @@ "node": ">=0.10.0" } }, + "node_modules/encoding/node_modules/iconv-lite": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/end-of-stream": { "version": "1.4.4", "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", @@ -11188,7 +11195,6 @@ "deprecated": "This version is no longer supported. Please see https://eslint.org/version-support for other options.", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.6.1", @@ -11663,7 +11669,6 @@ "integrity": "sha512-jH4qhahRNGPWbCCVcCpLDl/kvFJ1eOzVnrd1K/sG1RhKr6bZsgZQUiOE3bafVqSOfKP+ay8bM/VagP4+XsO9Xw==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@vitest/snapshot": "^3.2.4", "expect": "^30.0.0", @@ -13212,7 +13217,6 @@ "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-11.11.1.tgz", "integrity": "sha512-Xwwo44whKBVCYoliBQwaPvtd/2tYFkRQtXDWj1nackaV2JPXx3L0+Jvd8/qCJ2p+ML0/XVkJ2q+Mr+UVdpJK5w==", "license": "BSD-3-Clause", - "peer": true, "engines": { "node": ">=12.0.0" } @@ -15247,7 +15251,6 @@ "resolved": "https://registry.npmjs.org/lowlight/-/lowlight-3.3.0.tgz", "integrity": "sha512-0JNhgFoPvP6U6lE/UdVsSq99tn6DhjjpAj5MxG49ewd2mOBVtwWYIT8ClyABhq198aXXODMU6Ox8DrGy/CpTZQ==", "license": "MIT", - "peer": true, "dependencies": { "@types/hast": "^3.0.0", "devlop": "^1.0.0", @@ -17146,7 +17149,6 @@ } ], "license": "MIT", - "peer": true, "dependencies": { "nanoid": "^3.3.11", "picocolors": "^1.1.1", @@ -17540,7 +17542,6 @@ "resolved": "https://registry.npmjs.org/prosemirror-model/-/prosemirror-model-1.25.0.tgz", "integrity": "sha512-/8XUmxWf0pkj2BmtqZHYJipTBMHIdVjuvFzMvEoxrtyGNmfvdhBiRwYt/eFwy2wA9DtBW3RLqvZnjurEkHaFCw==", "license": "MIT", - "peer": true, "dependencies": { "orderedmap": "^2.0.0" } @@ -17570,7 +17571,6 @@ "resolved": "https://registry.npmjs.org/prosemirror-state/-/prosemirror-state-1.4.3.tgz", "integrity": "sha512-goFKORVbvPuAQaXhpbemJFRKJ2aixr+AZMGiquiqKxaucC6hlpHNZHWgz5R7dS4roHiwq9vDctE//CZ++o0W1Q==", "license": "MIT", - "peer": true, "dependencies": { "prosemirror-model": "^1.0.0", "prosemirror-transform": "^1.0.0", @@ -17619,7 +17619,6 @@ "resolved": "https://registry.npmjs.org/prosemirror-view/-/prosemirror-view-1.38.1.tgz", "integrity": "sha512-4FH/uM1A4PNyrxXbD+RAbAsf0d/mM0D/wAKSVVWK7o0A9Q/oOXJBrw786mBf2Vnrs/Edly6dH6Z2gsb7zWwaUw==", "license": "MIT", - "peer": true, "dependencies": { "prosemirror-model": "^1.20.0", "prosemirror-state": "^1.0.0", @@ -17779,7 +17778,6 @@ "integrity": "sha512-cHArnywCiAAVXa3t4GGL2vttNxh7GqXtIYGym99egkNJ3oG//wL9LkvO4WE8W1TJe95t1F1ocu9X4xWaGsOKOA==", "dev": true, "license": "Apache-2.0", - "peer": true, "dependencies": { "@puppeteer/browsers": "2.3.0", "chromium-bidi": "0.6.3", @@ -18711,7 +18709,6 @@ "integrity": "sha512-cPmwD3FnFv8rKMBc1MxWCwVQFxwf1JEmSX3iQXrRVVG15zerAIXRjMFVWnd5Q5QvgKF7Aj+5ykXFhUl+QGnyOw==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@types/estree": "1.0.7" }, @@ -20432,7 +20429,6 @@ "integrity": "sha512-6A2rnmW5xZMdw11LYjhcI5846rt9pbLSabY5XPxo+XWdxwZaFEn47Go4NzFiHu9sNNmr/kXivP1vStfvMaK1GQ==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@alloc/quick-lru": "^5.2.0", "arg": "^5.0.2", @@ -20780,7 +20776,6 @@ "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==", "dev": true, "license": "MIT", - "peer": true, "engines": { "node": ">=12" }, @@ -21029,7 +21024,6 @@ "integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@cspotcode/source-map-support": "^0.8.0", "@tsconfig/node10": "^1.0.7", @@ -21231,7 +21225,6 @@ "integrity": "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==", "devOptional": true, "license": "Apache-2.0", - "peer": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -21764,7 +21757,6 @@ "integrity": "sha512-+Oxm7q9hDoLMyJOYfUYBuHQo+dkAloi33apOPP56pzj+vsdJDzr+j1NISE5pyaAuKL4A3UD34qd0lx5+kfKp2g==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "esbuild": "^0.25.0", "fdir": "^6.4.4", @@ -21885,7 +21877,6 @@ "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==", "dev": true, "license": "MIT", - "peer": true, "engines": { "node": ">=12" }, @@ -21899,7 +21890,6 @@ "integrity": "sha512-LUCP5ev3GURDysTWiP47wRRUpLKMOfPh+yKTx3kVIEiu5KOMeqzpnYNsKyOoVrULivR8tLcks4+lga33Whn90A==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@types/chai": "^5.2.2", "@vitest/expect": "3.2.4", @@ -22042,7 +22032,6 @@ "resolved": "https://registry.npmjs.org/vue/-/vue-3.5.16.tgz", "integrity": "sha512-rjOV2ecxMd5SiAmof2xzh2WxntRcigkX/He4YFJ6WdRvVUrbt6DxC1Iujh10XLl8xCDRDtGKMeO3D+pRQ1PP9w==", "license": "MIT", - "peer": true, "dependencies": { "@vue/compiler-dom": "3.5.16", "@vue/compiler-sfc": "3.5.16", @@ -22282,7 +22271,6 @@ "integrity": "sha512-QQ+HFL1POqQwOeyb3cpu+PfJw73JXGzqKUH/tMTK9+pG3Dd3AfeXJIKJw0RJBPjEgv/D2Di8u/wk41Yf5Dce6g==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@types/node": "^20.11.30", "@types/sinonjs__fake-timers": "^8.1.5", @@ -22645,8 +22633,7 @@ "integrity": "sha512-c3Cp4eOVsYY5Q839dR5IejghRPpxciGmLWWaP9g+ppfMeBChMeLa1DCA+pmX/jyDZ+zxFOmlJL/82qVdayVoGQ==", "deprecated": "This package is now deprecated. Move to @xterm/xterm instead.", "dev": true, - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/xterm-addon-fit": { "version": "0.5.0", diff --git a/src/assets/icons/DockLeftNoFill.vue b/src/assets/icons/DockLeftNoFill.vue new file mode 100644 index 0000000..7978c20 --- /dev/null +++ b/src/assets/icons/DockLeftNoFill.vue @@ -0,0 +1,50 @@ + + + \ No newline at end of file diff --git a/src/assets/icons/HTML.vue b/src/assets/icons/HTML.vue new file mode 100644 index 0000000..2682f55 --- /dev/null +++ b/src/assets/icons/HTML.vue @@ -0,0 +1,42 @@ + + + \ No newline at end of file diff --git a/src/assets/icons/Markdown.vue b/src/assets/icons/Markdown.vue new file mode 100644 index 0000000..ee8bcb0 --- /dev/null +++ b/src/assets/icons/Markdown.vue @@ -0,0 +1,42 @@ + + + \ No newline at end of file diff --git a/src/business/domain/Settings.ts b/src/business/domain/Settings.ts index 5db077d..d9c4f45 100644 --- a/src/business/domain/Settings.ts +++ b/src/business/domain/Settings.ts @@ -10,4 +10,5 @@ export interface Settings { * - 'NONE': Sub-notes are hidden in the editor. */ subNotesDisplayType: 'DEFAULT' | 'BIG_ONLY' | 'SMALL_ONLY' | 'NONE'; + showFloatingMenu: boolean; } diff --git a/src/components/editor/Editor.vue b/src/components/editor/Editor.vue index a9c5521..c45b231 100644 --- a/src/components/editor/Editor.vue +++ b/src/components/editor/Editor.vue @@ -3,6 +3,8 @@ +
{{ editor.storage?.characterCount?.words() || 0 }} words {{ editor.storage?.characterCount?.characters() || 0 }} characters @@ -23,6 +25,8 @@ const notesStore = useNotesStore(); const editor = ref(null); const currentNote = ref(null); const isEditorChanging = ref(false); +import { useSettingsStore } from '../../stores/useSettingsStore'; +const settingsStore = useSettingsStore(); function emitNoteChange(previousNote: Note, previousNoteContent: string) { emit('note-change', previousNote, previousNoteContent); @@ -123,4 +127,14 @@ onBeforeMount(() => { onBeforeUnmount(() => { editor.value?.destroy(); }); + +function handleParentClick() { + if (!editor.value) return; + const text = editor.value.getText ? editor.value.getText() : ''; + if (text.trim().length === 0) { + editor.value.commands.focus(0, { scrollIntoView: false }); + } +} + +defineExpose({ handleParentClick }); \ No newline at end of file diff --git a/src/components/editor/EditorOptions.vue b/src/components/editor/EditorOptions.vue index 2174c19..5cd1056 100644 --- a/src/components/editor/EditorOptions.vue +++ b/src/components/editor/EditorOptions.vue @@ -2,8 +2,8 @@ @@ -34,14 +34,18 @@ import GenericSwitch from '../generic/switch/GenericSwitch.vue'; import { NDropdown } from 'naive-ui'; import { useNotesStore } from '../../stores/useNotesStore'; -import DotsHorizontal from 'icons/DotsHorizontal.vue'; +import ExportVariant from 'icons/ExportVariant.vue'; import { JSONContent } from '@tiptap/vue-3'; import ExportService from '../../business/service/ExportService'; import { useWorkspaceStore } from '../../stores/useWorkspaceStore'; import { createEditor } from './createEditor'; import { Note } from '../../business/domain/Note'; -import { ref } from 'vue'; +import { h, ref } from 'vue'; import { Workspace } from '../../business/domain/Workspace'; +import PDFIcon from 'icons/FilePdfBox.vue'; +import TextBoxOutlineIcon from 'icons/TextBoxOutline.vue'; +import MarkdownIcon from '../../assets/icons/Markdown.vue'; +import HTMLIcon from '../../assets/icons/HTML.vue'; const notesStore = useNotesStore(); const workspaceStore = useWorkspaceStore(); @@ -56,11 +60,27 @@ const currentOption = ref(null); const includeSubnotes = ref(false); const dropdownOptions = [ - { label: 'Export as Text', key: 'export-text' }, - { label: 'Export as Markdown', key: 'export-markdown' }, - { label: 'Export as HTML', key: 'export-html' }, - { label: 'Export as PDF', key: 'export-pdf' } -]; + { + label: 'Export as Text', + key: 'export-text', + icon: () => h(TextBoxOutlineIcon), + }, + { + label: 'Export as Markdown', + key: 'export-markdown', + icon: () => h(MarkdownIcon), + }, + { + label: 'Export as HTML', + key: 'export-html', + icon: () => h(HTMLIcon), + }, + { + label: 'Export as PDF', + key: 'export-pdf', + icon: () => h(PDFIcon), + }, +] function handleDropdownSelect(key: string) { if (dropdownOptions.some(option => option.key === key)) { diff --git a/src/components/editor/EditorView.vue b/src/components/editor/EditorView.vue index 39923c2..fa2a3df 100644 --- a/src/components/editor/EditorView.vue +++ b/src/components/editor/EditorView.vue @@ -1,11 +1,11 @@