Coder Social home page Coder Social logo

cipchk / ngx-tinymce Goto Github PK

View Code? Open in Web Editor NEW
78.0 5.0 15.0 2.57 MB

Angular for tinymce

Home Page: https://cipchk.github.io/ngx-tinymce/

License: MIT License

TypeScript 73.43% JavaScript 10.50% HTML 10.83% CSS 5.25%
tinymce angular-components angular tinymce-editor tinymce-wysiwyg-editor ng-tinymce

ngx-tinymce's Introduction

ngx-tinymce

NPM version Ci

Tinymce Components build with Angular.

DEMO

Installation instructions

Install ngx-tinymce from npm

npm install ngx-tinymce --save

Recommend: You will need tinymce.min.js file via Build Customizer generate.

Import the ngx-tinymce in to your root AppModule.

import { NgxTinymceModule } from 'ngx-tinymce';

@NgModule({
  imports: [
    NgxTinymceModule.forRoot({
      // Local assets
      baseURL: './assets/tinymce/',
      // or cdn
      baseURL: '//cdnjs.cloudflare.com/ajax/libs/tinymce/5.7.1/'
    })
  ]
})
export class AppModule { }

If the local path should be adding assets configuration in angular.json:

"assets": [
  {
    "glob": "**/tinymce.min.js",
    "input": "./node_modules/tinymce",
    "output": "assets/tinymce/"
  }
]

Standalone

@Component({
  template: `<tinymce />`,
  standalone: true,
  imports: [TinymceComponent],
})
export class App

Globa config:

bootstrapApplication(AppComponent, {
  providers: [provideTinymce({baseURL: '//cdn.tiny.cloud/1/no-api-key/tinymce/6/'})]
});

Usage

import { Component } from '@angular/core';

@Component({
  selector: 'my-app',
  template: `<tinymce [(ngModel)]="html"></tinymce>`
})
export class AppComponent  {
  html = ``;
}

How to use it with:

  • angular-cli please refer to Installation instructions.
  • stackblitz sample available here.

API

Name Type Default Summary
config any see configure
loading string,TemplateRef - Loading status of tinymce
disabled boolean false Set tinymce mode is readonly if true
inline boolean false Inline editor
delay number 0 Delayed rendering, unit is 'millisecond'
placeholder string - Placeholder for tinymce, NOTE: dependent on tinymce-placeholder
ready EventEmitter<any> - Tinymce ready callback

Troubleshooting

Please follow this guidelines when reporting bugs and feature requests:

  1. Use GitHub Issues board to report bugs and feature requests (not our email address)
  2. Please always write steps to reproduce the error. That way we can focus on fixing the bug, not scratching our heads trying to reproduce it.

Thanks for understanding!

License

The MIT License (see the LICENSE file for the full text)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.