Skip to content

Commit 4e64130

Browse files
committed
docs: cleanup code and add documentation
1 parent 0bca0d6 commit 4e64130

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

src/runtime/components/NuxtCodeMirror.vue

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,6 @@ onMounted(() => {
4949
stateRef: state,
5050
containerRef: container,
5151
})
52-
53-
/** DEBUGGING the variables exposed by defineExpose */
54-
// await nextTick()
55-
// console.log('test: ', view.value)
5652
})
5753
5854
onBeforeUnmount(() => {

src/runtime/types/nuxt-codemirror.d.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,19 @@ import type { Ref } from '#imports'
55

66
export interface NuxtCodeMirrorProps
77
extends Omit<EditorStateConfig, 'doc' | 'extensions'> {
8-
/** value of the auto created model in the editor. */
8+
/** value of the auto created model in the editor. Works as underlying logic of a V-Model */
99
modelValue?: string
10+
/** The height value of the editor. */
1011
height?: string
12+
/** The minimum height value of the editor. */
1113
minHeight?: string
14+
/** The maximum height value of the editor. */
1215
maxHeight?: string
16+
/** The width value of the editor. */
1317
width?: string
18+
/** The minimum width value of the editor. */
1419
minWidth?: string
20+
/** The maximum width value of the editor. */
1521
maxWidth?: string
1622
/** focus on the editor. */
1723
autoFocus?: boolean
@@ -81,8 +87,11 @@ export interface NuxtCodeMirrorProps
8187
export interface UseCodeMirrorProps extends NuxtCodeMirrorProps {
8288
/** Container element of the CodeMirror instance */
8389
container?: HTMLDivElement | null
90+
/** The EditorView of the CodeMirror instance */
8491
viewRef: Ref<EditorView | undefined>
92+
/** The EditorState of the CodeMirror instance */
8593
stateRef: Ref<EditorState | undefined>
94+
/** Editor element of the CodeMirror instance */
8695
containerRef: Ref<HTMLDivElement | null>
8796
}
8897

0 commit comments

Comments
 (0)