Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

aurelia-froala-editor

Package Overview
Dependencies
Maintainers
2
Versions
116
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

aurelia-froala-editor - npm Package Compare versions

Comparing version 2.7.0 to 2.7.1

dist/amd/froala-editor-config.js

49

dist/amd/froala-editor.js

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

define(['exports', 'aurelia-framework', 'aurelia-binding', 'aurelia-i18n', 'aurelia-event-aggregator'], function (exports, _aureliaFramework, _aureliaBinding, _aureliaI18n, _aureliaEventAggregator) {
define(['exports', 'aurelia-framework', 'aurelia-binding', 'aurelia-event-aggregator', './froala-editor-config'], function (exports, _aureliaFramework, _aureliaBinding, _aureliaEventAggregator, _froalaEditorConfig) {
'use strict';

@@ -58,7 +58,6 @@

var _dec, _class, _desc, _value, _class2, _descriptor, _descriptor2, _descriptor3;
var _dec, _dec2, _class, _desc, _value, _class2, _descriptor, _descriptor2, _descriptor3;
(0, _aureliaFramework.customElement)('froala-editor');
var FroalaEditor = exports.FroalaEditor = (_dec = (0, _aureliaFramework.inject)(Element, _aureliaBinding.ObserverLocator, _aureliaI18n.I18N, _aureliaEventAggregator.EventAggregator), _dec(_class = (_class2 = function () {
function FroalaEditor(element, observerLocator, i18n, eventAggregator) {
var FroalaEditor = exports.FroalaEditor = (_dec = (0, _aureliaFramework.customElement)('froala-editor'), _dec2 = (0, _aureliaFramework.inject)(Element, _froalaEditorConfig.Config, _aureliaBinding.ObserverLocator, _aureliaEventAggregator.EventAggregator), _dec(_class = _dec2(_class = (_class2 = function () {
function FroalaEditor(element, config, observerLocator, eventAggregator) {
var _this = this;

@@ -74,23 +73,14 @@

this.i18nInitialized = false;
this.element = element;
this.element = element;
this.config = config.options();
this.subscriptions = [observerLocator.getObserver(this, 'value').subscribe(function (newValue, oldValue) {
if (_this.instance && _this.instance.froalaEditor('html.get') != newValue) {
_this.instance.froalaEditor('html.set', newValue);
_this.updateEmptyStatus();
}
})];
this.i18n = i18n;
eventAggregator.subscribe('i18n:locale:changed', function (payload) {
_this.processLanguageChanged();
});
}
FroalaEditor.prototype.processLanguageChanged = function processLanguageChanged() {
this.tearDownFroala();
this.setupFroala();
};
FroalaEditor.prototype.setupFroala = function setupFroala() {
FroalaEditor.prototype.tearUp = function tearUp() {
var _this2 = this;

@@ -103,7 +93,5 @@

}
var c = {};
c.language = this.i18n.getLocale();
Object.assign(c, this.config);
this.instance.froalaEditor(c);
this.instance.froalaEditor('html.set', this.value);
this.instance.html(this.value);
if (this.eventHandlers && this.eventHandlers.length != 0) {

@@ -122,13 +110,14 @@ var _loop = function _loop(eventHandlerName) {

}
this.instance.on('froalaEditor.contentChanged', function (e, editor) {
this.instance.on('froalaEditor.contentChanged, froalaEditor.blur', function (e, editor) {
return _this2.value = editor.html.get();
});
this.instance.froalaEditor(Object.assign({}, this.config));
};
FroalaEditor.prototype.updateEmptyStatus = function updateEmptyStatus() {};
FroalaEditor.prototype.tearDownFroala = function tearDownFroala() {
FroalaEditor.prototype.tearDown = function tearDown() {
if (this.instance && this.instance.data('froala.editor')) {
this.instance.froalaEditor('destroy');
}
this.instance = null;

@@ -138,7 +127,7 @@ };

FroalaEditor.prototype.attached = function attached() {
this.setupFroala();
this.tearUp();
};
FroalaEditor.prototype.detached = function detached() {
this.tearDownFroala();
this.tearDown();
};

@@ -160,3 +149,3 @@

}
})), _class2)) || _class);
})), _class2)) || _class) || _class);
});

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

define(['exports'], function (exports) {
define(['exports', './froala-editor-config'], function (exports, _froalaEditorConfig) {
'use strict';

@@ -8,5 +8,11 @@

exports.configure = configure;
function configure(aurelia, config) {
function configure(aurelia, configCallback) {
var instance = aurelia.container.get(_froalaEditorConfig.Config);
if (configCallback !== undefined && typeof configCallback === 'function') {
configCallback(instance);
}
aurelia.globalResources('./froala-editor');
}
});

@@ -8,3 +8,3 @@ 'use strict';

var _dec, _class, _desc, _value, _class2, _descriptor, _descriptor2, _descriptor3;
var _dec, _dec2, _class, _desc, _value, _class2, _descriptor, _descriptor2, _descriptor3;

@@ -15,6 +15,6 @@ var _aureliaFramework = require('aurelia-framework');

var _aureliaI18n = require('aurelia-i18n');
var _aureliaEventAggregator = require('aurelia-event-aggregator');
var _froalaEditorConfig = require('./froala-editor-config');
function _initDefineProp(target, property, descriptor, context) {

@@ -65,5 +65,4 @@ if (!descriptor) return;

(0, _aureliaFramework.customElement)('froala-editor');
var FroalaEditor = exports.FroalaEditor = (_dec = (0, _aureliaFramework.inject)(Element, _aureliaBinding.ObserverLocator, _aureliaI18n.I18N, _aureliaEventAggregator.EventAggregator), _dec(_class = (_class2 = function () {
function FroalaEditor(element, observerLocator, i18n, eventAggregator) {
var FroalaEditor = exports.FroalaEditor = (_dec = (0, _aureliaFramework.customElement)('froala-editor'), _dec2 = (0, _aureliaFramework.inject)(Element, _froalaEditorConfig.Config, _aureliaBinding.ObserverLocator, _aureliaEventAggregator.EventAggregator), _dec(_class = _dec2(_class = (_class2 = function () {
function FroalaEditor(element, config, observerLocator, eventAggregator) {
var _this = this;

@@ -79,23 +78,14 @@

this.i18nInitialized = false;
this.element = element;
this.element = element;
this.config = config.options();
this.subscriptions = [observerLocator.getObserver(this, 'value').subscribe(function (newValue, oldValue) {
if (_this.instance && _this.instance.froalaEditor('html.get') != newValue) {
_this.instance.froalaEditor('html.set', newValue);
_this.updateEmptyStatus();
}
})];
this.i18n = i18n;
eventAggregator.subscribe('i18n:locale:changed', function (payload) {
_this.processLanguageChanged();
});
}
FroalaEditor.prototype.processLanguageChanged = function processLanguageChanged() {
this.tearDownFroala();
this.setupFroala();
};
FroalaEditor.prototype.setupFroala = function setupFroala() {
FroalaEditor.prototype.tearUp = function tearUp() {
var _this2 = this;

@@ -108,7 +98,5 @@

}
var c = {};
c.language = this.i18n.getLocale();
Object.assign(c, this.config);
this.instance.froalaEditor(c);
this.instance.froalaEditor('html.set', this.value);
this.instance.html(this.value);
if (this.eventHandlers && this.eventHandlers.length != 0) {

@@ -127,13 +115,14 @@ var _loop = function _loop(eventHandlerName) {

}
this.instance.on('froalaEditor.contentChanged', function (e, editor) {
this.instance.on('froalaEditor.contentChanged, froalaEditor.blur', function (e, editor) {
return _this2.value = editor.html.get();
});
this.instance.froalaEditor(Object.assign({}, this.config));
};
FroalaEditor.prototype.updateEmptyStatus = function updateEmptyStatus() {};
FroalaEditor.prototype.tearDownFroala = function tearDownFroala() {
FroalaEditor.prototype.tearDown = function tearDown() {
if (this.instance && this.instance.data('froala.editor')) {
this.instance.froalaEditor('destroy');
}
this.instance = null;

@@ -143,7 +132,7 @@ };

FroalaEditor.prototype.attached = function attached() {
this.setupFroala();
this.tearUp();
};
FroalaEditor.prototype.detached = function detached() {
this.tearDownFroala();
this.tearDown();
};

@@ -165,2 +154,2 @@

}
})), _class2)) || _class);
})), _class2)) || _class) || _class);

@@ -7,4 +7,13 @@ 'use strict';

exports.configure = configure;
function configure(aurelia, config) {
var _froalaEditorConfig = require('./froala-editor-config');
function configure(aurelia, configCallback) {
var instance = aurelia.container.get(_froalaEditorConfig.Config);
if (configCallback !== undefined && typeof configCallback === 'function') {
configCallback(instance);
}
aurelia.globalResources('./froala-editor');
}

@@ -1,5 +0,3 @@

'use strict';
var _dec, _dec2, _class, _desc, _value, _class2, _descriptor, _descriptor2, _descriptor3;
var _dec, _class, _desc, _value, _class2, _descriptor, _descriptor2, _descriptor3;
function _initDefineProp(target, property, descriptor, context) {

@@ -48,12 +46,11 @@ if (!descriptor) return;

import { customElement, bindable, inject } from 'aurelia-framework';
import { inject, customElement, bindable } from 'aurelia-framework';
import { ObserverLocator } from "aurelia-binding";
import { I18N } from "aurelia-i18n";
import { EventAggregator } from 'aurelia-event-aggregator';
customElement('froala-editor');
import { Config } from './froala-editor-config';
export let FroalaEditor = (_dec = inject(Element, ObserverLocator, I18N, EventAggregator), _dec(_class = (_class2 = class FroalaEditor {
export let FroalaEditor = (_dec = customElement('froala-editor'), _dec2 = inject(Element, Config, ObserverLocator, EventAggregator), _dec(_class = _dec2(_class = (_class2 = class FroalaEditor {
constructor(element, observerLocator, i18n, eventAggregator) {
constructor(element, config, observerLocator, eventAggregator) {
_initDefineProp(this, 'value', _descriptor, this);

@@ -65,23 +62,14 @@

this.i18nInitialized = false;
this.element = element;
this.element = element;
this.config = config.options();
this.subscriptions = [observerLocator.getObserver(this, 'value').subscribe((newValue, oldValue) => {
if (this.instance && this.instance.froalaEditor('html.get') != newValue) {
this.instance.froalaEditor('html.set', newValue);
this.updateEmptyStatus();
}
})];
this.i18n = i18n;
eventAggregator.subscribe('i18n:locale:changed', payload => {
this.processLanguageChanged();
});
}
processLanguageChanged() {
this.tearDownFroala();
this.setupFroala();
}
setupFroala() {
tearUp() {
this.instance = $(this.element.getElementsByTagName("div")[0]);

@@ -92,7 +80,5 @@

}
let c = {};
c.language = this.i18n.getLocale();
Object.assign(c, this.config);
this.instance.froalaEditor(c);
this.instance.froalaEditor('html.set', this.value);
this.instance.html(this.value);
if (this.eventHandlers && this.eventHandlers.length != 0) {

@@ -107,11 +93,12 @@ for (let eventHandlerName in this.eventHandlers) {

}
this.instance.on('froalaEditor.contentChanged', (e, editor) => this.value = editor.html.get());
this.instance.on('froalaEditor.contentChanged, froalaEditor.blur', (e, editor) => this.value = editor.html.get());
this.instance.froalaEditor(Object.assign({}, this.config));
}
updateEmptyStatus() {}
tearDownFroala() {
tearDown() {
if (this.instance && this.instance.data('froala.editor')) {
this.instance.froalaEditor('destroy');
}
this.instance = null;

@@ -121,7 +108,7 @@ }

attached() {
this.setupFroala();
this.tearUp();
}
detached() {
this.tearDownFroala();
this.tearDown();
}

@@ -141,2 +128,2 @@ }, (_descriptor = _applyDecoratedDescriptor(_class2.prototype, 'value', [bindable], {

}
})), _class2)) || _class);
})), _class2)) || _class) || _class);

@@ -1,3 +0,11 @@

export function configure(aurelia, config) {
import { Config } from './froala-editor-config';
export function configure(aurelia, configCallback) {
const instance = aurelia.container.get(Config);
if (configCallback !== undefined && typeof configCallback === 'function') {
configCallback(instance);
}
aurelia.globalResources('./froala-editor');
}
'use strict';
System.register(['aurelia-framework', 'aurelia-binding', 'aurelia-i18n', 'aurelia-event-aggregator'], function (_export, _context) {
System.register(['aurelia-framework', 'aurelia-binding', 'aurelia-event-aggregator', './froala-editor-config'], function (_export, _context) {
"use strict";
var customElement, bindable, inject, ObserverLocator, I18N, EventAggregator, _dec, _class, _desc, _value, _class2, _descriptor, _descriptor2, _descriptor3, FroalaEditor;
var inject, customElement, bindable, ObserverLocator, EventAggregator, Config, _dec, _dec2, _class, _desc, _value, _class2, _descriptor, _descriptor2, _descriptor3, FroalaEditor;

@@ -59,18 +59,15 @@ function _initDefineProp(target, property, descriptor, context) {

setters: [function (_aureliaFramework) {
inject = _aureliaFramework.inject;
customElement = _aureliaFramework.customElement;
bindable = _aureliaFramework.bindable;
inject = _aureliaFramework.inject;
}, function (_aureliaBinding) {
ObserverLocator = _aureliaBinding.ObserverLocator;
}, function (_aureliaI18n) {
I18N = _aureliaI18n.I18N;
}, function (_aureliaEventAggregator) {
EventAggregator = _aureliaEventAggregator.EventAggregator;
}, function (_froalaEditorConfig) {
Config = _froalaEditorConfig.Config;
}],
execute: function () {
customElement('froala-editor');
_export('FroalaEditor', FroalaEditor = (_dec = inject(Element, ObserverLocator, I18N, EventAggregator), _dec(_class = (_class2 = function () {
function FroalaEditor(element, observerLocator, i18n, eventAggregator) {
_export('FroalaEditor', FroalaEditor = (_dec = customElement('froala-editor'), _dec2 = inject(Element, Config, ObserverLocator, EventAggregator), _dec(_class = _dec2(_class = (_class2 = function () {
function FroalaEditor(element, config, observerLocator, eventAggregator) {
var _this = this;

@@ -86,23 +83,14 @@

this.i18nInitialized = false;
this.element = element;
this.element = element;
this.config = config.options();
this.subscriptions = [observerLocator.getObserver(this, 'value').subscribe(function (newValue, oldValue) {
if (_this.instance && _this.instance.froalaEditor('html.get') != newValue) {
_this.instance.froalaEditor('html.set', newValue);
_this.updateEmptyStatus();
}
})];
this.i18n = i18n;
eventAggregator.subscribe('i18n:locale:changed', function (payload) {
_this.processLanguageChanged();
});
}
FroalaEditor.prototype.processLanguageChanged = function processLanguageChanged() {
this.tearDownFroala();
this.setupFroala();
};
FroalaEditor.prototype.setupFroala = function setupFroala() {
FroalaEditor.prototype.tearUp = function tearUp() {
var _this2 = this;

@@ -115,7 +103,5 @@

}
var c = {};
c.language = this.i18n.getLocale();
Object.assign(c, this.config);
this.instance.froalaEditor(c);
this.instance.froalaEditor('html.set', this.value);
this.instance.html(this.value);
if (this.eventHandlers && this.eventHandlers.length != 0) {

@@ -134,13 +120,14 @@ var _loop = function _loop(eventHandlerName) {

}
this.instance.on('froalaEditor.contentChanged', function (e, editor) {
this.instance.on('froalaEditor.contentChanged, froalaEditor.blur', function (e, editor) {
return _this2.value = editor.html.get();
});
this.instance.froalaEditor(Object.assign({}, this.config));
};
FroalaEditor.prototype.updateEmptyStatus = function updateEmptyStatus() {};
FroalaEditor.prototype.tearDownFroala = function tearDownFroala() {
FroalaEditor.prototype.tearDown = function tearDown() {
if (this.instance && this.instance.data('froala.editor')) {
this.instance.froalaEditor('destroy');
}
this.instance = null;

@@ -150,7 +137,7 @@ };

FroalaEditor.prototype.attached = function attached() {
this.setupFroala();
this.tearUp();
};
FroalaEditor.prototype.detached = function detached() {
this.tearDownFroala();
this.tearDown();
};

@@ -172,3 +159,3 @@

}
})), _class2)) || _class));
})), _class2)) || _class) || _class));

@@ -175,0 +162,0 @@ _export('FroalaEditor', FroalaEditor);

'use strict';
System.register([], function (_export, _context) {
System.register(['./froala-editor-config'], function (_export, _context) {
"use strict";
function configure(aurelia, config) {
var Config;
function configure(aurelia, configCallback) {
var instance = aurelia.container.get(Config);
if (configCallback !== undefined && typeof configCallback === 'function') {
configCallback(instance);
}
aurelia.globalResources('./froala-editor');

@@ -13,5 +20,7 @@ }

return {
setters: [],
setters: [function (_froalaEditorConfig) {
Config = _froalaEditorConfig.Config;
}],
execute: function () {}
};
});
{
"name": "aurelia-froala-editor",
"version": "2.7.0",
"version": "2.7.1",
"description": "Aurelia plugin for Froala WYSIWYG HTML rich text editor.",

@@ -5,0 +5,0 @@ "keywords": [

@@ -129,5 +129,29 @@ # aurelia-froala-editor

- Open newly created `aurelia_project/tasks/copy-assets.js` file and make it look like this:
```javascript
import gulp from 'gulp';
import project from '../aurelia.json';
export default function copyAssets(done) {
let assets = project.paths.assets;
assets.forEach(item => {
gulp.src(item.src)
.pipe(gulp.dest(item.dest));
});
done();
}
```
- Add Font Awesome paths to `aurelia_project/aurelia.json` file:
```javascript
au generate task copy-assets
```
- A
```javascript
{

@@ -154,3 +178,3 @@ "paths": {

```bash
au start --watch
au run --watch
```

@@ -157,0 +181,0 @@

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