Skip to content

nolafs/ng2sf-tinymce

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TinyMCE widget for Angular2 Schema Form

Install

    npm install ng2sf-tinymce

Usage

Add Ng2SFTinyMCEModule wherever you need it in your dependency tree:

    import { SchemaFormModule } from "angular2-schema-form";
    import { Ng2SFTinyMCEModule } from "ng2sf-tinymce";

    @NgModule({
        imports: [
            BrowserModule,
            /*...*/
            SchemaFormModule,
            Ng2SFTinyMCEModule
        ],
        declarations: [AppComponent, /*...*/]
    })
    export class AppModule {}

Register the TinyMCEWidget in your WidgetRegistry:

    import { WidgetRegistry } from "angular2-schema-form"; 
	import { TinyMCEWidget } from "ng2sf-tinymce";

    @Component({/*...*/})
    export class AppComponent {
        constructor(widgetRegistry: WidgetRegistry) {
            widgetRegistry.register("tinymce", TinyMCEWidget);
        }
    }

Use the tinymce widget's id in your schema:

    {
        "type": "object",
        "properties": {
            "type": "string",
            "description": "A richtext input",
            "widget": "tinymce"
        }
    }

About

A TinyMCE widget for Angular2 Schema Form

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 74.2%
  • JavaScript 21.6%
  • HTML 4.2%