Skip to content

Commit

Permalink
Callback for file upload
Browse files Browse the repository at this point in the history
  • Loading branch information
Markus Montonen committed Feb 14, 2019
1 parent 3c3bc70 commit 948faa3
Show file tree
Hide file tree
Showing 60 changed files with 9,422 additions and 7,948 deletions.
23 changes: 7 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
# NgxEditor

<p align="center">
<a href="https://github.com/sibiraj-s/ngx-editor">
<img src="https://raw.githubusercontent.com/sibiraj-s/ngx-editor/master/src/assets/icons/ngx-editor.png" alt="ngxEditor">
<a href="https://github.com/Sibiraj-S/ngx-editor">
<img src="https://raw.githubusercontent.com/Sibiraj-S/ngx-editor/master/src/assets/icons/ngx-editor.png" alt="ngxEditor">
</a>
</p>
<p align="center">A Simple WYSIWYG Editor for Angular 6 Applications.</p>
<p align="center">A Simple WYSIWYG Editor for Angular5+ Applications.</p>
<p align="center">
<a href="https://travis-ci.org/sibiraj-s/ngx-editor">
<img alt="Build Status" src="https://travis-ci.org/sibiraj-s/ngx-editor.svg?branch=master">
<a href="https://travis-ci.org/Sibiraj-S/ngx-editor">
<img alt="Build Status" src="https://travis-ci.org/Sibiraj-S/ngx-editor.svg?branch=master">
</a>
<a href="https://www.npmjs.com/package/ngx-editor">
<img alt="npm version" src="https://img.shields.io/npm/v/ngx-editor.svg">
</a>
<a href="https://www.npmjs.com/package/ngx-editor">
<img alt="npm" src="https://img.shields.io/npm/dm/ngx-editor.svg">
</a>
<a href="https://github.com/sibiraj-s/ngx-editor/blob/master/LICENSE">
<a href="https://github.com/Sibiraj-S/ngx-editor/blob/master/LICENSE">
<img alt="licence" src="https://img.shields.io/npm/l/ngx-editor.svg">
</a>
</p>
Expand Down Expand Up @@ -55,17 +55,8 @@ Then in HTML

For `ngModel` to work, You must import `FormsModule` from `@angular/forms`

#### PeerDependencies

`ngx-editor` depeneds on the following libraries to work.

