diff options
Diffstat (limited to 'cds-ui/designer-client/src/app/modules/feature-modules/resource-dictionary/resource-dictionary-creation/dictionary-editor')
2 files changed, 11 insertions, 5 deletions
diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/resource-dictionary/resource-dictionary-creation/dictionary-editor/dictionary-editor.component.html b/cds-ui/designer-client/src/app/modules/feature-modules/resource-dictionary/resource-dictionary-creation/dictionary-editor/dictionary-editor.component.html index 93d7df7d1..c0cb818eb 100644 --- a/cds-ui/designer-client/src/app/modules/feature-modules/resource-dictionary/resource-dictionary-creation/dictionary-editor/dictionary-editor.component.html +++ b/cds-ui/designer-client/src/app/modules/feature-modules/resource-dictionary/resource-dictionary-creation/dictionary-editor/dictionary-editor.component.html @@ -17,6 +17,6 @@ * limitations under the License. * ============LICENSE_END========================================================= */--> -<ace-editor [(text)]="text" [mode]="'javascript'" [autoUpdateContent]="true" -[durationBeforeCallback]="1000" (textChanged)="textChanged($event)" [theme]="'tomorrow_night_bright'" #editor style="height:500px;"> -</ace-editor> +<ace-editor [(text)]="text" [mode]="'json'" [autoUpdateContent]="true" [durationBeforeCallback]="1000" + (textChanged)="textChanged($event)" [theme]="'tomorrow_night_bright'" #editor style="height:500px;"> +</ace-editor>
\ No newline at end of file diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/resource-dictionary/resource-dictionary-creation/dictionary-editor/dictionary-editor.component.ts b/cds-ui/designer-client/src/app/modules/feature-modules/resource-dictionary/resource-dictionary-creation/dictionary-editor/dictionary-editor.component.ts index 157a5aa25..63725a228 100644 --- a/cds-ui/designer-client/src/app/modules/feature-modules/resource-dictionary/resource-dictionary-creation/dictionary-editor/dictionary-editor.component.ts +++ b/cds-ui/designer-client/src/app/modules/feature-modules/resource-dictionary/resource-dictionary-creation/dictionary-editor/dictionary-editor.component.ts @@ -18,6 +18,8 @@ * ============LICENSE_END========================================================= */ import { Component, OnInit } from '@angular/core'; +import { DictionaryCreationService } from '../dictionary-creation.service'; +import { DictionaryCreationStore } from '../dictionary-creation.store'; @Component({ selector: 'app-dictionary-editor', @@ -26,14 +28,18 @@ import { Component, OnInit } from '@angular/core'; }) export class DictionaryEditorComponent implements OnInit { text = ''; - constructor() { + constructor( + private dictionaryStore: DictionaryCreationStore, + private dictionaryService: DictionaryCreationService + ) { } ngOnInit() { } textChanged(event) { - console.log(event); + console.log(JSON.parse(event)); + this.dictionaryStore.changeMetaData(JSON.parse(event)); } } |