Skip to content

Commit e9d58d2

Browse files
committed
Merge branch 'development'
2 parents 6e615c2 + 1af1208 commit e9d58d2

File tree

4 files changed

+76
-46
lines changed

4 files changed

+76
-46
lines changed

CHANGELOG.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
# WProofreader plugin for CKEditor 5 Changelog
22

3-
# 3.1.1 - 2024-08-07
3+
## 3.1.2 - 2024-08-16
4+
5+
Internal changes (updated dependencies, documentation, etc.).
6+
7+
## 3.1.1 - 2024-08-07
48

59
* Additional changes for new CKEditor 5 installation methods.
610
* Internal changes (updated dependencies, documentation, etc.).
711

8-
# 3.1.0 - 2024-07-19
12+
## 3.1.0 - 2024-07-19
913

1014
* Add basic TypeScript support. [#76](https://github.com/WebSpellChecker/wproofreader-ckeditor5/issues/76).
1115
* Enable 'Proofread in dialog' for multi-root and real-time collaboration modes. [#78](https://github.com/WebSpellChecker/wproofreader-ckeditor5/issues/78).

README.md

Lines changed: 67 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -19,76 +19,102 @@ WProofreader plugin for CKEditor 5 inherits all functionality of the WProofreade
1919

2020
## Install instructions
2121

22-
1. Install the npm module.
22+
1. Install the plugin.
23+
24+
You can integrate the plugin using one of these methods:
25+
- [Using npm](#using-npm): Recommended for projects utilizing a JavaScript bundler.
26+
- [Using CDN](#using-cdn): Suitable for environments where no build process is involved.
27+
28+
### Using npm
29+
30+
To install the plugin via npm, run the following command:
2331

2432
```
2533
npm install @webspellchecker/wproofreader-ckeditor5
2634
```
2735

28-
2. Add a new plugin and its configuration to CKEditor.
29-
30-
Set the WProofreader configuration data into the `wproofreader` field of the CKEditor 5 config. All available options are described in [API docs](https://webspellchecker.com/docs/api/wscbundle/Options.html).
31-
32-
For the **Cloud-based** version of WProofreader:
36+
Import the WProofreader plugin into the project and configure it. Then, add it to the `create()` method configuration and include it as a toolbar item.
3337

3438
```js
35-
import WProofreader from '@webspellchecker/wproofreader-ckeditor5/src/wproofreader';
39+
import { ClassicEditor } from 'ckeditor5';
40+
import { WProofreader } from '@webspellchecker/wproofreader-ckeditor5';
3641
...
3742

3843
ClassicEditor
3944
.create( editorElement, {
4045
plugins: [ ..., WProofreader ],
4146
toolbar: [ ..., 'wproofreader' ],
4247
wproofreader: {
43-
lang: 'en_US', // sets the default language
44-
serviceId: 'your-service-ID', // required for the Cloud version only
45-
srcUrl: 'https://svc.webspellchecker.net/spellcheck31/wscbundle/wscbundle.js'
48+
/* config of WProofreader */
4649
}
4750
} )
4851
```
4952

50-
`serviceId` is a mandatory parameter for activating and using the plugin pointed to the Cloud-based version of WProofreader.
53+
### Using CDN
5154

52-
For the **Server-based** version of WProofreader:
55+
To load the script, utilize the browser's [import map](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script/type/importmap) feature. This allows you to map a simple specifier to the full CDN URL, making it easier to reference the necessary files.
5356

54-
```js
55-
import WProofreader from '@webspellchecker/wproofreader-ckeditor5/src/wproofreader';
56-
...
57+
```html
58+
<script type="importmap">
59+
{
60+
"imports": {
61+
"ckeditor5": "https://cdn.ckeditor.com/ckeditor5/43.0.0/ckeditor5.js",
62+
"@webspellchecker/wproofreader-ckeditor5": "https://cdn.jsdelivr.net/npm/@webspellchecker/wproofreader-ckeditor5@3.1.1/dist/browser/index.js"
5763

58-
ClassicEditor
59-
.create( editorElement, {
60-
plugins: [ ..., WProofreader ],
61-
toolbar: [ ..., 'wproofreader' ],
62-
wproofreader: {
63-
lang: 'en_US', // sets the default language
64-
serviceProtocol: 'https',
65-
serviceHost: 'localhost',
66-
servicePort: '443',
67-
servicePath: 'virtual_directory/api', // by default the virtual_directory is wscservice
68-
srcUrl: 'https://host_name/virtual_directory/wscbundle/wscbundle.js'
69-
}
70-
} )
64+
}
65+
}
66+
</script>
7167
```
7268

73-
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.
69+
In the following script tag, import the WProofreader plugin, add it to the `plugins` array, and include it as a toolbar item.
70+
71+
```html
72+
<script type="module">
73+
import { ClassicEditor } from 'ckeditor5';
74+
import { WProofreader } from '@webspellchecker/wproofreader-ckeditor5';
75+
76+
ClassicEditor
77+
.create( editorElement, {
78+
plugins: [ ..., WProofreader ],
79+
toolbar: [ ..., 'wproofreader' ],
80+
wproofreader: {
81+
/* config of WProofreader */
82+
}
83+
} )
84+
</script>
85+
```
7486

75-
For WProofreader that uses "CKEditor 5" without legacy methods of installation:
87+
2. Configure the plugin
88+
89+
After installing the plugin, you need to configure it in the CKEditor 5 setup. The configuration is added to the `wproofreader` field. For a detailed list of available customization options, refer to the [documentation](https://webspellchecker.com/docs/api/wscbundle/Options.html).
90+
91+
For the **Cloud-based** version of WProofreader:
7692

7793
```js
78-
import { ClassicEditor } from 'ckeditor5';
79-
import { WProofreader } from '@webspellchecker/wproofreader-ckeditor5';
80-
...
94+
wproofreader: {
95+
lang: 'en_US', // sets the default language
96+
serviceId: 'your-service-ID', // required for the Cloud version only
97+
srcUrl: 'https://svc.webspellchecker.net/spellcheck31/wscbundle/wscbundle.js'
98+
}
99+
```
81100

82-
ClassicEditor
83-
.create( editorElement, {
84-
plugins: [ ..., WProofreader ],
85-
toolbar: [ ..., 'wproofreader' ],
86-
wproofreader: {
87-
/* config of WProofreader */
88-
}
89-
} )
101+
`serviceId` is a mandatory parameter for activating and using the plugin pointed to the Cloud-based version of WProofreader.
102+
103+
For the **Server-based** version of WProofreader:
104+
105+
```js
106+
wproofreader: {
107+
lang: 'en_US', // sets the default language
108+
serviceProtocol: 'https',
109+
serviceHost: 'localhost',
110+
servicePort: '443',
111+
servicePath: 'virtual_directory/api', // by default the virtual_directory is wscservice
112+
srcUrl: 'https://host_name/virtual_directory/wscbundle/wscbundle.js'
113+
}
90114
```
91115

116+
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.
117+
92118
## Documentation
93119

94120
To find out more, refer the following documentation:

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@webspellchecker/wproofreader-ckeditor5",
3-
"version": "3.1.1",
3+
"version": "3.1.2",
44
"description": "Multilingual spelling and grammar checking plugin for CKEditor 5",
55
"repository": {
66
"type": "git",

0 commit comments

Comments
 (0)