-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #53 from Geet06/v.3
V.3
- Loading branch information
Showing
11 changed files
with
170 additions
and
196 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,8 +13,7 @@ | |
3. [Integration](#integration) | ||
1. [With Aurelia CLI](#with-aurelia-cli) | ||
2. [With Webpack](#with-webpack) | ||
3. [With Easy Webpack](#with-easy-webpack) | ||
4. [With JSPM](#with-jspm) | ||
3. [With JSPM](#with-jspm) | ||
4. [Usage](#usage) | ||
5. [License](#license) | ||
|
||
|
@@ -58,9 +57,6 @@ npm install aurelia-froala-editor --save | |
|
||
|
||
```javascript | ||
// Editor files. | ||
import "froala-editor/js/froala_editor.pkgd.min"; | ||
|
||
... | ||
|
||
// Use the aurelia-froala-editor plugin. | ||
|
@@ -117,16 +113,7 @@ aurelia.use.plugin('aurelia-froala-editor'); | |
"path": "../node_modules/font-awesome/css", | ||
"main": "font-awesome.css" | ||
}, | ||
"jquery", | ||
{ | ||
"name": "froala-editor", | ||
"path": "../node_modules/froala-editor", | ||
"main": "js/froala_editor.min", | ||
"resources": [ | ||
"./js/**/*.{js}", | ||
"./css/**/*.{css}" | ||
] | ||
}, | ||
|
||
{ | ||
"name": "aurelia-froala-editor", | ||
"path": "../node_modules/aurelia-froala-editor/dist/amd", | ||
|
@@ -136,7 +123,6 @@ aurelia.use.plugin('aurelia-froala-editor'); | |
"froala-editor.html" | ||
], | ||
"deps": [ | ||
"jquery", | ||
"froala-editor", | ||
"font-awesome" | ||
] | ||
|
@@ -256,9 +242,20 @@ aurelia.use.plugin(PLATFORM.moduleName('aurelia-froala-editor')); | |
|
||
```js | ||
const { AureliaPlugin, ModuleDependenciesPlugin } = require('aurelia-webpack-plugin'); | ||
|
||
resolve: { | ||
extensions: ['.js'], | ||
modules:[srcDir,'../node_modules/froala-editor/js','node_modules'], | ||
alias: { | ||
"FroalaEditor": 'froala_editor.pkgd.min.js' | ||
} | ||
}, | ||
plugins: [ | ||
new AureliaPlugin(), | ||
new ProvidePlugin({ | ||
FroalaEditor: 'froala_editor.pkgd.min.js', | ||
'Promise': 'bluebird', | ||
Popper: ['popper.js', 'default'] // Bootstrap 4 Dependency. | ||
}), | ||
new ModuleDependenciesPlugin({ | ||
"aurelia-froala-editor": [ './froala-editor' ], | ||
"parent-module": [ "child-module" ], | ||
|
@@ -274,68 +271,6 @@ npm run start | |
|
||
|
||
|
||
### With Easy Webpack | ||
|
||
To configure your project with Easy Webpack, follow the resources from Aurelia Docs: http://aurelia.io/hub.html#/doc/article/aurelia/framework/latest/setup-webpack/2 . | ||
|
||
```bash | ||
git clone [email protected]:aurelia/skeleton-navigation.git | ||
cd skeleton-navigation/skeleton-esnext-webpack | ||
git reset --hard 8997a6f87339a2702f77aeaab7ede5bffe94437f | ||
npm install | ||
``` | ||
|
||
#### Add aurelia-froala-editor | ||
|
||
- Install the aurelia plugin | ||
|
||
```bash | ||
npm install aurelia-froala-editor --save | ||
``` | ||
|
||
- In your `src/main.js` or `src/main.ts` file add: | ||
|
||
```javascript | ||
import { PLATFORM } from "aurelia-pal"; | ||
|
||
// Editor files. | ||
import "froala-editor/js/froala_editor.pkgd.min"; | ||
|
||
... | ||
|
||
// Use the aurelia-froala-editor plugin. | ||
aurelia.use.plugin(PLATFORM.moduleName('aurelia-froala-editor')); | ||
``` | ||
|
||
- In your `src/app.html` include CSS files and Froala Editor component: | ||
|
||
```html | ||
<require from="froala-editor/css/froala_editor.pkgd.min.css"></require> | ||
<require from="froala-editor/css/froala_style.min.css"></require> | ||
|
||
<froala-editor></froala-editor> | ||
``` | ||
|
||
- In `package.json` file include the Aurelia Froala Editor plugin: | ||
|
||
```json | ||
"aurelia": { | ||
"build": { | ||
"resources": [ | ||
"aurelia-froala-editor/froala-editor" | ||
] | ||
} | ||
} | ||
``` | ||
|
||
#### Run application | ||
|
||
```bash | ||
npm run start | ||
``` | ||
|
||
|
||
|
||
### With JSPM | ||
|
||
#### Installing aurelia-cli | ||
|
@@ -365,13 +300,6 @@ jspm install npm:froala-editor -o "{format: 'global'}" | |
- In your `src/main.js` or `src/main.ts` file add: | ||
|
||
```javascript | ||
// Import jQuery | ||
import * as $ from 'jquery'; | ||
|
||
// Import Editor. | ||
import * as froala from 'froala-editor/js/froala_editor.pkgd.min.js'; | ||
|
||
... | ||
|
||
// Use the aurelia-froala-editor plugin. | ||
aurelia.use.plugin('aurelia-froala-editor'); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,4 @@ | ||
<template><div></div></template> | ||
<template> | ||
<div if.bind='!config.iframe'></div> | ||
<textarea if.bind='config.iframe'></textarea> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,4 @@ | ||
<template><div></div></template> | ||
<template> | ||
<div if.bind='!config.iframe'></div> | ||
<textarea if.bind='config.iframe'></textarea> | ||
</template> |
Oops, something went wrong.