Skip to content

Commit 1249cb9

Browse files
committed
Update README
1 parent 5237fc0 commit 1249cb9

File tree

2 files changed

+46
-46
lines changed

2 files changed

+46
-46
lines changed

README.md

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -16,28 +16,6 @@ A simple text diff component for Angular, based on [diff-match-patch](https://gi
1616
npm install --save ngx-diff2html
1717
```
1818

19-
## API
20-
21-
- module: `NgxDiff2htmlModule`
22-
- component: `NgxDiff2htmlComponent`
23-
- selector: `ngx-diff2html`
24-
25-
### Inputs
26-
27-
| Input | Type | Required | Description
28-
| -------------------- | ----------------- | ------------------------------------ | --------------------------
29-
| left | string | Yes | First text to be compared
30-
| right | string | Yes | Second text to be compared
31-
| filename | string | Optional, default: ` ` (white space) | Can be used to display a filename in the top of diff results. **Cannot be null or empty**
32-
| format | `DiffFormat` | Optional, default: `side-by-side` | Possible values:<br> - `side-by-side`<br> - `line-by-line`
33-
| style | `DiffStyle` | Optional, default: `word` | Possible values:<br> - `word`<br> - `char`
34-
35-
### Outputs
36-
37-
| Output | Type | Required | Description
38-
| -------------------- | ----------------- | ------------------------------------ | --------------------------
39-
| diffChange | string | Optional | Event fired when diff changes. The returned value is the text diff in [unified format](http://fileformats.archiveteam.org/wiki/Unified_diff)
40-
4119
## Usage
4220

4321
**1**. Register the `NgxDiff2htmlModule` in a module, for example app module:
@@ -70,13 +48,35 @@ npm install --save ngx-diff2html
7048

7149
**3**. Start using the component:
7250

73-
```
51+
```html
7452
<ngx-diff2html
7553
left="some text"
7654
right="some other text"
7755
></ngx-diff2html>
7856
```
7957

58+
## API
59+
60+
- module: `NgxDiff2htmlModule`
61+
- component: `NgxDiff2htmlComponent`
62+
- selector: `ngx-diff2html`
63+
64+
### Inputs
65+
66+
| Input | Type | Required | Description
67+
| -------------------- | ----------------- | ------------------------------------ | --------------------------
68+
| left | string | Yes | First text to be compared
69+
| right | string | Yes | Second text to be compared
70+
| filename | string | Optional, default: ` ` (white space) | Can be used to display a filename in the top of diff results. **Cannot be null or empty**
71+
| format | `DiffFormat` | Optional, default: `side-by-side` | Possible values:<br> - `side-by-side`<br> - `line-by-line`
72+
| style | `DiffStyle` | Optional, default: `word` | Possible values:<br> - `word`<br> - `char`
73+
74+
### Outputs
75+
76+
| Output | Type | Required | Description
77+
| -------------------- | ----------------- | ------------------------------------ | --------------------------
78+
| diffChange | string | Optional | Event fired when diff changes. The returned value is the text diff in [unified format](http://fileformats.archiveteam.org/wiki/Unified_diff)
79+
8080
## Build
8181

8282
Run `ng build ngx-diff2html` to build the project. The build artifacts will be stored in the `dist/` directory.

projects/ngx-diff2html/README.md

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -16,28 +16,6 @@ A simple text diff component for Angular, based on [diff-match-patch](https://gi
1616
npm install --save ngx-diff2html
1717
```
1818

19-
## API
20-
21-
- module: `NgxDiff2htmlModule`
22-
- component: `NgxDiff2htmlComponent`
23-
- selector: `ngx-diff2html`
24-
25-
### Inputs
26-
27-
| Input | Type | Required | Description
28-
| -------------------- | ----------------- | ------------------------------------ | --------------------------
29-
| left | string | Yes | First text to be compared
30-
| right | string | Yes | Second text to be compared
31-
| filename | string | Optional, default: ` ` (white space) | Can be used to display a filename in the top of diff results. **Cannot be null or empty**
32-
| format | `DiffFormat` | Optional, default: `side-by-side` | Possible values:<br> - `side-by-side`<br> - `line-by-line`
33-
| style | `DiffStyle` | Optional, default: `word` | Possible values:<br> - `word`<br> - `char`
34-
35-
### Outputs
36-
37-
| Output | Type | Required | Description
38-
| -------------------- | ----------------- | ------------------------------------ | --------------------------
39-
| diffChange | string | Optional | Event fired when diff changes. The returned value is the text diff in [unified format](http://fileformats.archiveteam.org/wiki/Unified_diff)
40-
4119
## Usage
4220

4321
**1**. Register the `NgxDiff2htmlModule` in a module, for example app module:
@@ -70,13 +48,35 @@ npm install --save ngx-diff2html
7048

7149
**3**. Start using the component:
7250

73-
```
51+
```html
7452
<ngx-diff2html
7553
left="some text"
7654
right="some other text"
7755
></ngx-diff2html>
7856
```
7957

58+
## API
59+
60+
- module: `NgxDiff2htmlModule`
61+
- component: `NgxDiff2htmlComponent`
62+
- selector: `ngx-diff2html`
63+
64+
### Inputs
65+
66+
| Input | Type | Required | Description
67+
| -------------------- | ----------------- | ------------------------------------ | --------------------------
68+
| left | string | Yes | First text to be compared
69+
| right | string | Yes | Second text to be compared
70+
| filename | string | Optional, default: ` ` (white space) | Can be used to display a filename in the top of diff results. **Cannot be null or empty**
71+
| format | `DiffFormat` | Optional, default: `side-by-side` | Possible values:<br> - `side-by-side`<br> - `line-by-line`
72+
| style | `DiffStyle` | Optional, default: `word` | Possible values:<br> - `word`<br> - `char`
73+
74+
### Outputs
75+
76+
| Output | Type | Required | Description
77+
| -------------------- | ----------------- | ------------------------------------ | --------------------------
78+
| diffChange | string | Optional | Event fired when diff changes. The returned value is the text diff in [unified format](http://fileformats.archiveteam.org/wiki/Unified_diff)
79+
8080
## Build
8181

8282
Run `ng build ngx-diff2html` to build the project. The build artifacts will be stored in the `dist/` directory.

0 commit comments

Comments
 (0)