Skip to content

Commit 3893fe5

Browse files
author
lon
committed
Release 1.1.10, #24
1 parent f67274d commit 3893fe5

File tree

3 files changed

+28
-3
lines changed

3 files changed

+28
-3
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 1.1.10
2+
3+
- Fix [#24](https://github.com/lon-yang/ngx-markdown-editor/issues/24)
4+
15
## 1.1.9
26

37
- Fix `scrollPastEnd` option's bug

README.md

+23-2
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,16 @@ import { LMarkdownEditorModule } from 'ngx-markdown-editor';
4545
export class AppModule { }
4646
```
4747
```html
48-
<md-editor name="Content" [preRender]="preRenderFunc" [(ngModel)]="content" [height]="'200px'" [mode]="mode" [options]="options" required maxlength="500"></md-editor>
48+
<md-editor name="Content"
49+
[upload]="doUpload"
50+
[preRender]="preRenderFunc"
51+
[(ngModel)]="content"
52+
[height]="'200px'"
53+
[mode]="mode"
54+
[options]="options"
55+
required
56+
maxlength="500">
57+
</md-editor>
4958
```
5059

5160
# Options
@@ -63,10 +72,22 @@ export class AppModule { }
6372
}
6473
```
6574
- preRender(`Function`): For [#13](https://github.com/lon-yang/ngx-markdown-editor/issues/13), this will not effect `ngModel`'s value, just rendered value
66-
```javascript
75+
```ts
6776
preRenderFunc(content: string) {
6877
return content.replace(/something/g, 'new value'); // must return a string
6978
}
7079
```
80+
- upload(`Function`): For [#24](https://github.com/lon-yang/ngx-markdown-editor/issues/24), upload file by yourself
81+
```ts
82+
doUpload(files: Array<File>): Promise<Array<UploadResult>> {
83+
// do upload file
84+
}
85+
interface UploadResult {
86+
isImg: boolean
87+
name: string
88+
url: string
89+
}
90+
```
91+
7192
- required: for form validate
7293
- maxlength: for form validate

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ngx-markdown-editor",
3-
"version": "1.1.9",
3+
"version": "1.1.10",
44
"description": "Angular markdown editor based on ace editor",
55
"main": "index.js",
66
"scripts": {

0 commit comments

Comments
 (0)