• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

worktile / slate-angular / da56a556-b6e8-4ed9-87e7-93234ec6fcce

pending completion
da56a556-b6e8-4ed9-87e7-93234ec6fcce

Pull #228

circleci

pubuzhixing8
chore: remove useless code
Pull Request #228: feat(core): add default string component

269 of 893 branches covered (30.12%)

Branch coverage included in aggregate %.

8 of 8 new or added lines in 2 files covered. (100.0%)

690 of 1533 relevant lines covered (45.01%)

30.5 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

42.86
/packages/src/components/text/void-text.component.ts
1
import { Component, ChangeDetectionStrategy, OnInit, OnChanges } from '@angular/core';
2
import { BaseTextComponent } from '../../view/base';
3
import { AngularEditor } from '../../plugins/angular-editor';
4

5
@Component({
6
    selector: 'span[slateVoidText]',
7
    template: `<slate-leaves [context]="context" [viewContext]="viewContext" [viewContext]="viewContext"></slate-leaves>`,
8
    changeDetection: ChangeDetectionStrategy.OnPush,
9
    host: {
10
        '[attr.contenteditable]': 'isLeafBlock',
11
        'data-slate-spacer': 'true',
12
        class: 'slate-spacer',
13
        'data-slate-node': 'text'
14
    }
15
})
16
export class SlateVoidTextComponent extends BaseTextComponent implements OnInit, OnChanges {
1✔
17
    isLeafBlock: boolean;
18

19
    ngOnInit() {
20
        this.isLeafBlock = AngularEditor.isLeafBlock(this.viewContext.editor, this.context.parent);
1✔
21
        super.ngOnInit();
1✔
22
    }
23

24
    ngOnChanges() {
25
        if (!this.initialized) {
×
26
            return;
×
27
        }
28
        this.isLeafBlock = AngularEditor.isLeafBlock(this.viewContext.editor, this.context.parent);
×
29
    }
30
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc