import * as ko from "knockout" ; import { ImplementorBase } from "survey-knockout-ui" ; import { TabJsonEditorAcePlugin , AceJsonEditorModel } from "@survey/creator" ; const template = require ( "./json-editor-ace.html" ) ; ko . components . register ( "svc-tab-json-editor-ace" , { viewModel : { createViewModel : ( params , componentInfo ) => { const aceEditor = ace . edit ( < HTMLElement > ( componentInfo . element . nextElementSibling . querySelector ( ".svc-json-editor-tab__ace-editor" ) ) ) ; const plugin = params . data ; new ImplementorBase ( plugin . model ) ; ( < AceJsonEditorModel > plugin . model ) . init ( aceEditor ) ; return plugin . model ; } } , template : template } ) ;