From 2f79ec775c5d813c257091985e8ff2557676a18e Mon Sep 17 00:00:00 2001 From: Omar Faruk Date: Wed, 13 Mar 2024 13:43:28 +0000 Subject: [PATCH] Updated Readme --- .github/workflows/npm-publish.yml | 4 ++ README.md | 109 ++++++++++++++++-------------- 2 files changed, 62 insertions(+), 51 deletions(-) diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index fe7c656..ebbbd06 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -3,6 +3,10 @@ name: Node.js Package on: push: branches: [ "main" ] + paths-ignore: + - '**/*.md' + - '.gitignore' + - '.editorconfig' jobs: build-and-publish: diff --git a/README.md b/README.md index bcd16e1..f807ab7 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,10 @@ import Editor from 'urdu-web-editor' class Example extends Component { render() { - return + return } } ``` @@ -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" : () => [], } } ``` @@ -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 | @@ -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" }, ]; ``` @@ -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 | @@ -183,9 +190,9 @@ Default value : ```json [{ - incorrectText: "", - correctText: "", - completeWord: true + "incorrectText": "", + "correctText": "", + "completeWord": true }] ```