Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

input long text not wrap #214

Open
4 tasks
hackerslizc opened this issue Nov 1, 2023 · 1 comment
Open
4 tasks

input long text not wrap #214

hackerslizc opened this issue Nov 1, 2023 · 1 comment

Comments

@hackerslizc
Copy link

hackerslizc commented Nov 1, 2023

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.
@ngseke
Copy link

ngseke commented Dec 27, 2023

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>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants