diff --git a/src/app/editor/code-view/view.base.ts b/src/app/editor/code-view/view.base.ts index 3ff14bf..2dfd3e7 100644 --- a/src/app/editor/code-view/view.base.ts +++ b/src/app/editor/code-view/view.base.ts @@ -203,8 +203,8 @@ export class CodeViewBase { this.editor.setHighlightGutterLine(false); this.editor.setShowFoldWidgets(false); this.editor.setShowPrintMargin(false); + this.editor.session.setUseWrapMode(true); - this.editorElm.nativeElement.parentElement.classList.remove("scroller"); this.editorElm.nativeElement.parentElement.classList.add("col-1"); this.editorElm.nativeElement.parentElement.classList.add("zero-margin-padding"); diff --git a/src/app/editor/code-view/view.component.css b/src/app/editor/code-view/view.component.css index daa9d03..5624175 100644 --- a/src/app/editor/code-view/view.component.css +++ b/src/app/editor/code-view/view.component.css @@ -1,19 +1,3 @@ -/* -.editor { - position: fixed; - top: 0; - right: 0; - bottom: 0; - left: 0; -} - -.editor { - height: 100vh; - width: auto; -} -*/ - - .editor { position: relative; height: 100%; @@ -36,6 +20,7 @@ padding: 0.2em; top: 0em; right: 0em; + background-color: gray; } .contextMenu li:hover { diff --git a/src/app/editor/code-view/view.component.ts b/src/app/editor/code-view/view.component.ts index 631932e..fe9a2ca 100644 --- a/src/app/editor/code-view/view.component.ts +++ b/src/app/editor/code-view/view.component.ts @@ -281,6 +281,8 @@ export class CodeViewComponent extends CodeViewBase { } session.setMode( file.session.getMode()["$id"] ); + session.setUseWrapMode(true); + this.editor.setSession(session); }