diff --git a/src/components/Editor.vue b/src/components/Editor.vue
index cadb60f2041..dc633de01f8 100644
--- a/src/components/Editor.vue
+++ b/src/components/Editor.vue
@@ -51,6 +51,7 @@
+
import { NcActions, NcActionButton, NcActionInput } from '@nextcloud/vue'
import { getLinkWithPicker } from '@nextcloud/vue/dist/Components/NcRichText.js'
-import { FilePickerType, getFilePickerBuilder } from '@nextcloud/dialogs'
import { generateUrl } from '@nextcloud/router'
import { loadState } from '@nextcloud/initial-state'
@@ -76,6 +75,7 @@ import { Document, Loading, LinkOff, Web, Shape } from '../icons.js'
import { BaseActionEntry } from './BaseActionEntry.js'
import { useFileMixin } from '../Editor.provider.js'
import { useMenuIDMixin } from './MenuBar.provider.js'
+import { buildFilePicker } from '../../helpers/filePicker.js'
export default {
name: 'ActionInsertLink',
@@ -122,12 +122,7 @@ export default {
this.startPath = this.relativePath.split('/').slice(0, -1).join('/')
}
- const filePicker = getFilePickerBuilder(t('text', 'Select file or folder to link to'))
- .startAt(this.startPath)
- .allowDirectories(true)
- .setMultiSelect(false)
- .setType(FilePickerType.Choose)
- .build()
+ const filePicker = buildFilePicker(this.startPath)
filePicker.pick()
.then((file) => {
diff --git a/src/components/SuggestionsBar.vue b/src/components/SuggestionsBar.vue
new file mode 100644
index 00000000000..fed3ab99590
--- /dev/null
+++ b/src/components/SuggestionsBar.vue
@@ -0,0 +1,200 @@
+
+
+
+
+
+
+
+
+
+ {{ t('text', 'Link to file or folder') }}
+
+
+
+
+
+
+
+
+ {{ t('text', 'Upload') }}
+
+
+
+
+
+
+
+
+ {{ t('text', 'Insert Table') }}
+
+
+
+
+
+
+
+
+ {{ t('text', 'Smart Picker') }}
+
+
+
+
+
+
+
+
diff --git a/src/css/print.scss b/src/css/print.scss
index e35c1aa382c..c67e7610876 100644
--- a/src/css/print.scss
+++ b/src/css/print.scss
@@ -110,9 +110,13 @@
border: none!important;
}
}
+ .container-suggestions {
+ display: none;
+ }
}
}
+
.menubar-placeholder, .text-editor--readonly-bar {
display: none;
}
diff --git a/src/css/prosemirror.scss b/src/css/prosemirror.scss
index d69d7094976..451389d1472 100644
--- a/src/css/prosemirror.scss
+++ b/src/css/prosemirror.scss
@@ -15,7 +15,7 @@ div.ProseMirror {
white-space: pre-wrap;
-webkit-font-variant-ligatures: none;
font-variant-ligatures: none;
- padding: 4px 8px 200px 14px;
+ padding: 4px 8px 50px 14px;
line-height: 150%;
font-size: var(--default-font-size);
outline: none;
diff --git a/src/helpers/filePicker.js b/src/helpers/filePicker.js
new file mode 100644
index 00000000000..497e87b1079
--- /dev/null
+++ b/src/helpers/filePicker.js
@@ -0,0 +1,15 @@
+/**
+ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-or-later
+ */
+
+import { FilePickerType, getFilePickerBuilder } from '@nextcloud/dialogs'
+
+export const buildFilePicker = (startPath) => {
+ return getFilePickerBuilder(t('text', 'Select file or folder to link to'))
+ .startAt(startPath)
+ .allowDirectories(true)
+ .setMultiSelect(false)
+ .setType(FilePickerType.Choose)
+ .build()
+}