input long text not wrap
hackerslizc opened this issue · comments
Describe the bug
`
import { Codemirror } from 'vue-codemirror'
<codemirror
v-model="code"
placeholder="..."
:style="{ height: height ,width:width}"
:options="cmOption"
:autofocus="true"
:indent-with-tab="true"
:tab-size="tabSize"
:extensions="extensions"
@ready="handleReady"
@change="changeText('change', $event)"
/>
const cmOption = {
lineNumbers: true,
lineWrapping: true
}
long text not wrap
`
Reproduction
`
import { Codemirror } from 'vue-codemirror'
<codemirror
v-model="code"
placeholder="..."
:style="{ height: height ,width:width}"
:options="cmOption"
:autofocus="true"
:indent-with-tab="true"
:tab-size="tabSize"
:extensions="extensions"
@ready="handleReady"
@change="changeText('change', $event)"
/>
const cmOption = {
lineNumbers: true,
lineWrapping: true
}
long text not wrap
`
System Info
vue-codemirror version 6.1.1
Used Package Manager
npm
Validations
- Read the the documentation in detail.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.
You can include EditorView.lineWrapping
in the extensions
prop like this:
<script setup lang="ts">
import { Codemirror } from 'vue-codemirror'
import { EditorView } from '@codemirror/view'
</script>
<template>
<Codemirror :extensions="[EditorView.lineWrapping]" />
</template>