You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
1.1 KiB
42 lines
1.1 KiB
import {EditorNodeContract} from '../EditorNode.contract';
|
|
import {Component, Input, OnInit} from '@angular/core';
|
|
import {EditorService} from '../../../service/editor.service';
|
|
|
|
@Component({
|
|
selector: 'editor-richtext',
|
|
template: `
|
|
<sla-text></sla-text>
|
|
<sla-editable></sla-editable>
|
|
<sla-ng></sla-ng>
|
|
`,
|
|
})
|
|
export class RichTextNodeComponent extends EditorNodeContract implements OnInit {
|
|
@Input() nodeId: string;
|
|
@Input() editorUUID?: string;
|
|
|
|
constructor(
|
|
public editorService: EditorService,
|
|
) { super(); }
|
|
|
|
isDirty(): boolean | Promise<boolean> {
|
|
return false;
|
|
}
|
|
|
|
writeChangesToNode(): void | Promise<void> {
|
|
return undefined;
|
|
}
|
|
|
|
ngOnInit(): void {
|
|
this.editorService = this.editorService.getEditor(this.editorUUID);
|
|
this.editorService.registerNodeEditor(this.nodeId, this).then(() => {
|
|
if ( !this.node.Value ) {
|
|
this.node.Value = {};
|
|
}
|
|
|
|
if ( this.node.Value.Value ) {
|
|
this.initialValue = this.node.Value.Value;
|
|
}
|
|
});
|
|
}
|
|
}
|