-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added new component and used TinyMCE
- Loading branch information
AKosmachyov
committed
May 30, 2017
1 parent
9cc62ea
commit 779a993
Showing
4 changed files
with
38 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { Component, AfterViewInit } from '@angular/core'; | ||
|
||
declare var tinymce: any; | ||
|
||
@Component({ | ||
selector: 'content-editor', | ||
template: `<textarea id="editor"></textarea>` | ||
}) | ||
export class ContentEditorComponent implements AfterViewInit { | ||
|
||
ngAfterViewInit() { | ||
tinymce.init({ | ||
selector: '#editor', | ||
height: 300, | ||
menubar: false, | ||
plugins: [ | ||
'advlist autolink lists link image preview', | ||
'searchreplace visualblocks code fullscreen', | ||
'media table contextmenu paste code' | ||
], | ||
toolbar: 'undo redo | insert | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image', | ||
content_css: [ | ||
'//fonts.googleapis.com/css?family=Lato:300,300i,400,400i', | ||
'//www.tinymce.com/css/codepen.min.css'] | ||
}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters