angular2-tinymce
Advanced tools
Comparing version 1.3.1 to 1.3.2
@@ -14,5 +14,5 @@ import { OnDestroy, AfterViewInit, NgZone } from '@angular/core'; | ||
private zone; | ||
private config; | ||
elementId: string; | ||
editor: any; | ||
config: TinymceOptions; | ||
private onTouchedCallback; | ||
@@ -22,3 +22,3 @@ private onChangeCallback; | ||
private options; | ||
constructor(zone: NgZone, config: TinymceOptions); | ||
constructor(zone: NgZone); | ||
ngAfterViewInit(): void; | ||
@@ -25,0 +25,0 @@ ngOnDestroy(): void; |
@@ -1,15 +0,2 @@ | ||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; | ||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); | ||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; | ||
return c > 3 && r && Object.defineProperty(target, key, r), r; | ||
}; | ||
var __metadata = (this && this.__metadata) || function (k, v) { | ||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); | ||
}; | ||
var __param = (this && this.__param) || function (paramIndex, decorator) { | ||
return function (target, key) { decorator(target, key, paramIndex); } | ||
}; | ||
import { Component, forwardRef, NgZone, Inject } from '@angular/core'; | ||
import { NG_VALUE_ACCESSOR } from '@angular/forms'; | ||
import { Component, NgZone } from '@angular/core'; | ||
import { TinymceDefaultOptions } from './angular2-tinymce.default'; | ||
@@ -27,8 +14,8 @@ import tinymce from 'tinymce/tinymce.js'; | ||
}; | ||
var TinymceComponent = TinymceComponent_1 = (function () { | ||
function TinymceComponent(zone, config) { | ||
var TinymceComponent = (function () { | ||
function TinymceComponent(zone) { | ||
var _this = this; | ||
this.zone = zone; | ||
this.config = config; | ||
this.elementId = 'tiny-' + Math.random().toString(36).substring(2); | ||
this.config = {}; | ||
this.onTouchedCallback = noop; | ||
@@ -101,19 +88,13 @@ this.onChangeCallback = noop; | ||
}()); | ||
TinymceComponent = TinymceComponent_1 = __decorate([ | ||
Component({ | ||
selector: 'app-tinymce', | ||
template: "<div id=\"{{elementId}}\"></div>", | ||
providers: [ | ||
{ | ||
provide: NG_VALUE_ACCESSOR, | ||
useExisting: forwardRef(function () { return TinymceComponent_1; }), | ||
multi: true | ||
} | ||
] | ||
}), | ||
__param(1, Inject('tinymce-config')), | ||
__metadata("design:paramtypes", [NgZone, Object]) | ||
], TinymceComponent); | ||
export { TinymceComponent }; | ||
var TinymceComponent_1; | ||
TinymceComponent.decorators = [ | ||
{ type: Component, args: [{ | ||
selector: 'app-tinymce', | ||
template: "<div id=\"{{elementId}}\"></div>", | ||
},] }, | ||
]; | ||
/** @nocollapse */ | ||
TinymceComponent.ctorParameters = function () { return [ | ||
{ type: NgZone, }, | ||
]; }; | ||
//# sourceMappingURL=angular2-tinymce.component.js.map |
@@ -1,7 +0,4 @@ | ||
import { ModuleWithProviders } from '@angular/core'; | ||
import { TinymceOptions } from './angular2-tinymce.config.interface'; | ||
import tinymce from 'tinymce/tinymce.js'; | ||
export declare class TinymceModule { | ||
static withConfig(userConfig?: TinymceOptions): ModuleWithProviders; | ||
} | ||
export { tinymce }; |
@@ -1,46 +0,28 @@ | ||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; | ||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); | ||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; | ||
return c > 3 && r && Object.defineProperty(target, key, r), r; | ||
}; | ||
import { NgModule } from '@angular/core'; | ||
import { TinymceComponent } from './angular2-tinymce.component'; | ||
import { FormsModule, ReactiveFormsModule } from '@angular/forms'; | ||
import { TinymceDefaultOptions } from './angular2-tinymce.default'; | ||
import tinymce from 'tinymce/tinymce.js'; | ||
var TinymceModule = TinymceModule_1 = (function () { | ||
var TinymceModule = (function () { | ||
function TinymceModule() { | ||
} | ||
TinymceModule.withConfig = function (userConfig) { | ||
if (userConfig === void 0) { userConfig = {}; } | ||
return { | ||
ngModule: TinymceModule_1, | ||
providers: [ | ||
{ provide: 'tinymce-config', useValue: userConfig } | ||
] | ||
}; | ||
}; | ||
return TinymceModule; | ||
}()); | ||
TinymceModule = TinymceModule_1 = __decorate([ | ||
NgModule({ | ||
declarations: [ | ||
TinymceComponent | ||
], | ||
imports: [ | ||
FormsModule, | ||
ReactiveFormsModule | ||
], | ||
exports: [ | ||
TinymceComponent | ||
], | ||
providers: [ | ||
{ provide: 'tinymce-config', useClass: TinymceDefaultOptions } | ||
] | ||
}) | ||
], TinymceModule); | ||
export { TinymceModule }; | ||
TinymceModule.decorators = [ | ||
{ type: NgModule, args: [{ | ||
declarations: [ | ||
TinymceComponent | ||
], | ||
imports: [ | ||
FormsModule, | ||
ReactiveFormsModule | ||
], | ||
exports: [ | ||
TinymceComponent | ||
] | ||
},] }, | ||
]; | ||
/** @nocollapse */ | ||
TinymceModule.ctorParameters = function () { return []; }; | ||
export { tinymce }; | ||
var TinymceModule_1; | ||
//# sourceMappingURL=angular2-tinymce.module.js.map |
@@ -22,9 +22,9 @@ import { Component, OnDestroy, AfterViewInit, forwardRef, NgZone, Inject } from '@angular/core'; | ||
template: `<div id="{{elementId}}"></div>`, | ||
providers: [ | ||
{ | ||
provide: NG_VALUE_ACCESSOR, | ||
useExisting: forwardRef(() => TinymceComponent), | ||
multi: true | ||
} | ||
] | ||
// providers: [ | ||
// { | ||
// provide: NG_VALUE_ACCESSOR, | ||
// useExisting: forwardRef(() => TinymceComponent), | ||
// multi: true | ||
// } | ||
// ] | ||
}) | ||
@@ -34,3 +34,3 @@ export class TinymceComponent implements ControlValueAccessor, AfterViewInit, OnDestroy { | ||
public editor: any; | ||
public config: TinymceOptions = {}; | ||
private onTouchedCallback: () => void = noop; | ||
@@ -43,3 +43,2 @@ private onChangeCallback: (_: any) => void = noop; | ||
private zone: NgZone, | ||
@Inject('tinymce-config') private config: TinymceOptions | ||
) { | ||
@@ -46,0 +45,0 @@ this.options = Object.assign(new TinymceDefaultOptions(), this.config); |
@@ -1,2 +0,2 @@ | ||
import { NgModule, ModuleWithProviders } from '@angular/core'; | ||
import { NgModule } from '@angular/core'; | ||
import { TinymceComponent } from './angular2-tinymce.component'; | ||
@@ -20,17 +20,7 @@ import { FormsModule, ReactiveFormsModule } from '@angular/forms'; | ||
TinymceComponent | ||
], | ||
providers: [ | ||
{ provide: 'tinymce-config', useClass: TinymceDefaultOptions } | ||
] | ||
}) | ||
export class TinymceModule { | ||
static withConfig(userConfig: TinymceOptions = {}): ModuleWithProviders { | ||
return { | ||
ngModule: TinymceModule, | ||
providers: [ | ||
{ provide: 'tinymce-config', useValue: userConfig } | ||
] | ||
} | ||
} | ||
} | ||
export { tinymce } |
{ | ||
"name": "angular2-tinymce", | ||
"version": "1.3.1", | ||
"version": "1.3.2", | ||
"description": "Angular 2 component for TinyMCE MCE WYSIWYG editor", | ||
@@ -5,0 +5,0 @@ "main": "dist/angular2-tinymce.module", |
@@ -17,4 +17,7 @@ { | ||
"angularCompilerOptions": { | ||
"skipTemplateCodegen": true | ||
"genDir": "compiled", | ||
"skipMetadataEmit" : false, | ||
"debug": true, | ||
"strictMetadataEmit": true | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
29352
26
571