Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
881ce5b
chore(migrate): useEditorMixin to useEditor composable
max-nextcloud Jun 16, 2025
8d998f0
chore(migrate): setContent mixin...
max-nextcloud Jun 17, 2025
13a5ce1
chore(migrate): to useEditorFlags composable
max-nextcloud Jun 18, 2025
d958a4d
chore(cleanup): fix small review remarks
max-nextcloud Jun 18, 2025
b0790dc
chore(migrate): use.find instead of deprecated .contains
max-nextcloud Jun 19, 2025
8b4e635
enh(editor): store session in separate extension
max-nextcloud Jun 20, 2025
9d3cc87
chore(refactor): configure mention in rich text extension
max-nextcloud Jun 20, 2025
c4f863f
chore(types): collaborationCursor extension to typescript
max-nextcloud Jun 20, 2025
354ad41
chore(simplify): rely on updateUser command
max-nextcloud Jun 20, 2025
022e483
chore(simplify): replace computed fileExtension with temp
max-nextcloud Jun 20, 2025
0809c8e
enh(code): start to load syntax highlighting during setup
max-nextcloud Jun 20, 2025
b326875
chore(refactor): load editor in mounted
max-nextcloud Jun 20, 2025
3e5cfd8
chore(refactor): create editor in created instead of mounted
max-nextcloud Jun 26, 2025
ab26032
chore(refactor): create ydoc in setup
max-nextcloud Jun 26, 2025
2831462
fix(character-count): always provide the current editors doc
max-nextcloud Jun 26, 2025
d7df4c0
fix(character-count): use the NcActionTexts name prop
max-nextcloud Jun 26, 2025
e24d90a
fix(loading): only show main container when content loaded
max-nextcloud Jun 26, 2025
0d5f4f7
fix(mention): use shallowRef for connection
max-nextcloud Jun 27, 2025
057a682
fix(load): create initial YjsState with dir
max-nextcloud Jun 27, 2025
fae62fc
chore(refactor): extract useEditor into its own file
max-nextcloud Jun 28, 2025
17f0d62
chore(refactor): extract useEditorFlags into its own file
max-nextcloud Jun 28, 2025
90b1d84
test(RichTextReader): basic test
max-nextcloud Jun 28, 2025
fabc79e
test(RichTextReader): update content
max-nextcloud Jun 28, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix(character-count): always provide the current editors doc
The `character-count` extensions storage is a singleton
and might be initialized by other editors loaded at the same time.

See ueberdosis/tiptap#6060

Signed-off-by: Max <[email protected]>
  • Loading branch information
max-nextcloud committed Jun 28, 2025
commit 2831462cf32d5a6accd7fff8668974c60ed0096c
12 changes: 10 additions & 2 deletions src/components/Menu/CharacterCount.vue
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,17 @@ export default defineComponent({
},
methods: {
refresh() {
if (!this.editor) {
this.wordCount = 0
this.charCount = 0
return
}
const { storage, state } = this.editor
// characterCount is not reactive so we need this workaround
this.wordCount = this.editor?.storage.characterCount.words()
this.charCount = this.editor?.storage.characterCount.characters()
// We also need to provide the doc as storage is a singleton in tiptap v2.
// See ueberdosis/tiptap#6060
this.wordCount = storage.characterCount.words(state.doc)
this.charCount = storage.characterCount.characters(state.doc)
},
},
})
Expand Down