Skip to content

Commit 8ebfcf5

Browse files
committed
fix: Tiptap editor and heading styles
Signed-off-by: Enjeck C <patrathewhiz@gmail.com>
1 parent 91aefa5 commit 8ebfcf5

6 files changed

Lines changed: 36 additions & 14 deletions

File tree

css/tiptap.css

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,20 @@
22
* SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors
33
* SPDX-License-Identifier: AGPL-3.0-or-later
44
*/
5-
.tiptap-wrapper div[contenteditable=true] {
5+
.tables-tiptap-wrapper div[contenteditable=true] {
66
width: 100% !important;
77
min-height: 150px;
88
}
99

10-
.tiptap-wrapper .is-active {
10+
.tables-tiptap-wrapper .is-active {
1111
background-color: var(--color-primary) !important;
1212
}
1313

14-
.tiptap-wrapper {
14+
.tables-tiptap-wrapper {
1515
width: 100%;
1616
}
1717

18-
.tiptap-wrapper .menuBar button {
18+
.tables-tiptap-wrapper .menuBar button {
1919
position: relative;
2020
width: 35px;
2121
height: 35px;
@@ -29,10 +29,10 @@
2929
vertical-align: top;
3030
}
3131

32-
.tiptap-wrapper .menuBar button:hover, .tiptap-wrapper .menuBar button:focus, .tiptap-wrapper .menuBar button:active {
32+
.tables-tiptap-wrapper .menuBar button:hover, .tables-tiptap-wrapper .menuBar button:focus, .tables-tiptap-wrapper .menuBar button:active {
3333
background-color: var(--color-background-dark);
3434
}
3535

36-
.tiptap-wrapper em, .tabulator-cell em {
36+
.tables-tiptap-wrapper em, .tabulator-cell em {
3737
font-style: italic;
3838
}

src/pages/Context.vue

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,4 +235,8 @@ export default {
235235
padding-left: 0px;
236236
}
237237
}
238+
:deep(h1) {
239+
font-size: unset;
240+
font-size: revert;
241+
}
238242
</style>

src/pages/Table.vue

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,11 @@ export default {
4747
min-width: var(--app-content-width, 100%);
4848
}
4949
50+
:deep(h1) {
51+
font-size: unset;
52+
font-size: revert;
53+
}
54+
5055
@page {
5156
size: auto;
5257
margin: 5mm;

src/pages/View.vue

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,8 @@ export default {
4141
width: max-content;
4242
min-width: var(--app-content-width, 100%);
4343
}
44+
:deep(h1) {
45+
font-size: unset;
46+
font-size: revert;
47+
}
4448
</style>

src/shared/components/ncTable/partials/TableCellHtml.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
- SPDX-License-Identifier: AGPL-3.0-or-later
44
-->
55
<template>
6-
<div class="cell-editor">
6+
<div class="cell-editor tables-tiptap-wrapper">
77
<div v-if="!isEditing" @click="handleStartEditing">
88
<EditorContent :editor="editor" />
99
</div>
@@ -118,7 +118,7 @@ export default {
118118
119119
// Check if the click is outside our editing container
120120
if (this.$refs.editingContainer && !this.$refs.editingContainer.contains(event.target)) {
121-
const isEditorRelated = event.target.closest('.tiptap-wrapper')
121+
const isEditorRelated = event.target.closest('.tables-tiptap-wrapper')
122122
|| event.target.closest('.ProseMirror')
123123
|| event.target.closest('[contenteditable]')
124124
|| event.target.closest('.text-menubar')
@@ -220,7 +220,7 @@ export default {
220220
}
221221
}
222222
223-
:deep(.tiptap-wrapper) {
223+
:deep(.tables-tiptap-wrapper) {
224224
.menuBar {
225225
padding: 8px;
226226
border-bottom: 1px solid var(--color-border);

src/shared/components/ncTable/partials/TiptapMenuBar.vue

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
- SPDX-License-Identifier: AGPL-3.0-or-later
44
-->
55
<template>
6-
<div class="tiptap-wrapper">
6+
<div class="tables-tiptap-wrapper">
77
<div v-if="editor" class="menuBar">
88
<NcButton type="tertiary-no-background" :aria-label="t('tables', 'Undo')" @click="editor.chain().focus().undo().run()">
99
<template #icon>
@@ -201,7 +201,7 @@ export default {
201201
}
202202
</script>
203203

204-
<style lang="scss" scoped>
204+
<style lang="scss">
205205
206206
.character-count {
207207
display: flex;
@@ -215,7 +215,7 @@ export default {
215215
}
216216
217217
/* Basic editor styles */
218-
.tiptap-wrapper .ProseMirror, .tabulator-cell .ProseMirror {
218+
.tables-tiptap-wrapper .ProseMirror, .tabulator-cell .ProseMirror {
219219
> * + * {
220220
/*margin-top: 0.75em;*/
221221
}
@@ -232,6 +232,8 @@ export default {
232232
h5,
233233
h6 {
234234
line-height: 1.1;
235+
font-size: unset;
236+
font-size: revert;
235237
}
236238
237239
pre {
@@ -257,7 +259,7 @@ export default {
257259
}
258260
}
259261
260-
.tiptap-wrapper ul[data-type='taskList'], .tabulator-cell ul[data-type='taskList'] {
262+
.tables-tiptap-wrapper ul[data-type='taskList'], .tabulator-cell ul[data-type='taskList'] {
261263
list-style: none;
262264
padding: 0;
263265
p {
@@ -277,7 +279,14 @@ export default {
277279
}
278280
}
279281
280-
.tiptap-wrapper ul, .tabulator-cell ul {
282+
.tables-tiptap-wrapper ol, .tabulator-cell ol {
283+
li {
284+
list-style-type: decimal;
285+
margin-left: 15px;
286+
}
287+
}
288+
289+
.tables-tiptap-wrapper ul, .tabulator-cell ul {
281290
li {
282291
list-style-type: disc;
283292
margin-left: 15px;

0 commit comments

Comments
 (0)