Added Line Wrapping to Codeview of CodeMirror (#9563)

* Added Line Wrapping to Codeview of CodeMirror

In the formated code fields line breaks are not done, which requires
scrolling. This might be configurable in the future.

* Make line-wrapping an opt-in options

Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
This commit is contained in:
Dr. Matthias Jung
2021-12-01 23:27:09 +01:00
committed by GitHub
parent 3bdf97afaa
commit c16592806d
3 changed files with 19 additions and 1 deletions

View File

@@ -51,6 +51,10 @@ export default defineComponent({
type: Boolean,
default: true,
},
lineWrapping: {
type: Boolean,
default: false,
},
placeholder: {
type: String,
default: null,
@@ -237,6 +241,7 @@ export default defineComponent({
defaultOptions,
{
lineNumbers: props.lineNumber,
lineWrapping: props.lineWrapping,
readOnly: props.disabled ? 'nocursor' : false,
mode: props.language,
placeholder: props.placeholder,