New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@tinymce/tinymce-angular

Package Overview
Dependencies
Maintainers
1
Versions
244
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tinymce/tinymce-angular - npm Package Compare versions

Comparing version 1.0.6 to 1.0.7

19

bundles/tinymce-tinymce-angular.umd.js

@@ -219,3 +219,2 @@ (function (global, factory) {

'onPostRender',
'onPreInit',
'onPreProcess',

@@ -246,7 +245,12 @@ 'onProgressState',

*/
var bindHandlers = function (ctx, editor) {
var bindHandlers = function (ctx, editor, initEvent) {
validEvents.forEach(function (eventName) {
var /** @type {?} */ eventEmitter = ctx[eventName];
if (eventEmitter.observers.length > 0) {
editor.on(eventName.substring(2), ctx.ngZone.run(function () { return function (event) { return eventEmitter.emit({ event: event, editor: editor }); }; }));
if (eventName === 'onInit') {
ctx.ngZone.run(function () { return eventEmitter.emit({ event: initEvent, editor: editor }); });
}
else {
editor.on(eventName.substring(2), ctx.ngZone.run(function () { return function (event) { return eventEmitter.emit({ event: event, editor: editor }); }; }));
}
}

@@ -440,4 +444,4 @@ });

_this.editor = editor;
editor.on('init', function () {
_this.initEditor(editor);
editor.on('init', function (e) {
_this.initEditor(e, editor);
});

@@ -456,6 +460,7 @@ if (_this.init && typeof _this.init["setup"] === 'function') {

/**
* @param {?} initEvent
* @param {?} editor
* @return {?}
*/
EditorComponent.prototype.initEditor = function (editor) {
EditorComponent.prototype.initEditor = function (initEvent, editor) {
var _this = this;

@@ -471,3 +476,3 @@ if (typeof this.initialValue === 'string') {

editor.on('change keyup', function () { return _this.ngZone.run(function () { return _this.onChangeCallback(editor.getContent()); }); });
bindHandlers(this, editor);
bindHandlers(this, editor, initEvent);
};

@@ -474,0 +479,0 @@ return EditorComponent;

@@ -1,2 +0,2 @@

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("@angular/forms"),require("@angular/common")):"function"==typeof define&&define.amd?define(["exports","@angular/core","@angular/forms","@angular/common"],e):e((t.tinymce=t.tinymce||{},t.tinymce["tinymce-angular"]={}),t.ng.core,t.ng.forms,t.ng.common)}(this,function(t,e,n,o){"use strict";var i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};var r=function(){return function(){this.onBeforePaste=new e.EventEmitter,this.onBlur=new e.EventEmitter,this.onClick=new e.EventEmitter,this.onContextMenu=new e.EventEmitter,this.onCopy=new e.EventEmitter,this.onCut=new e.EventEmitter,this.onDblclick=new e.EventEmitter,this.onDrag=new e.EventEmitter,this.onDragDrop=new e.EventEmitter,this.onDragEnd=new e.EventEmitter,this.onDragGesture=new e.EventEmitter,this.onDragOver=new e.EventEmitter,this.onDrop=new e.EventEmitter,this.onFocus=new e.EventEmitter,this.onFocusIn=new e.EventEmitter,this.onFocusOut=new e.EventEmitter,this.onKeyDown=new e.EventEmitter,this.onKeyPress=new e.EventEmitter,this.onKeyUp=new e.EventEmitter,this.onMouseDown=new e.EventEmitter,this.onMouseEnter=new e.EventEmitter,this.onMouseLeave=new e.EventEmitter,this.onMouseMove=new e.EventEmitter,this.onMouseOut=new e.EventEmitter,this.onMouseOver=new e.EventEmitter,this.onMouseUp=new e.EventEmitter,this.onPaste=new e.EventEmitter,this.onSelectionChange=new e.EventEmitter,this.onActivate=new e.EventEmitter,this.onAddUndo=new e.EventEmitter,this.onBeforeAddUndo=new e.EventEmitter,this.onBeforeExecCommand=new e.EventEmitter,this.onBeforeGetContent=new e.EventEmitter,this.onBeforeRenderUI=new e.EventEmitter,this.onBeforeSetContent=new e.EventEmitter,this.onChange=new e.EventEmitter,this.onClearUndos=new e.EventEmitter,this.onDeactivate=new e.EventEmitter,this.onDirty=new e.EventEmitter,this.onExecCommand=new e.EventEmitter,this.onGetContent=new e.EventEmitter,this.onHide=new e.EventEmitter,this.onInit=new e.EventEmitter,this.onLoadContent=new e.EventEmitter,this.onNodeChange=new e.EventEmitter,this.onPostProcess=new e.EventEmitter,this.onPostRender=new e.EventEmitter,this.onPreInit=new e.EventEmitter,this.onPreProcess=new e.EventEmitter,this.onProgressState=new e.EventEmitter,this.onRedo=new e.EventEmitter,this.onRemove=new e.EventEmitter,this.onReset=new e.EventEmitter,this.onSaveContent=new e.EventEmitter,this.onSetAttrib=new e.EventEmitter,this.onObjectResizeStart=new e.EventEmitter,this.onObjectResized=new e.EventEmitter,this.onObjectSelected=new e.EventEmitter,this.onSetContent=new e.EventEmitter,this.onShow=new e.EventEmitter,this.onSubmit=new e.EventEmitter,this.onUndo=new e.EventEmitter,this.onVisualAid=new e.EventEmitter}}();r.propDecorators={onBeforePaste:[{type:e.Output}],onBlur:[{type:e.Output}],onClick:[{type:e.Output}],onContextMenu:[{type:e.Output}],onCopy:[{type:e.Output}],onCut:[{type:e.Output}],onDblclick:[{type:e.Output}],onDrag:[{type:e.Output}],onDragDrop:[{type:e.Output}],onDragEnd:[{type:e.Output}],onDragGesture:[{type:e.Output}],onDragOver:[{type:e.Output}],onDrop:[{type:e.Output}],onFocus:[{type:e.Output}],onFocusIn:[{type:e.Output}],onFocusOut:[{type:e.Output}],onKeyDown:[{type:e.Output}],onKeyPress:[{type:e.Output}],onKeyUp:[{type:e.Output}],onMouseDown:[{type:e.Output}],onMouseEnter:[{type:e.Output}],onMouseLeave:[{type:e.Output}],onMouseMove:[{type:e.Output}],onMouseOut:[{type:e.Output}],onMouseOver:[{type:e.Output}],onMouseUp:[{type:e.Output}],onPaste:[{type:e.Output}],onSelectionChange:[{type:e.Output}],onActivate:[{type:e.Output}],onAddUndo:[{type:e.Output}],onBeforeAddUndo:[{type:e.Output}],onBeforeExecCommand:[{type:e.Output}],onBeforeGetContent:[{type:e.Output}],onBeforeRenderUI:[{type:e.Output}],onBeforeSetContent:[{type:e.Output}],onChange:[{type:e.Output}],onClearUndos:[{type:e.Output}],onDeactivate:[{type:e.Output}],onDirty:[{type:e.Output}],onExecCommand:[{type:e.Output}],onGetContent:[{type:e.Output}],onHide:[{type:e.Output}],onInit:[{type:e.Output}],onLoadContent:[{type:e.Output}],onNodeChange:[{type:e.Output}],onPostProcess:[{type:e.Output}],onPostRender:[{type:e.Output}],onPreInit:[{type:e.Output}],onPreProcess:[{type:e.Output}],onProgressState:[{type:e.Output}],onRedo:[{type:e.Output}],onRemove:[{type:e.Output}],onReset:[{type:e.Output}],onSaveContent:[{type:e.Output}],onSetAttrib:[{type:e.Output}],onObjectResizeStart:[{type:e.Output}],onObjectResized:[{type:e.Output}],onObjectSelected:[{type:e.Output}],onSetContent:[{type:e.Output}],onShow:[{type:e.Output}],onSubmit:[{type:e.Output}],onUndo:[{type:e.Output}],onVisualAid:[{type:e.Output}]};var u=["onActivate","onAddUndo","onBeforeAddUndo","onBeforeExecCommand","onBeforeGetContent","onBeforeRenderUI","onBeforeSetContent","onBeforePaste","onBlur","onChange","onClearUndos","onClick","onContextMenu","onCopy","onCut","onDblclick","onDeactivate","onDirty","onDrag","onDragDrop","onDragEnd","onDragGesture","onDragOver","onDrop","onExecCommand","onFocus","onFocusIn","onFocusOut","onGetContent","onHide","onInit","onKeyDown","onKeyPress","onKeyUp","onLoadContent","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp","onNodeChange","onObjectResizeStart","onObjectResized","onObjectSelected","onPaste","onPostProcess","onPostRender","onPreInit","onPreProcess","onProgressState","onRedo","onRemove","onReset","onSaveContent","onSelectionChange","onSetAttrib","onSetContent","onShow","onSubmit","onUndo","onVisualAid"],s=0,p=function(t){var e=(new Date).getTime();return t+"_"+Math.floor(1e9*Math.random())+ ++s+String(e)},a=function(t){return void 0!==t&&"textarea"===t.tagName.toLowerCase()},c=function(t){return void 0===t||""===t?[]:Array.isArray(t)?t:t.split(" ")},l=function(){return global="undefined"!=typeof window?window:global,global&&global.tinymce?global.tinymce:null},h={listeners:[],scriptId:p("tiny-script"),scriptLoaded:!1},E={provide:n.NG_VALUE_ACCESSOR,useExisting:e.forwardRef(function(){return d}),multi:!0},d=function(t){function e(e,n){var o=t.call(this)||this;return o.element=undefined,o.id="",o.toolbar=null,o.onTouchedCallback=function(){},o.onChangeCallback=function(t){},o.elementRef=e,o.ngZone=n,o.initialise=o.initialise.bind(o),o}return function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}(e,t),e.prototype.writeValue=function(t){this.initialValue=t||this.initialValue,this.editor&&this.editor.initialized&&"string"==typeof t&&this.editor.setContent(t)},e.prototype.registerOnChange=function(t){this.onChangeCallback=t},e.prototype.registerOnTouched=function(t){this.onTouchedCallback=t},e.prototype.setDisabledState=function(t){this.editor?this.editor.setMode(t?"readonly":"design"):t&&(this.init=Object.assign({},this.init,{readonly:!0}))},e.prototype.ngAfterViewInit=function(){if(this.id=this.id||p("tiny-react"),this.inline="undefined"!=typeof this.inline?this.inline:this.init&&this.init.inline,this.createElement(),null!==l())this.initialise();else if(this.element){var t=this.element.ownerDocument,e=this.cloudChannel||"stable",n=this.apiKey||"";o=h,i=t,r="https://cloud.tinymce.com/"+e+"/tinymce.min.js?apiKey="+n,u=this.initialise,o.scriptLoaded?u():(o.listeners.push(u),i.getElementById(o.scriptId)||(s=o.scriptId,c=r,E=function(){o.listeners.forEach(function(t){return t()}),o.scriptLoaded=!0},(d=(a=i).createElement("script")).type="application/javascript",d.id=s,d.addEventListener("load",E),d.src=c,a.head.appendChild(d)))}var o,i,r,u,s,a,c,E,d},e.prototype.ngOnDestroy=function(){l().remove(this.editor)},e.prototype.createElement=function(){var t="string"==typeof this.tagName?this.tagName:"div";this.element=document.createElement(this.inline?t:"textarea"),this.element&&(this.element.id=this.id,a(this.element)&&(this.element.style.visibility="hidden"),this.elementRef.nativeElement.appendChild(this.element))},e.prototype.initialise=function(){var t,e,n=this,o=Object.assign({},this.init,{selector:"#"+this.id,inline:this.inline,plugins:(t=this.init&&this.init.plugins,e=this.plugins,c(t).concat(c(e))),toolbar:this.toolbar||this.init&&this.init.toolbar,setup:function(t){n.editor=t,t.on("init",function(){n.initEditor(t)}),n.init&&"function"==typeof n.init.setup&&n.init.setup(t)}});a(this.element)&&(this.element.style.visibility=""),this.ngZone.runOutsideAngular(function(){l().init(o)})},e.prototype.initEditor=function(t){var e,n,o=this;"string"==typeof this.initialValue&&this.ngZone.run(function(){return t.setContent(o.initialValue)}),t.once("blur",function(){return o.ngZone.run(function(){return o.onTouchedCallback()})}),t.on("setcontent",function(t){var e=t.content;return"html"===t.format&&e&&o.ngZone.run(function(){return o.onChangeCallback(e)})}),t.on("change keyup",function(){return o.ngZone.run(function(){return o.onChangeCallback(t.getContent())})}),e=this,n=t,u.forEach(function(t){var o=e[t];o.observers.length>0&&n.on(t.substring(2),e.ngZone.run(function(){return function(t){return o.emit({event:t,editor:n})}}))})},e}(r);d.decorators=[{type:e.Component,args:[{selector:"editor",template:"<ng-template></ng-template>",styles:[":host { display: block; }"],providers:[E]}]}],d.ctorParameters=function(){return[{type:e.ElementRef},{type:e.NgZone}]},d.propDecorators={cloudChannel:[{type:e.Input}],apiKey:[{type:e.Input}],init:[{type:e.Input}],id:[{type:e.Input}],initialValue:[{type:e.Input}],inline:[{type:e.Input}],tagName:[{type:e.Input}],plugins:[{type:e.Input}],toolbar:[{type:e.Input}]};var m=function(){return function(){}}();m.decorators=[{type:e.NgModule,args:[{imports:[o.CommonModule,n.FormsModule],declarations:[d],exports:[d]}]}],m.ctorParameters=function(){return[]},t.EditorModule=m,t.ɵb=r,t.ɵa=d,Object.defineProperty(t,"__esModule",{value:!0})});
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("@angular/forms"),require("@angular/common")):"function"==typeof define&&define.amd?define(["exports","@angular/core","@angular/forms","@angular/common"],e):e((t.tinymce=t.tinymce||{},t.tinymce["tinymce-angular"]={}),t.ng.core,t.ng.forms,t.ng.common)}(this,function(t,e,n,o){"use strict";var i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};var r=function(){return function(){this.onBeforePaste=new e.EventEmitter,this.onBlur=new e.EventEmitter,this.onClick=new e.EventEmitter,this.onContextMenu=new e.EventEmitter,this.onCopy=new e.EventEmitter,this.onCut=new e.EventEmitter,this.onDblclick=new e.EventEmitter,this.onDrag=new e.EventEmitter,this.onDragDrop=new e.EventEmitter,this.onDragEnd=new e.EventEmitter,this.onDragGesture=new e.EventEmitter,this.onDragOver=new e.EventEmitter,this.onDrop=new e.EventEmitter,this.onFocus=new e.EventEmitter,this.onFocusIn=new e.EventEmitter,this.onFocusOut=new e.EventEmitter,this.onKeyDown=new e.EventEmitter,this.onKeyPress=new e.EventEmitter,this.onKeyUp=new e.EventEmitter,this.onMouseDown=new e.EventEmitter,this.onMouseEnter=new e.EventEmitter,this.onMouseLeave=new e.EventEmitter,this.onMouseMove=new e.EventEmitter,this.onMouseOut=new e.EventEmitter,this.onMouseOver=new e.EventEmitter,this.onMouseUp=new e.EventEmitter,this.onPaste=new e.EventEmitter,this.onSelectionChange=new e.EventEmitter,this.onActivate=new e.EventEmitter,this.onAddUndo=new e.EventEmitter,this.onBeforeAddUndo=new e.EventEmitter,this.onBeforeExecCommand=new e.EventEmitter,this.onBeforeGetContent=new e.EventEmitter,this.onBeforeRenderUI=new e.EventEmitter,this.onBeforeSetContent=new e.EventEmitter,this.onChange=new e.EventEmitter,this.onClearUndos=new e.EventEmitter,this.onDeactivate=new e.EventEmitter,this.onDirty=new e.EventEmitter,this.onExecCommand=new e.EventEmitter,this.onGetContent=new e.EventEmitter,this.onHide=new e.EventEmitter,this.onInit=new e.EventEmitter,this.onLoadContent=new e.EventEmitter,this.onNodeChange=new e.EventEmitter,this.onPostProcess=new e.EventEmitter,this.onPostRender=new e.EventEmitter,this.onPreInit=new e.EventEmitter,this.onPreProcess=new e.EventEmitter,this.onProgressState=new e.EventEmitter,this.onRedo=new e.EventEmitter,this.onRemove=new e.EventEmitter,this.onReset=new e.EventEmitter,this.onSaveContent=new e.EventEmitter,this.onSetAttrib=new e.EventEmitter,this.onObjectResizeStart=new e.EventEmitter,this.onObjectResized=new e.EventEmitter,this.onObjectSelected=new e.EventEmitter,this.onSetContent=new e.EventEmitter,this.onShow=new e.EventEmitter,this.onSubmit=new e.EventEmitter,this.onUndo=new e.EventEmitter,this.onVisualAid=new e.EventEmitter}}();r.propDecorators={onBeforePaste:[{type:e.Output}],onBlur:[{type:e.Output}],onClick:[{type:e.Output}],onContextMenu:[{type:e.Output}],onCopy:[{type:e.Output}],onCut:[{type:e.Output}],onDblclick:[{type:e.Output}],onDrag:[{type:e.Output}],onDragDrop:[{type:e.Output}],onDragEnd:[{type:e.Output}],onDragGesture:[{type:e.Output}],onDragOver:[{type:e.Output}],onDrop:[{type:e.Output}],onFocus:[{type:e.Output}],onFocusIn:[{type:e.Output}],onFocusOut:[{type:e.Output}],onKeyDown:[{type:e.Output}],onKeyPress:[{type:e.Output}],onKeyUp:[{type:e.Output}],onMouseDown:[{type:e.Output}],onMouseEnter:[{type:e.Output}],onMouseLeave:[{type:e.Output}],onMouseMove:[{type:e.Output}],onMouseOut:[{type:e.Output}],onMouseOver:[{type:e.Output}],onMouseUp:[{type:e.Output}],onPaste:[{type:e.Output}],onSelectionChange:[{type:e.Output}],onActivate:[{type:e.Output}],onAddUndo:[{type:e.Output}],onBeforeAddUndo:[{type:e.Output}],onBeforeExecCommand:[{type:e.Output}],onBeforeGetContent:[{type:e.Output}],onBeforeRenderUI:[{type:e.Output}],onBeforeSetContent:[{type:e.Output}],onChange:[{type:e.Output}],onClearUndos:[{type:e.Output}],onDeactivate:[{type:e.Output}],onDirty:[{type:e.Output}],onExecCommand:[{type:e.Output}],onGetContent:[{type:e.Output}],onHide:[{type:e.Output}],onInit:[{type:e.Output}],onLoadContent:[{type:e.Output}],onNodeChange:[{type:e.Output}],onPostProcess:[{type:e.Output}],onPostRender:[{type:e.Output}],onPreInit:[{type:e.Output}],onPreProcess:[{type:e.Output}],onProgressState:[{type:e.Output}],onRedo:[{type:e.Output}],onRemove:[{type:e.Output}],onReset:[{type:e.Output}],onSaveContent:[{type:e.Output}],onSetAttrib:[{type:e.Output}],onObjectResizeStart:[{type:e.Output}],onObjectResized:[{type:e.Output}],onObjectSelected:[{type:e.Output}],onSetContent:[{type:e.Output}],onShow:[{type:e.Output}],onSubmit:[{type:e.Output}],onUndo:[{type:e.Output}],onVisualAid:[{type:e.Output}]};var u=["onActivate","onAddUndo","onBeforeAddUndo","onBeforeExecCommand","onBeforeGetContent","onBeforeRenderUI","onBeforeSetContent","onBeforePaste","onBlur","onChange","onClearUndos","onClick","onContextMenu","onCopy","onCut","onDblclick","onDeactivate","onDirty","onDrag","onDragDrop","onDragEnd","onDragGesture","onDragOver","onDrop","onExecCommand","onFocus","onFocusIn","onFocusOut","onGetContent","onHide","onInit","onKeyDown","onKeyPress","onKeyUp","onLoadContent","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp","onNodeChange","onObjectResizeStart","onObjectResized","onObjectSelected","onPaste","onPostProcess","onPostRender","onPreProcess","onProgressState","onRedo","onRemove","onReset","onSaveContent","onSelectionChange","onSetAttrib","onSetContent","onShow","onSubmit","onUndo","onVisualAid"],s=0,p=function(t){var e=(new Date).getTime();return t+"_"+Math.floor(1e9*Math.random())+ ++s+String(e)},a=function(t){return void 0!==t&&"textarea"===t.tagName.toLowerCase()},c=function(t){return void 0===t||""===t?[]:Array.isArray(t)?t:t.split(" ")},l=function(){return global="undefined"!=typeof window?window:global,global&&global.tinymce?global.tinymce:null},h={listeners:[],scriptId:p("tiny-script"),scriptLoaded:!1},E={provide:n.NG_VALUE_ACCESSOR,useExisting:e.forwardRef(function(){return d}),multi:!0},d=function(t){function e(e,n){var o=t.call(this)||this;return o.element=undefined,o.id="",o.toolbar=null,o.onTouchedCallback=function(){},o.onChangeCallback=function(t){},o.elementRef=e,o.ngZone=n,o.initialise=o.initialise.bind(o),o}return function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}(e,t),e.prototype.writeValue=function(t){this.initialValue=t||this.initialValue,this.editor&&this.editor.initialized&&"string"==typeof t&&this.editor.setContent(t)},e.prototype.registerOnChange=function(t){this.onChangeCallback=t},e.prototype.registerOnTouched=function(t){this.onTouchedCallback=t},e.prototype.setDisabledState=function(t){this.editor?this.editor.setMode(t?"readonly":"design"):t&&(this.init=Object.assign({},this.init,{readonly:!0}))},e.prototype.ngAfterViewInit=function(){if(this.id=this.id||p("tiny-react"),this.inline="undefined"!=typeof this.inline?this.inline:this.init&&this.init.inline,this.createElement(),null!==l())this.initialise();else if(this.element){var t=this.element.ownerDocument,e=this.cloudChannel||"stable",n=this.apiKey||"";o=h,i=t,r="https://cloud.tinymce.com/"+e+"/tinymce.min.js?apiKey="+n,u=this.initialise,o.scriptLoaded?u():(o.listeners.push(u),i.getElementById(o.scriptId)||(s=o.scriptId,c=r,E=function(){o.listeners.forEach(function(t){return t()}),o.scriptLoaded=!0},(d=(a=i).createElement("script")).type="application/javascript",d.id=s,d.addEventListener("load",E),d.src=c,a.head.appendChild(d)))}var o,i,r,u,s,a,c,E,d},e.prototype.ngOnDestroy=function(){l().remove(this.editor)},e.prototype.createElement=function(){var t="string"==typeof this.tagName?this.tagName:"div";this.element=document.createElement(this.inline?t:"textarea"),this.element&&(this.element.id=this.id,a(this.element)&&(this.element.style.visibility="hidden"),this.elementRef.nativeElement.appendChild(this.element))},e.prototype.initialise=function(){var t,e,n=this,o=Object.assign({},this.init,{selector:"#"+this.id,inline:this.inline,plugins:(t=this.init&&this.init.plugins,e=this.plugins,c(t).concat(c(e))),toolbar:this.toolbar||this.init&&this.init.toolbar,setup:function(t){n.editor=t,t.on("init",function(e){n.initEditor(e,t)}),n.init&&"function"==typeof n.init.setup&&n.init.setup(t)}});a(this.element)&&(this.element.style.visibility=""),this.ngZone.runOutsideAngular(function(){l().init(o)})},e.prototype.initEditor=function(t,e){var n,o,i,r=this;"string"==typeof this.initialValue&&this.ngZone.run(function(){return e.setContent(r.initialValue)}),e.once("blur",function(){return r.ngZone.run(function(){return r.onTouchedCallback()})}),e.on("setcontent",function(t){var e=t.content;return"html"===t.format&&e&&r.ngZone.run(function(){return r.onChangeCallback(e)})}),e.on("change keyup",function(){return r.ngZone.run(function(){return r.onChangeCallback(e.getContent())})}),n=this,o=e,i=t,u.forEach(function(t){var e=n[t];e.observers.length>0&&("onInit"===t?n.ngZone.run(function(){return e.emit({event:i,editor:o})}):o.on(t.substring(2),n.ngZone.run(function(){return function(t){return e.emit({event:t,editor:o})}})))})},e}(r);d.decorators=[{type:e.Component,args:[{selector:"editor",template:"<ng-template></ng-template>",styles:[":host { display: block; }"],providers:[E]}]}],d.ctorParameters=function(){return[{type:e.ElementRef},{type:e.NgZone}]},d.propDecorators={cloudChannel:[{type:e.Input}],apiKey:[{type:e.Input}],init:[{type:e.Input}],id:[{type:e.Input}],initialValue:[{type:e.Input}],inline:[{type:e.Input}],tagName:[{type:e.Input}],plugins:[{type:e.Input}],toolbar:[{type:e.Input}]};var m=function(){return function(){}}();m.decorators=[{type:e.NgModule,args:[{imports:[o.CommonModule,n.FormsModule],declarations:[d],exports:[d]}]}],m.ctorParameters=function(){return[]},t.EditorModule=m,t.ɵb=r,t.ɵa=d,Object.defineProperty(t,"__esModule",{value:!0})});
//# sourceMappingURL=tinymce-tinymce-angular.umd.min.js.map

@@ -31,3 +31,3 @@ import { AfterViewInit, ElementRef, OnDestroy, NgZone } from '@angular/core';

initialise(): void;
private initEditor(editor);
private initEditor(initEvent, editor);
}

