Commit f6b7b9b9 authored by dmacfarlane's avatar dmacfarlane
Browse files

Corrected class decoration to directive.

parent 73895099
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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>
@@ -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) {
+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';
@@ -22,9 +23,8 @@ const KEY_2 = 50;
 *
 * Copyright (c) 2016 Dan MacFarlane
 */
@Component({
@Directive({
  selector: '[mention]',
  template: '',
  host: {
    '(keydown)': 'keyHandler($event)',
  },