ng2-alt-summernote
Summernote component for Angular2
Last updated 2 years ago by carlescs .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install ng2-alt-summernote 
SYNC missed versions from official npm registry.

ng2-alt-summernote

Component to use Summernote in Angular 2.

Example:

Example

The example repo is located here.

Usage with Angular CLI:

To use it with angular-cli:

  1. Install jquery, bootstrap and summernote:

    npm install --save jquery
    npm install --save bootstrap
    npm install --save summernote
    
  2. Add styles to angular-cli.json:

    "styles": [
       "styles.css",
       "../node_modules/bootstrap/dist/css/bootstrap.min.css",
       "../node_modules/codemirror/lib/codemirror.css",
       "../node_modules/summernote/dist/summernote.css"
       ],
    
  3. Add vendor.ts file with the following content:

    import * as jquery from 'jquery';
    window['jQuery'] = window['$'] = jquery;
    

    and add it to `angular-cli.json' scripts:

    "scripts": [
       "vendor.ts"
    ]
    
  4. Install ng2-alt-summernote:

npm install --save ng2-alt-summernote

5. Import SummernoteModule, ssbootstrap and summernote in app.module.ts:

```typescript
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { HttpModule } from '@angular/http';

import 'bootstrap/dist/js/bootstrap.min.js';
import 'summernote/dist/summernote.min.js';

import {SummernoteComponent} from 'ng2-alt-summernote';

import { AppComponent } from './app.component';

@NgModule({
  declarations: [
    SummernoteComponent,
    AppComponent
  ],
  imports: [
    BrowserModule,
    FormsModule,
    HttpModule
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }
```
  1. Use it in you components:

    <summernote [(ngModel)]="text" [options]="options" [disabled]="disabled"></summernote>
    

Usage with Webpack:

To install in a webpack project:

  1. Install required packages:

    npm install --save bootstrap
    npm install --save font-awesome
    npm install --save codemirror
    npm install --save summernote
    npm install --save ng2-alt-summernote
    
  2. Import modules in vendor.ts (if available, if not use another typescript file):

    import 'jquery';
    
    import 'bootstrap/dist/js/bootstrap.min.js';
    import 'bootstrap/less/bootstrap.less';
    import 'font-awesome/less/font-awesome.less';
    
    import 'bootstrap/js/tooltip';
    import 'bootstrap/js/transition';
    
    import 'summernote/dist/summernote.js';
    import 'summernote/src/less/summernote.less';
    
  3. Import module in you NgModule:

    import { NgModule } from '@angular/core';
    import { BrowserModule } from '@angular/platform-browser';
    import { HttpModule } from '@angular/http';
    import {FormsModule} from '@angular/forms';
    import { RouterModule } from '@angular/router';
    
    import {TestComponent} from './TestComponent';
    import {SummernoteModule} from 'ng2-alt-summernote/ng2-alt-summernote';
    
    import { AppComponent } from './AppComponent';
    
    @NgModule({
        imports: [
            BrowserModule,
            HttpModule,
            FormsModule,
            SummernoteModule
        ],
        declarations: [
            TestComponent,
            AppComponent
        ],
        bootstrap: [AppComponent]
    })
    export class AppModule {
    
    }
    
  4. Use it in your components:

    <summernote [(ngModel)]="text" [options]="options" [disabled]="disabled"></summernote>
    

Note:

This module is based on ng2-summernote. I tried forking the repo to fix the issues I was having but decided to start from scratch because it had some things that I didn't need.

Current Tags

  • 2.0.0                                ...           latest (2 years ago)

82 Versions

  • 2.0.0                                ...           2 years ago
  • 0.3.3                                ...           2 years ago
  • 0.3.2                                ...           2 years ago
  • 0.3.1                                ...           2 years ago
  • 0.3.0                                ...           2 years ago
  • 0.2.221                                ...           2 years ago
  • 0.2.1                                ...           2 years ago
  • 0.2.0                                ...           2 years ago
  • 0.1.46                                ...           3 years ago
  • 0.1.45                                ...           3 years ago
  • 0.1.44                                ...           3 years ago
  • 0.1.43                                ...           3 years ago
  • 0.1.42                                ...           3 years ago
  • 0.1.41                                ...           3 years ago
  • 0.1.40                                ...           3 years ago
  • 0.1.38                                ...           3 years ago
  • 0.1.37                                ...           3 years ago
  • 0.1.36                                ...           3 years ago
  • 0.1.35                                ...           3 years ago
  • 0.1.34                                ...           3 years ago
  • 0.1.33                                ...           3 years ago
  • 0.1.32                                ...           3 years ago
  • 0.1.31                                ...           3 years ago
  • 0.1.30                                ...           3 years ago
  • 0.1.29                                ...           3 years ago
  • 0.1.28                                ...           3 years ago
  • 0.1.27                                ...           3 years ago
  • 0.1.26                                ...           3 years ago
  • 0.1.25                                ...           3 years ago
  • 0.1.24                                ...           3 years ago
  • 0.1.23                                ...           3 years ago
  • 0.1.22                                ...           3 years ago
  • 0.1.21                                ...           3 years ago
  • 0.1.20                                ...           3 years ago
  • 0.1.19                                ...           3 years ago
  • 0.1.18                                ...           3 years ago
  • 0.1.17                                ...           3 years ago
  • 0.1.16                                ...           3 years ago
  • 0.1.15                                ...           3 years ago
  • 0.1.14                                ...           3 years ago
  • 0.1.13                                ...           3 years ago
  • 0.1.12                                ...           3 years ago
  • 0.1.11                                ...           3 years ago
  • 0.1.10                                ...           3 years ago
  • 0.1.9                                ...           3 years ago
  • 0.1.8                                ...           3 years ago
  • 0.1.7                                ...           3 years ago
  • 0.1.6                                ...           3 years ago
  • 0.1.5                                ...           3 years ago
  • 0.1.4                                ...           3 years ago
  • 0.1.3                                ...           3 years ago
  • 0.1.2                                ...           3 years ago
  • 0.1.1                                ...           3 years ago
  • 0.1.0                                ...           3 years ago
  • 0.0.29                                ...           3 years ago
  • 0.0.28                                ...           3 years ago
  • 0.0.27                                ...           3 years ago
  • 0.0.26                                ...           3 years ago
  • 0.0.25                                ...           3 years ago
  • 0.0.24                                ...           3 years ago
  • 0.0.23                                ...           3 years ago
  • 0.0.22                                ...           3 years ago
  • 0.0.21                                ...           3 years ago
  • 0.0.19                                ...           3 years ago
  • 0.0.18                                ...           3 years ago
  • 0.0.17                                ...           3 years ago
  • 0.0.16                                ...           3 years ago
  • 0.0.15                                ...           3 years ago
  • 0.0.14                                ...           3 years ago
  • 0.0.13                                ...           3 years ago
  • 0.0.12                                ...           3 years ago
  • 0.0.11                                ...           3 years ago
  • 0.0.10                                ...           3 years ago
  • 0.0.9                                ...           3 years ago
  • 0.0.8                                ...           3 years ago
  • 0.0.7                                ...           3 years ago
  • 0.0.6                                ...           3 years ago
  • 0.0.5                                ...           3 years ago
  • 0.0.4                                ...           3 years ago
  • 0.0.3                                ...           3 years ago
  • 0.0.2                                ...           3 years ago
  • 0.0.1                                ...           3 years ago
Maintainers (1)
Downloads
Today 0
This Week 1
This Month 2
Last Day 0
Last Week 0
Last Month 6
Dependencies (12)
Dev Dependencies (4)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |