
Research
/Security News
9 Malicious NuGet Packages Deliver Time-Delayed Destructive Payloads
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.
ember-froala
Advanced tools
Ember component for FroalaWysiwygEditor. Fully customizable wysiwyg editor for emberjs. Create a new buttons and intergrate into your ember application. Post images images and html to your own server.
This addon has been deprecated in favor of ember-froala-editor.
ember install ember-froalabower_components/font-awesome and paste it into public folderSee demo app source for example usage.
import Ember from 'ember';
export default Ember.Component.extend({
value: 'test',
froalaEditor: {
params: {
toolbarInline: true,
placeholderText: 'Enter..'
// For more params refer: 'https://www.froala.com/wysiwyg-editor/docs/options'
},
},
actions: {
// For more events refer: 'https://www.froala.com/wysiwyg-editor/docs/events'
contentChanged: function(event, editor) {
console.log("Content Changed");
console.log(event);
console.log(editor);
},
focus: function(event, editor) {
console.log("Focus");
console.log(event);
console.log(editor);
},
},
});
{{froala-editor params=froalaEditor.params value=value focus=(action "focus") contentChanged=(action "contentChanged")}}
Mapping nested events Nested events use underscores to trigger their respective Froala events.
{{froala-editor params=froalaEditor.params image_uploaded=(action "image_uploaded")}}
{{froala-editor params=froalaEditor.params imageManager_beforeDeleteImage=(action "imageManager_beforeDeleteImage")}}
Save button
{{froala-editor params=froalaEditor.params value=value focus=(action "focus") contentChanged=(action "contentChanged")}}
<button {{action 'save'}}>Save</button>
import Ember from 'ember';
export default Ember.Component.extend({
value: 'test',
froalaEditor: {
params: {
toolbarInline: true,
placeholderText: 'Enter..'
// For more params refer: 'https://www.froala.com/wysiwyg-editor/docs/options'
},
},
actions: {
// For more events refer: 'https://www.froala.com/wysiwyg-editor/docs/events'
save: function(){
console.log("Content Saved");
$('.froalaEditor').froalaEditor('save.save');
},
contentChanged: function(event, editor) {
console.log("Content Changed");
console.log(event);
console.log(editor);
},
focus: function(event, editor) {
console.log("Focus");
console.log(event);
console.log(editor);
},
},
});
Create custom button
{{froala-editor params=froalaEditor.params customButtons=froalaEditor.buttons}}
import Ember from 'ember';
export default Ember.Component.extend({
value: 'test',
froalaEditor: {
params: {
toolbarInline: true,
placeholderText: 'Enter..',
toolbarButtons: ['my_dropdown','|', 'alert', 'clear', 'insert']
// For more params refer: 'https://www.froala.com/wysiwyg-editor/docs/options'
},
buttons:function(){
$.FroalaEditor.DefineIcon('alert', {NAME: 'info'});
$.FroalaEditor.RegisterCommand('alert', {
title: 'Hello',
focus: false,
undo: false,
refreshAfterCallback: false,
callback: function () {
alert('Hello!');
}
});
$.FroalaEditor.DefineIcon('clear', {NAME: 'remove'});
$.FroalaEditor.RegisterCommand('clear', {
title: 'Clear HTML',
focus: false,
undo: true,
refreshAfterCallback: true,
callback: function () {
this.html.set('');
this.events.focus();
}
});
$.FroalaEditor.DefineIcon('insert', {NAME: 'plus'});
$.FroalaEditor.RegisterCommand('insert', {
title: 'Insert HTML',
focus: true,
undo: true,
refreshAfterCallback: true,
callback: function () {
this.html.insert('My New HTML');
}
});
$.FroalaEditor.DefineIcon('my_dropdown', {NAME: 'cog'});
$.FroalaEditor.RegisterCommand('my_dropdown', {
title: 'Advanced options',
type: 'dropdown',
focus: false,
undo: false,
refreshAfterCallback: true,
options: {
'v1': 'Option 1',
'v2': 'Option 2'
},
callback: function (cmd, val) {
console.log (val);
},
// Callback on refresh.
refresh: function ($btn) {
console.log ('do refresh');
},
// Callback on dropdown show.
refreshOnShow: function ($btn, $dropdown) {
console.log ('do refresh when show');
}
});
}
}
});
The value is only for the initial value of the field.
It will not be updated when the user changes the text.
If the underlying value changes while the component is active, the editor will not reflect the change.
In order to get the values that the user changes, you will need to listen to the
contentChanged action.
Include the plugin in your ember-cli-build.js
/* global require, module */
var EmberApp = require('ember-cli/lib/broccoli/ember-app');
module.exports = function(defaults) {
var app = new EmberApp(defaults, {
// Add options here
emberFroala: {
fontAwesome: true,
theme: 'gray',
lang: 'en_us',
plugins: [
'block_styles',
'char_counter',
'colors', 'entities',
'file_upload',
'font_family',
'font_size',
'fullscreen',
'inline_styles',
'lists',
'media_manager',
'tables',
'urls',
'video'
]
}
});
return app.toTree();
};
The ember-froala project is under MIT license. However, in order to use Froala WYSIWYG HTML Editor plugin you should purchase a license for it.
Froala Editor has 3 different licenses for commercial use. For details please see License Agreement.
FAQs
Ember Addon for Froala WYSIWYG HTML rich text editor.
The npm package ember-froala receives a total of 0 weekly downloads. As such, ember-froala popularity was classified as not popular.
We found that ember-froala demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.