In fact, you need to put your textarea into a component that you bootstrap. Don't forget that Angular2 uses a component-based approach and the HTML entry file isn't "evaluated". Only the templates in components.
So you need to do this in your HTML file:
<html>
<head>
<!-- includes -->
<!-- SystemJS configuration -->
</head>
<body>
<my-app></my-app>
</body>
</html>
And bootstrap the component that has the my-app
selector:
bootstrap(AppComponent);
Then you can implement a custom directive to apply the tinymce behavior of textarea field:
@Component({
selector: 'my-app',
(...)
})
export class AppComponent implements OnInit{
constructor(){}
ngOnInit():any {
tinymce.init({
selector: "[tinymce]"
});
}
}
Simply add the tinymce attribute (the selector of your directive) to the corresponding textarea:
@Component({
(...)
template: `
<textarea tinymce style="height:300px"></textarea>
`
})
export class AppComponent {
(...)
}
Note that you could go further to leverage form support (control and ngModel). See this question: