Skip to content

Commit 706b66d

Browse files
authored
Merge pull request #75 from pszczesniak/update-plugin-to-support-new-installation-methods
Update integration to new installation methods.
2 parents a23408e + 78bd87a commit 706b66d

33 files changed

+17546
-6541
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ node_modules/
55
build/
66
coverage/
77
dist/
8+
tmp/

README.md

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,14 @@ WProofreader plugin for CKEditor 5 inherits all functionality of the WProofreade
3535

3636
ClassicEditor
3737
.create( editorElement, {
38-
plugins: [ ..., WProofreader],
39-
toolbar: [ ..., 'wproofreader'],
38+
plugins: [ ..., WProofreader ],
39+
toolbar: [ ..., 'wproofreader' ],
4040
wproofreader: {
4141
lang: 'en_US', // sets the default language
4242
serviceId: 'your-service-ID', // required for the Cloud version only
4343
srcUrl: 'https://svc.webspellchecker.net/spellcheck31/wscbundle/wscbundle.js'
4444
}
45-
})
45+
} )
4646
```
4747

4848
`serviceId` is a mandatory parameter for activating and using the plugin pointed to the Cloud-based version of WProofreader.
@@ -55,8 +55,8 @@ WProofreader plugin for CKEditor 5 inherits all functionality of the WProofreade
5555

5656
ClassicEditor
5757
.create( editorElement, {
58-
plugins: [ ..., WProofreader],
59-
toolbar: [ ..., 'wproofreader'],
58+
plugins: [ ..., WProofreader ],
59+
toolbar: [ ..., 'wproofreader' ],
6060
wproofreader: {
6161
lang: 'en_US', // sets the default language
6262
serviceProtocol: 'https',
@@ -65,11 +65,28 @@ WProofreader plugin for CKEditor 5 inherits all functionality of the WProofreade
6565
servicePath: 'virtual_directory/api', // by default the virtual_directory is wscservice
6666
srcUrl: 'https://host_name/virtual_directory/wscbundle/wscbundle.js'
6767
}
68-
})
68+
} )
6969
```
7070

7171
Unlike the Cloud-based version, the `serviceId` parameter is not used here. Instead, it is required to specify the path to the backend entry point hosted on the client’s infrastructure.
7272

73+
For WProofreader that uses "CKEditor 5" without legacy methods of installation:
74+
75+
```js
76+
import { ClassicEditor } from 'ckeditor5';
77+
import { WProofreader } from '@webspellchecker/wproofreader-ckeditor5';
78+
...
79+
80+
ClassicEditor
81+
.create( editorElement, {
82+
plugins: [ ..., WProofreader ],
83+
toolbar: [ ..., 'wproofreader' ],
84+
wproofreader: {
85+
/* config of WProofreader */
86+
}
87+
} )
88+
```
89+
7390
## Documentation
7491

7592
To find out more, refer the following documentation:

0 commit comments

Comments
 (0)