Skip to content

Commit

Permalink
fix: cannot read properties of undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
niko-ng authored and enpitsuLin committed Aug 7, 2024
1 parent 8c0193a commit 7cb7945
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions packages/plugin-split-editing/src/codemirror.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import {
rectangularSelection,
} from '@codemirror/view'
import { $ctx } from '@milkdown/utils'
import { StyleModule } from 'style-mod'
import { Options } from '.'

const basicSetup: Extension = [
Expand Down Expand Up @@ -72,9 +73,13 @@ export class CodemirrorEditor {
extensions: [
basicSetup,
markdown(),
EditorView.styleModule.of({
getRules: () => '.cm-editor{height:100%}',
}),
EditorView.styleModule.of(
new StyleModule({
'.cm-editor': {
height: '100%',
},
}),
),
EditorView.lineWrapping,
updateListener,
...extensions,
Expand Down

0 comments on commit 7cb7945

Please sign in to comment.