aurelia-froala-editor
Advanced tools
Comparing version 3.1.0 to 3.1.1-1
{ | ||
"name": "aurelia-froala-editor", | ||
"version": "3.1.0", | ||
"version": "3.1.1-1", | ||
"description": "Aurelia plugin for Froala WYSIWYG HTML rich text editor.", | ||
@@ -62,3 +62,3 @@ "keywords": [ | ||
"aurelia-framework": "^1.3.0", | ||
"froala-editor": "3.1.0" | ||
"froala-editor": "3.1.1" | ||
}, | ||
@@ -65,0 +65,0 @@ "jspm": { |
@@ -20,2 +20,5 @@ # Aurelia Froala WYSIWYG HTML Editor | ||
#### Note | ||
>To use third-party plugins (i.e font-awesome,spell-checker,embedly and advanced image-edit) please use Aurelia with Webpack. | ||
## Installation instructions | ||
@@ -61,3 +64,2 @@ | ||
```javascript | ||
... | ||
@@ -68,3 +70,3 @@ // Use the aurelia-froala-editor plugin. | ||
- In your `src/app.html` include CSS files and Froala Editor component: | ||
- In your `src/app.html` include CSS files and Froala Editor component inside `<template>` tag : | ||
@@ -78,16 +80,4 @@ ```html | ||
- In `aurelia_project/aurelia.json` file set the builder loader plugins stub to `false` | ||
- If you are using bundler then in `aurelia_project/aurelia.json` file set the builder loader plugins stub to `false` | ||
```javascript | ||
// Editor files. | ||
import "froala-editor/js/froala_editor.pkgd.min"; | ||
... | ||
// Use the aurelia-froala-editor plugin. | ||
aurelia.use.plugin('aurelia-froala-editor'); | ||
``` | ||
- | ||
```json | ||
@@ -128,35 +118,2 @@ "loader": { | ||
- 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(); | ||
} | ||
``` | ||
- Open `aurelia-project/tasks/build.js` file and modify it to look like this: | ||
```javascript | ||
import copyAssets from './copy-assets'; | ||
let build = gulp.series( | ||
readProjectConfiguration, | ||
gulp.parallel( | ||
... | ||
copyAssets // Add this. | ||
), | ||
writeBundles | ||
); | ||
``` | ||
#### Run aurelia-cli | ||
@@ -172,3 +129,4 @@ | ||
To configure your project with Webpack, follow the resources from Aurelia Docs: http://aurelia.io/hub.html#/doc/article/aurelia/framework/latest/setup-webpack/2 . | ||
To configure your project with Webpack, follow the resources from Aurelia Docs: | ||
https://aurelia.io/docs/build-systems/webpack/. | ||
@@ -196,2 +154,7 @@ ```bash | ||
import "froala-editor/js/froala_editor.pkgd.min"; | ||
//Import third-party plugins | ||
// import "./../node_modules/froala-editor/js/third_party/image_tui.min"; | ||
// import "./../node_modules/froala-editor/js/third_party/embedly.min"; | ||
// import "./../node_modules/froala-editor/js/third_party/font_awesome.min"; | ||
// import "./../node_modules/froala-editor/js/third_party/spell_checker.min"; | ||
@@ -204,3 +167,3 @@ ... | ||
- In your `src/app.html` include CSS files and Froala Editor component: | ||
- In your `src/app.html` include CSS files and Froala Editor component inside `<template>` tag : | ||
@@ -220,3 +183,3 @@ ```html | ||
extensions: ['.js'], | ||
modules:[srcDir,'../node_modules/froala-editor/js','node_modules'], | ||
modules: [srcDir, path.resolve("node_modules")], | ||
alias: { | ||
@@ -252,3 +215,4 @@ "FroalaEditor": 'froala_editor.pkgd.min.js' | ||
To configure your project with JSPM, follow the resources from Aurelia Docs: http://aurelia.io/hub.html#/doc/article/aurelia/framework/latest/setup-jspm/1 . | ||
To configure your project with JSPM, follow the resources from Aurelia Docs: | ||
https://aurelia.io/docs/build-systems/jspm. | ||
@@ -283,3 +247,3 @@ | ||
- In your `src/app.html` include CSS files and Froala Editor component: | ||
- In your `src/app.html` include CSS files and Froala Editor component inside `<template>` tag : | ||
@@ -362,12 +326,17 @@ ```html | ||
#### Events | ||
One can bind events to editor as given below. | ||
All the [event handlers](https://www.froala.com/wysiwyg-editor/docs/events) are also available: | ||
>All the [event handlers](https://www.froala.com/wysiwyg-editor/docs/events) are also available. | ||
```html | ||
<froala-editor | ||
value.two-way="value" | ||
event-handlers.bind = "{ | ||
'paste.afterCleanup': processPaste | ||
}"></froala-editor> | ||
config.bind="tempCOnfig"></froala-editor> | ||
``` | ||
```js | ||
events: { | ||
'focus': function () { | ||
console.log('Focus'); | ||
} | ||
} | ||
``` | ||
@@ -374,0 +343,0 @@ ## License |
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
50040
1
334
+ Addedfroala-editor@3.1.1(transitive)
- Removedfroala-editor@3.1.0(transitive)
Updatedfroala-editor@3.1.1