Loading app/tinymce.component.ts +2 −2 Original line number Diff line number Diff line Loading @@ -14,7 +14,7 @@ declare var tinymce: any; selector: 'tinymce', template: ` <div class="form-group" style="position:relative"> <div [mention]="items" #mention></div> <div [mention]="items"></div> <div> <textarea class="hidden" cols="60" rows="4" id="tmce">{{htmlContent}}</textarea> </div> Loading @@ -23,7 +23,7 @@ declare var tinymce: any; }) export class TinyMCE { @Input() htmlContent; @ViewChild('mention') mention; @ViewChild(Mention) mention: Mention; protected items:string [] = COMMON_NAMES; private zone:NgZone; constructor(private _elementRef: ElementRef) { Loading mention/mention.ts +3 −3 Original line number Diff line number Diff line import {Component, ElementRef, Input} from "angular2/core"; import {Directive, ElementRef, Input} from "angular2/core"; import {Output, EventEmitter} from "angular2/core"; import {DynamicComponentLoader, ComponentRef} from "angular2/core"; import {MentionList} from './mention-list'; import {getValue, insertValue} from './mention-utils'; Loading @@ -22,9 +23,8 @@ const KEY_2 = 50; * * Copyright (c) 2016 Dan MacFarlane */ @Component({ @Directive({ selector: '[mention]', template: '', host: { '(keydown)': 'keyHandler($event)', }, Loading Loading
app/tinymce.component.ts +2 −2 Original line number Diff line number Diff line Loading @@ -14,7 +14,7 @@ declare var tinymce: any; selector: 'tinymce', template: ` <div class="form-group" style="position:relative"> <div [mention]="items" #mention></div> <div [mention]="items"></div> <div> <textarea class="hidden" cols="60" rows="4" id="tmce">{{htmlContent}}</textarea> </div> Loading @@ -23,7 +23,7 @@ declare var tinymce: any; }) export class TinyMCE { @Input() htmlContent; @ViewChild('mention') mention; @ViewChild(Mention) mention: Mention; protected items:string [] = COMMON_NAMES; private zone:NgZone; constructor(private _elementRef: ElementRef) { Loading
mention/mention.ts +3 −3 Original line number Diff line number Diff line import {Component, ElementRef, Input} from "angular2/core"; import {Directive, ElementRef, Input} from "angular2/core"; import {Output, EventEmitter} from "angular2/core"; import {DynamicComponentLoader, ComponentRef} from "angular2/core"; import {MentionList} from './mention-list'; import {getValue, insertValue} from './mention-utils'; Loading @@ -22,9 +23,8 @@ const KEY_2 = 50; * * Copyright (c) 2016 Dan MacFarlane */ @Component({ @Directive({ selector: '[mention]', template: '', host: { '(keydown)': 'keyHandler($event)', }, Loading