@@ -195,3 +195,2 @@ import { Output, EventEmitter, Component, Input, ElementRef, forwardRef, NgZone, NgModule } from '@angular/core';

'onPostRender',
'onPreInit',
'onPreProcess',

@@ -223,7 +222,12 @@ 'onProgressState',

*/
const bindHandlers = (ctx, editor) => {
const bindHandlers = (ctx, editor, initEvent) => {
validEvents.forEach((eventName) => {
const /** @type {?} */ eventEmitter = ctx[eventName];
if (eventEmitter.observers.length > 0) {
editor.on(eventName.substring(2), ctx.ngZone.run(() => (event) => eventEmitter.emit({ event, editor })));
if (eventName === 'onInit') {
ctx.ngZone.run(() => eventEmitter.emit({ event: initEvent, editor }));
}
else {
editor.on(eventName.substring(2), ctx.ngZone.run(() => (event) => eventEmitter.emit({ event, editor })));
}
}

@@ -418,4 +422,4 @@ });

this.editor = editor;
editor.on('init', () => {
this.initEditor(editor);
editor.on('init', (e) => {
this.initEditor(e, editor);
});

@@ -434,6 +438,7 @@ if (this.init && typeof this.init["setup"] === 'function') {

/**
* @param {?} initEvent
* @param {?} editor
* @return {?}
*/
initEditor(editor) {
initEditor(initEvent, editor) {
if (typeof this.initialValue === 'string') {

@@ -445,3 +450,3 @@ this.ngZone.run(() => editor.setContent(this.initialValue));

editor.on('change keyup', () => this.ngZone.run(() => this.onChangeCallback(editor.getContent())));
bindHandlers(this, editor);
bindHandlers(this, editor, initEvent);
}

@@ -448,0 +453,0 @@ }

@@ -195,3 +195,2 @@ import * as tslib_1 from "tslib";

'onPostRender',
'onPreInit',
'onPreProcess',

@@ -222,7 +221,12 @@ 'onProgressState',

*/
var bindHandlers = function (ctx, editor) {
var bindHandlers = function (ctx, editor, initEvent) {
validEvents.forEach(function (eventName) {
var /** @type {?} */ eventEmitter = ctx[eventName];
if (eventEmitter.observers.length > 0) {
editor.on(eventName.substring(2), ctx.ngZone.run(function () { return function (event) { return eventEmitter.emit({ event: event, editor: editor }); }; }));
if (eventName === 'onInit') {
ctx.ngZone.run(function () { return eventEmitter.emit({ event: initEvent, editor: editor }); });
}
else {
editor.on(eventName.substring(2), ctx.ngZone.run(function () { return function (event) { return eventEmitter.emit({ event: event, editor: editor }); }; }));
}
}

@@ -416,4 +420,4 @@ });

_this.editor = editor;
editor.on('init', function () {
_this.initEditor(editor);
editor.on('init', function (e) {
_this.initEditor(e, editor);
});

@@ -432,6 +436,7 @@ if (_this.init && typeof _this.init["setup"] === 'function') {

/**
* @param {?} initEvent
* @param {?} editor
* @return {?}
*/
EditorComponent.prototype.initEditor = function (editor) {
EditorComponent.prototype.initEditor = function (initEvent, editor) {
var _this = this;

@@ -447,3 +452,3 @@ if (typeof this.initialValue === 'string') {

editor.on('change keyup', function () { return _this.ngZone.run(function () { return _this.onChangeCallback(editor.getContent()); }); });
bindHandlers(this, editor);
bindHandlers(this, editor, initEvent);
};

@@ -450,0 +455,0 @@ return EditorComponent;

{
"name": "@tinymce/tinymce-angular",
"description": "Official TinyMCE Angular Component",
"version": "1.0.6",
"version": "1.0.7",
"repository": "https://github.com/tinymce/tinymce-angular.git",

@@ -6,0 +6,0 @@ "author": "Ephox Inc",

@@ -134,3 +134,2 @@ # Official TinyMCE Angular Component

* `onPostRender`
* `onPreInit`
* `onPreProcess`

@@ -137,0 +136,0 @@ * `onProgressState`

import { EditorComponent } from '../editor/editor.component';
export declare const bindHandlers: (ctx: EditorComponent, editor: any) => void;
export declare const bindHandlers: (ctx: EditorComponent, editor: any, initEvent: Event) => void;
export declare const uuid: (prefix: string) => string;
export declare const isTextarea: (element?: Element) => element is HTMLTextAreaElement;
export declare const mergePlugins: (initPlugins: string | string[], inputPlugins?: string | string[]) => string[];

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc