Skip to content

Commit

Permalink
Fix(GUI): white-spacing in monaco editor (#74)
Browse files Browse the repository at this point in the history
* removed the whitespace in monaco editor

Signed-off-by: Mahesh Patil <[email protected]>

* Fixed whitspace and formatting

Signed-off-by: Mahesh Patil <[email protected]>

---------

Signed-off-by: Mahesh Patil <[email protected]>
  • Loading branch information
nitro56565 authored Jun 21, 2024
1 parent 5b1f7ee commit 355364d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
4 changes: 3 additions & 1 deletion src/ConcertoEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ import { editor } from 'monaco-editor';

const options:editor.IStandaloneEditorConstructionOptions = {
minimap: { enabled: false },
wordWrap: "on"
wordWrap: "on",
automaticLayout:true,
scrollBeyondLastLine: false,
}
const concertoKeywords = ['map','concept','from','optional','default','range','regex','length','abstract','namespace','import', 'enum', 'scalar', 'extends', 'default', 'participant','asset', 'o','identified by','transaction','event'];
const concertoTypes = ['String','Integer','Double','DateTime','Long','Boolean']
Expand Down
3 changes: 2 additions & 1 deletion src/JSONEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ import { editor } from 'monaco-editor';
const options:editor.IStandaloneEditorConstructionOptions = {
minimap: { enabled: false },
wordWrap: "on",
automaticLayout:true
automaticLayout:true,
scrollBeyondLastLine: false,
}

export default function JSONEditor( {value, onChange} : {value: string, onChange?: (value:string|undefined) => void} ) {
Expand Down
7 changes: 5 additions & 2 deletions src/MarkdownEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,16 @@ import { editor } from 'monaco-editor';

const options:editor.IStandaloneEditorConstructionOptions = {
minimap: { enabled: false },
wordWrap: "on"
wordWrap: "on",
automaticLayout:true,
scrollBeyondLastLine: false,
}

export default function MarkdownEditor( {value, onChange} : {value: string, onChange?: (value:string|undefined) => void} ) {
return (
<div className="editorwrapper">
<monaco.Editor options={ options } height="60vh" value={value} onChange={onChange}/>
<monaco.Editor options={ options }
language='markdown' height="60vh" value={value} onChange={onChange}/>
</div>
);
}

0 comments on commit 355364d

Please sign in to comment.