All Projects → Ledzz → Angular2 Tinymce

Ledzz / Angular2 Tinymce

Angular 2 component for TinyMCE MCE WYSIWYG editor

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to Angular2 Tinymce

Generator Fountain Webapp
Yeoman 'fountain' generator to start a webapp
Stars: ✭ 985 (+1392.42%)
Mutual labels:  angular2
Ng2 Sweetalert2
A sweetalert2 service for angular2.
Stars: ✭ 49 (-25.76%)
Mutual labels:  angular2
Root Bootstrap 4 Admin Template With Angularjs Angular 2 Support
Root is Boostrap 4 Admin Template with Angular 2 and AngularJS support
Stars: ✭ 54 (-18.18%)
Mutual labels:  angular2
Ng2 Pdf Viewer
📄 PDF Viewer Component for Angular 5+
Stars: ✭ 997 (+1410.61%)
Mutual labels:  angular2
Ng Selectize
Angular Selectize
Stars: ✭ 44 (-33.33%)
Mutual labels:  angular2
Ngautocomplete
Light-weight autocomplete component for Angular.
Stars: ✭ 52 (-21.21%)
Mutual labels:  angular2
Angular2 Social Login
Simple client side social authentication for Angular2 application.
Stars: ✭ 34 (-48.48%)
Mutual labels:  angular2
Ng2 Breadcrumbs
A breadcrumb service for the Angular 7 router
Stars: ✭ 61 (-7.58%)
Mutual labels:  angular2
Angular Tree Component
A simple yet powerful tree component for Angular (>=2)
Stars: ✭ 1,031 (+1462.12%)
Mutual labels:  angular2
Until Destroy
🦊 RxJS operator that unsubscribe from observables on destroy
Stars: ✭ 1,071 (+1522.73%)
Mutual labels:  angular2
Ng2 Md Datatable
Angular 5+ DataTable component for using with Material Design 2
Stars: ✭ 40 (-39.39%)
Mutual labels:  angular2
Grav Plugin Tinymce Editor
TinyMCE Editor Integration Plugin for Grav
Stars: ✭ 44 (-33.33%)
Mutual labels:  tinymce
Ng2 Bootstrap Modal
Library to simplify the work with bootstrap modal dialogs
Stars: ✭ 53 (-19.7%)
Mutual labels:  angular2
Dejajs Components
Angular components
Stars: ✭ 37 (-43.94%)
Mutual labels:  angular2
Angular2 Tree Diagram
Angular Hierarchical UI module
Stars: ✭ 50 (-24.24%)
Mutual labels:  angular2
Sails Angular2
A sample Sails and Angular 2 starter app
Stars: ✭ 35 (-46.97%)
Mutual labels:  angular2
Awesome Angular
📄 A curated list of awesome Angular resources
Stars: ✭ 8,160 (+12263.64%)
Mutual labels:  angular2
Angular2 Bs4 Navbar
An Angular2 App with Bootstrap4 Navbar and routing using Angular2's Router v3, follows Angular Styleguide
Stars: ✭ 64 (-3.03%)
Mutual labels:  angular2
Novo Elements
UI Repository for Bullhorn's Novo Theme
Stars: ✭ 59 (-10.61%)
Mutual labels:  angular2
Angular2 Web Worker
Web worker for Angular 2
Stars: ✭ 53 (-19.7%)
Mutual labels:  angular2

angular2-tinymce pipeline status

Now compatible with Angular 6!

Demo

Usage

First, install tinymce and this lib via npm:

npm install --save tinymce angular2-tinymce

Then copy lightgray skin files from node_modules/tinymce to the /assets folder. So, i.e. there must be available /assets/tinymce/skins/lightgray/skin.min.css and /assets/tinymce/skins/lightgray/content.min.css file. You can override skin path by specifying skin_url option (default /assets/tinymce/skins/lightgray).

To support AOT mode in Angular 6 and higher you also need to include tinymce in your scripts section in angular.json config file:

 "scripts": [
    "node_modules/tinymce/tinymce.min.js",
    ...
]

Import TinymceModule in you app.module.ts like this:

import { TinymceModule } from 'angular2-tinymce';

@NgModule({
  imports: [
    ...
    TinymceModule.withConfig({})
  ],
  ...
})
export class AppModule { }

Then use it:

<app-tinymce [formControl]='contentControl'></app-tinymce>

or

<app-tinymce [(ngModel)]='content'></app-tinymce>

You can also use template variable tinymce to get instance of tinymce:

<app-tinymce [(ngModel)]='content' #tinymce='tinymce'></app-tinymce>

then in component.ts:

@ViewChild('tinymce') tinymce;
ngAfterViewInit() {
  console.log(this.tinymce);
}

Configure

You can configure TinyMCE globally:

import { TinymceModule } from 'angular2-tinymce';

@NgModule({
  imports: [
    ...
    TinymceModule.withConfig({
      ...  //any TinyMCE config here
    })
  ],
  ...
})
export class AppModule { }

Please note that config is extended a bit.

  • Besides the original config angular2-tinymce supports baseURL for providing, i.e., custom plugins paths.

  • auto_focus option is boolean instead of string.

  • You cannot specify selector option (and you don't need to, right?).

  • setup and init_instance_callback are executed after the components'.

  • You can view more info about supported options here

Also you can override options in each instance like that:

<app-tinymce [(ngModel)]='title' [options]='{ branding:false }'></app-tinymce>

Events

You can use outputs to catch tinymce events. You can see full list of available outputs here.

<app-tinymce [(ngModel)]='title' (init)='log($event)' (keydown)='log($event)'></app-tinymce>

Plugins

If you need other plugins than standart (link paste table advlist autoresize lists code) you should create plugins folder in the baseURL (default '/assets/tinymce') and place your plugins in it.

Example: Place emoticons plugin to an /assets/tinymce/plugins folder, then:

import { TinymceModule } from 'angular2-tinymce';

@NgModule({
  imports: [
    ...
    TinymceModule.withConfig({
      plugins: ['emoticons'],
      toolbar: 'emoticons'
    })
  ],
  ...
})
export class AppModule { }

Alternativaly you can npm install tinymce --save and import plugins like that:

import 'tinymce/plugins/emoticons/plugin.js';

Contributing

Please feel free to leave your PRs, issues, feature requests.

Upcoming features

  • [x] Tinymce configuration
  • [x] Aot support
  • [x] Add demo
  • [x] Add CI
  • [x] Per-editor configuration
  • [x] Events
  • [ ] Directive
  • [ ] File uploading
  • [ ] Tests
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].