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:
authorMax <max@nextcloud.com>2022-07-08 21:57:12 +0300
committerMax <max@nextcloud.com>2022-07-29 15:15:12 +0300
commit8f7160dbcb438c76c46890f91ad3e73be650695c (patch)
tree2ef0d4eef9101f2b54f8c24ea1aecb99d72312c2 /src/components/Editor.vue
parent17146ed0fd8e2a7e66129280914081f632aebf20 (diff)
refactor: separate component for editor
This will contain all editor related things. For now it only has the EditorMediaHandler Signed-off-by: Max <max@nextcloud.com>
Diffstat (limited to 'src/components/Editor.vue')
-rw-r--r--src/components/Editor.vue54
1 files changed, 54 insertions, 0 deletions
diff --git a/src/components/Editor.vue b/src/components/Editor.vue
new file mode 100644
index 000000000..837eef99f
--- /dev/null
+++ b/src/components/Editor.vue
@@ -0,0 +1,54 @@
+<!--
+ - @copyright Copyright (c) 2022 Max <max@nextcloud.com>
+ -
+ - @author Max <max@nextcloud.com>
+ -
+ - @license GNU AGPL version 3 or any later version
+ -
+ - This program is free software: you can redistribute it and/or modify
+ - it under the terms of the GNU Affero General Public License as
+ - published by the Free Software Foundation, either version 3 of the
+ - License, or (at your option) any later version.
+ -
+ - This program is distributed in the hope that it will be useful,
+ - but WITHOUT ANY WARRANTY; without even the implied warranty of
+ - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ - GNU Affero General Public License for more details.
+ -
+ - You should have received a copy of the GNU Affero General Public License
+ - along with this program. If not, see <http://www.gnu.org/licenses/>.
+ -
+ -->
+
+<template>
+ <EditorMidiaHandler id="editor"
+ class="text-editor__main">
+ <slot />
+ </EditorMidiaHandler>
+</template>
+
+<script>
+import EditorMidiaHandler from './EditorMediaHandler.vue'
+
+export default {
+ name: 'Editor',
+ components: {
+ EditorMidiaHandler,
+ },
+
+}
+</script>
+
+<style scoped lang="scss">
+ .text-editor__main, .editor {
+ background: var(--color-main-background);
+ color: var(--color-main-text);
+ background-clip: padding-box;
+ border-radius: var(--border-radius);
+ padding: 0;
+ position: relative;
+ overflow-y: auto;
+ overflow-x: hidden;
+ width: 100%;
+ }
+</style>