* [Font-Awesome v4.7.0](https://github.com/FortAwesome/Font-Awesome/tree/fa-4)
* [Ngx-Bootstrap](https://github.com/valor-software/ngx-bootstrap)

## Compatibility

All Evergreen-Browsers are supported

* Google Chrome
* Microsoft Edge
* Mozilla Firefox
Expand All @@ -82,5 +73,5 @@ Documentation is auto-generated using [compodoc][compodoc], and can be viewed he
[npm]: https://www.npmjs.com/
[yarn]: https://yarnpkg.com/lang/en/
[github]: https://sibiraj-s.github.io/
[wiki]:https://github.com/sibiraj-s/ngx-editor/wiki/ngxEditor
[wiki]:https://github.com/Sibiraj-S/ngx-editor/wiki/ngxEditor
[compodoc]: https://compodoc.github.io/website/
112 changes: 112 additions & 0 deletions TREE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
```
.
├── e2e
│   ├── app.e2e-spec.ts
│   ├── app.po.ts
│   └── tsconfig.e2e.json
├── scripts
│   ├── build.sh
│   └── release.sh
├── src
│   ├── app
│   │   ├── ngx-editor
│   │   │   ├── common
│   │   │   │   ├── services
│   │   │   │   │   ├── command-executor.service.spec.ts
│   │   │   │   │   ├── command-executor.service.ts
│   │   │   │   │   ├── message.service.spec.ts
│   │   │   │   │   └── message.service.ts
│   │   │   │   ├── utils
│   │   │   │   │   └── ngx-editor.utils.ts
│   │   │   │   └── ngx-editor.defaults.ts
│   │   │   ├── ngx-editor-message
│   │   │   │   ├── ngx-editor-message.component.html
│   │   │   │   ├── ngx-editor-message.component.scss
│   │   │   │   ├── ngx-editor-message.component.spec.ts
│   │   │   │   └── ngx-editor-message.component.ts
│   │   │   ├── ngx-editor-toolbar
│   │   │   │   ├── ngx-editor-toolbar.component.html
│   │   │   │   ├── ngx-editor-toolbar.component.scss
│   │   │   │   ├── ngx-editor-toolbar.component.spec.ts
│   │   │   │   └── ngx-editor-toolbar.component.ts
│   │   │   ├── ngx-grippie
│   │   │   │   ├── ngx-grippie.component.html
│   │   │   │   ├── ngx-grippie.component.scss
│   │   │   │   ├── ngx-grippie.component.spec.ts
│   │   │   │   └── ngx-grippie.component.ts
│   │   │   ├── ngx-editor.component.html
│   │   │   ├── ngx-editor.component.scss
│   │   │   ├── ngx-editor.component.spec.ts
│   │   │   ├── ngx-editor.component.ts
│   │   │   └── ngx-editor.module.ts
│   │   ├── app.component.html
│   │   ├── app.component.scss
│   │   ├── app.component.spec.ts
│   │   ├── app.component.ts
│   │   ├── app.module.ts
│   │   ├── app.service.spec.ts
│   │   └── app.service.ts
│   ├── assets
│   │   └── icons
│   │   ├── ngx-editor-opt1
│   │   │   ├── ang_edit1_128.ico
│   │   │   ├── ang_edit1_128.png
│   │   │   ├── ang_edit1_256.ico
│   │   │   ├── ang_edit1_256.png
│   │   │   ├── ang_edit1_32.png
│   │   │   ├── ang_edit1_64.ico
│   │   │   ├── ang_edit1_64.png
│   │   │   ├── ang_editv1_32_128.ico
│   │   │   ├── ang_editv1_32_256.ico
│   │   │   ├── ngx-editor1_64x64.ico
│   │   │   ├── ngx-editor1.gvdesign
│   │   │   ├── ngx-editor1.png
│   │   │   └── ngx-editor1.svg
│   │   ├── ngx-editor-opt2
│   │   │   ├── ang_editv4_128.ico
│   │   │   ├── ang_editv4_128.png
│   │   │   ├── ang_editv4_256.ico
│   │   │   ├── ang_editv4_256.png
│   │   │   ├── ang_editv4_32_128.ico
│   │   │   ├── ang_editv4_32_256.ico
│   │   │   ├── ang_editv4_32.ico
│   │   │   ├── ang_editv4_32.png
│   │   │   ├── ang_editv4_64.ico
│   │   │   ├── ang_editv4_64.png
│   │   │   ├── ngx-editor2_64x64.ico
│   │   │   ├── ngx-editor2.gvdesign
│   │   │   ├── ngx-editor2.png
│   │   │   └── ngx-editor2.svg
│   │   ├── ngx-editor.png
│   │   └── ngx-editor.svg
│   ├── environments
│   │   ├── environment.prod.ts
│   │   └── environment.ts
│   ├── favicon.ico
│   ├── index.html
│   ├── main.ts
│   ├── polyfills.ts
│   ├── styles.scss
│   ├── test.ts
│   ├── tsconfig.app.json
│   ├── tsconfig.spec.json
│   └── typings.d.ts
├── .vscode
│   └── settings.json
├── .angular-cli.json
├── .editorconfig
├── karma.conf.js
├── LICENSE
├── ng-package.json
├── package.json
├── package-lock.json
├── protractor.conf.js
├── public_api.ts
├── .pullapprove.yml
├── README.md
├── .travis.yml
├── TREE.md
├── tsconfig.json
├── tslint.json
└── yarn.lock
```
131 changes: 0 additions & 131 deletions angular.json

This file was deleted.

2 changes: 1 addition & 1 deletion e2e/src/app.e2e-spec.ts → e2e/app.e2e-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ describe('ngx-editor App', () => {

it('should display welcome message', () => {
page.navigateTo();
expect(page.getParagraphText()).toEqual('A Simple WYSIWYG Editor for Angular 6 Applications.');
expect(page.getParagraphText()).toEqual('WYSIWYG Editor for Angular Applications.');
});
});
File renamed without changes.
5 changes: 3 additions & 2 deletions e2e/tsconfig.e2e.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "../out-tsc/app",
"outDir": "../out-tsc/e2e",
"baseUrl": "./",
"module": "commonjs",
"target": "es5",
"types": [
Expand All @@ -10,4 +11,4 @@
"node"
]
}
}
}
19 changes: 19 additions & 0 deletions extras/docs/code-editor.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# HTML Code Editor

Code Editor allows to view and edit plain HTML code. [codemirror](https://codemirror.net/) is used for this purpose.

In order for the code editor to work. You must install codemirror as a `peerDependency`

```bash
npm install codemirror --save

#or

yarn add codemirror
```

Then import the CodeMirror's stylesheet into your app.

```bash
node_modules/codemirror/lib/codemirror.css
```
5 changes: 3 additions & 2 deletions extras/docs/configuartion.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,12 @@ The config property is a JSON object.
"imageEndPoint": "",
"toolbar": [
["bold", "italic", "underline", "strikeThrough", "superscript", "subscript"],
["fontName", "fontSize", "color"],
["fontSize", "color"],
["justifyLeft", "justifyCenter", "justifyRight", "justifyFull", "indent", "outdent"],
["cut", "copy", "delete", "removeFormat", "undo", "redo"],
["paragraph", "blockquote", "removeBlockquote", "horizontalLine", "orderedList", "unorderedList"],
["link", "unlink", "image", "video"]
["link", "unlink", "image"],
["code"]
]
}
```
20 changes: 10 additions & 10 deletions extras/docs/image-uploader.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@

To Upload images, you must specify an endpoint to which the image has to be uploaded. The [POST](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/POST) request sent is a [FORMDATA](https://developer.mozilla.org/en-US/docs/Web/API/FormData) with name `file`.

## Input

The Input for the endpoint is a string can be provided directly or via `config` property

```html
<app-ngx-editor imageEndPoint="http://myApiEndPoint"></app-ngx-editor>
```

## Response

The Response is a `json` and it should be in the following format

```json
```JSON
{
"url": "https://location-of-image"
"url": "http://myApiEndPoint"
}
```

## Input

The Input for the endpoint is a string can be provided directly or via `config` property

```html
<app-ngx-editor imageEndPoint="http://myApiEndPoint"></app-ngx-editor>
```
Loading

0 comments on commit 948faa3

Please sign in to comment.