Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/text.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2022-07-15 00:14:56 +0300
committerJulius Härtl <jus@bitgrid.net>2022-07-18 18:53:14 +0300
commit97a288cb7ecb67bc2b266ab4bd70f27f4165f86b (patch)
tree45a5097e2e0f8550195217773445043d7b8caae2 /src/components/EditorWrapper.vue
parenteafb3827f220dd9003a88ddf2b682363669a2e2e (diff)
Add option to set default file extension and disable rich editingenh/config-options
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'src/components/EditorWrapper.vue')
-rw-r--r--src/components/EditorWrapper.vue3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/components/EditorWrapper.vue b/src/components/EditorWrapper.vue
index 831e59d1e..6965fb40b 100644
--- a/src/components/EditorWrapper.vue
+++ b/src/components/EditorWrapper.vue
@@ -102,6 +102,7 @@ import { EditorContent } from '@tiptap/vue-2'
import { getVersion, receiveTransaction } from 'prosemirror-collab'
import { Step } from 'prosemirror-transform'
import { getCurrentUser } from '@nextcloud/auth'
+import { loadState } from '@nextcloud/initial-state'
import {
EDITOR,
@@ -299,7 +300,7 @@ export default {
return this.isDirectEditing || (document.getElementById('isPublic') && document.getElementById('isPublic').value === '1')
},
isRichEditor() {
- return this.mime === 'text/markdown'
+ return loadState('text', 'rich_editing_enabled', true) && this.mime === 'text/markdown'
},
fileExtension() {
return this.relativePath ? this.relativePath.split('/').pop().split('.').pop() : 'txt'