Skip to content

Commit

Permalink
Updated Readme
Browse files Browse the repository at this point in the history
  • Loading branch information
umerfaruk committed Mar 13, 2024
1 parent 1abdc98 commit 2f79ec7
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 51 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ name: Node.js Package
on:
push:
branches: [ "main" ]
paths-ignore:
- '**/*.md'
- '.gitignore'
- '.editorconfig'

jobs:
build-and-publish:
Expand Down
109 changes: 58 additions & 51 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ import Editor from 'urdu-web-editor'

class Example extends Component {
render() {
return <Editor value={theValue} onChange={changeCallback} onSave={saveCallback} configuration={uiConfiguration} />
return <Editor value={theValue}
onChange={changeCallback}
onSave={saveCallback}
configuration={uiConfiguration} />
}
}
```
Expand Down Expand Up @@ -47,31 +50,31 @@ This callback function is called when save button is clicked on the editor. This

Configuration object to customize the functionality and ui of the editor. Its structure is as follows:

```json
```js
{
richText : false,
format: "raw",
language : "en",
placeholder : null,
toolbar : {
fonts : null,
defaultFont: null,
showAlignment: true,
showBlockFormat: true,
showFontFormat: true,
showInsert: true,
showListFormat: true,
showUndoRedo: true,
showExtraFormat: true,
showInsertLink: true,
showSave: false,
"richText" : false,
"format": "raw",
"language" : "en",
"placeholder" : null,
"toolbar" : {
"fonts" : null,
"defaultFont": null,
"showAlignment": true,
"showBlockFormat": true,
"showFontFormat": true,
"showInsert": true,
"showListFormat": true,
"showUndoRedo": true,
"showExtraFormat": true,
"showInsertLink": true,
"showSave": false,
},
spellchecker : {
enabled: false,
language : "en",
punctuationCorrections: () => [],
autoCorrections: () => [],
wordList : () => [],
"spellchecker" : {
"enabled": false,
"language" : "en",
"punctuationCorrections": () => [],
"autoCorrections": () => [],
"wordList" : () => [],
}
}
```
Expand Down Expand Up @@ -117,18 +120,20 @@ Text to use when there is no value present. By default a generic message will be
Type : object

Default value :
```json
fonts : null,
defaultFont: null,
showAlignment: true,
showBlockFormat: true,
showFontFormat: true,
showInsert: true,
showListFormat: true,
showUndoRedo: true,
showExtraFormat: true,
showInsertLink: true,
showSave: false,
```js
{
"fonts" : null,
"defaultFont": null,
"showAlignment": true,
"showBlockFormat": true,
"showFontFormat": true,
"showInsert": true,
"showListFormat": true,
"showUndoRedo": true,
"showExtraFormat": true,
"showInsertLink": true,
"showSave": false,
}
```

| Property | type | Default Value | Description |
Expand All @@ -148,12 +153,12 @@ Default value :
##### Default font list and value of font-face
```json
[
{ value: "Arial", label: "Arial" },
{ value: "Courier New", label: "Courier New" },
{ value: "Georgia", label: "Georgia" },
{ value: "Times New Roman", label: "Times New Roman" },
{ value: "Trebuchet MS", label: "Trebuchet MS" },
{ value: "Verdana", label: "Verdana" },
{ "value": "Arial", "label": "Arial" },
{ "value": "Courier New", "label": "Courier New" },
{ "value": "Georgia", "label": "Georgia" },
{ "value": "Times New Roman", "label": "Times New Roman" },
{ "value": "Trebuchet MS", "label": "Trebuchet MS" },
{ "value": "Verdana", "label": "Verdana" },
];
```

Expand All @@ -162,12 +167,14 @@ Default value :
Type : object

Default value :
```json
enabled: false,
language : "en",
punctuationCorrections: (lang) => [],
autoCorrections: (lang) => [],
wordList : (lang) => [],
```js
{
"enabled": false,
"language : "en",
"punctuationCorrections": (lang) => [],
"autoCorrections": (lang) => [],
"wordList" : (lang) => [],
}
```
| Property | type | Default Value | Description |
Expand All @@ -183,9 +190,9 @@ Default value :
```json
[{
incorrectText: "",
correctText: "",
completeWord: true
"incorrectText": "",
"correctText": "",
"completeWord": true
}]
```
Expand Down

0 comments on commit 2f79ec7

Please sign in to comment.