This commit is contained in:
@@ -1,17 +1,17 @@
|
||||
<ion-list>
|
||||
<ion-item button (click)="onSelect('node')" class="node">
|
||||
<ion-item button (click)="onSelect('paragraph')" class="node">
|
||||
<i class="fa" slot="start" [ngClass]="typeIcons.node"></i>
|
||||
<ion-label>Paragraph</ion-label>
|
||||
</ion-item>
|
||||
<ion-item button (click)="onSelect('db')" class="db">
|
||||
<ion-item button (click)="onSelect('database_ref')" class="db">
|
||||
<i class="fa" slot="start" [ngClass]="typeIcons.db"></i>
|
||||
<ion-label>Database</ion-label>
|
||||
</ion-item>
|
||||
<ion-item button (click)="onSelect('code')" class="code">
|
||||
<ion-item button (click)="onSelect('code_ref')" class="code">
|
||||
<i class="fa" slot="start" [ngClass]="typeIcons.code"></i>
|
||||
<ion-label>Code Editor</ion-label>
|
||||
</ion-item>
|
||||
<ion-item button (click)="onSelect('files')" class="files">
|
||||
<ion-item button (click)="onSelect('file_ref')" class="files">
|
||||
<i class="fa" slot="start" [ngClass]="typeIcons.node"></i>
|
||||
<ion-label>Upload Files</ion-label>
|
||||
</ion-item>
|
||||
|
||||
@@ -34,7 +34,13 @@ export class NormComponent extends EditorNodeContract implements OnInit {
|
||||
|
||||
ngOnInit() {
|
||||
this.editorService.registerNodeEditor(this.nodeId, this).then(() => {
|
||||
this.initialValue = this.node.Value.Value;
|
||||
if ( !this.node.Value ) {
|
||||
this.node.Value = {};
|
||||
}
|
||||
|
||||
if ( this.node.Value.Value ) {
|
||||
this.initialValue = this.node.Value.Value;
|
||||
}
|
||||
this.contents = this.initialValue;
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user