Skip to content

Commit

Permalink
Merge branch 'master' into i/7801
Browse files Browse the repository at this point in the history
  • Loading branch information
pomek committed Aug 14, 2020
2 parents 466c78e + a7ef65c commit e16cb29
Show file tree
Hide file tree
Showing 129 changed files with 3,832 additions and 943 deletions.
8 changes: 0 additions & 8 deletions docs/_snippets/features/wproofreader.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
<script type="text/javascript" src="https://svc.webspellchecker.net/spellcheck31/wscbundle/wscbundle.js"></script>
<script>
window.WEBSPELLCHECKER_CONFIG = {
autoSearch: true,
enableGrammar: true,
serviceId: '1:Eebp63-lWHbt2-ASpHy4-AYUpy2-fo3mk4-sKrza1-NsuXy4-I1XZC2-0u2F54-aqYWd1-l3Qf14-umd'
};
</script>
<div id="snippet-wproofreader">
<p>Typos hapen. We striving to correct them. Hover on the marked words for instant correction suggestions or click the dialog icon in the bottom right corner to have the whole text proofread at once.</p>
<p>You can also paste your own text here to have its spelling and grammar checked.</p>
Expand Down
48 changes: 47 additions & 1 deletion docs/_snippets/features/wproofreader.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,61 @@
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/

/* globals ClassicEditor, console, window, document */
/* globals console, window, document */

import ClassicEditor from '@ckeditor/ckeditor5-editor-classic/src/classiceditor';
import ArticlePluginSet from '@ckeditor/ckeditor5-core/tests/_utils/articlepluginset';
import EasyImage from '@ckeditor/ckeditor5-easy-image/src/easyimage';
import WProofreader from '@webspellchecker/wproofreader-ckeditor5/src/wproofreader';

import { CS_CONFIG } from '@ckeditor/ckeditor5-cloud-services/tests/_utils/cloud-services-config';

ClassicEditor
.create( document.querySelector( '#snippet-wproofreader' ), {
plugins: [ ArticlePluginSet, EasyImage, WProofreader ],
wproofreader: {
serviceId: '1:Eebp63-lWHbt2-ASpHy4-AYUpy2-fo3mk4-sKrza1-NsuXy4-I1XZC2-0u2F54-aqYWd1-l3Qf14-umd',
srcUrl: 'https://svc.webspellchecker.net/spellcheck31/wscbundle/wscbundle.js'
},
cloudServices: CS_CONFIG,
toolbar: {
items: [
'heading',
'|',
'bold',
'italic',
'bulletedList',
'numberedList',
'|',
'outdent',
'indent',
'|',
'blockQuote',
'link',
'mediaEmbed',
'insertTable',
'|',
'undo',
'redo'
],
viewportTopOffset: window.getViewportTopOffsetConfig()
},
image: {
styles: [
'full',
'alignLeft',
'alignRight'
],
toolbar: [
'imageStyle:alignLeft',
'imageStyle:full',
'imageStyle:alignRight',
'|',
'imageTextAlternative'
]
},
table: {
contentToolbar: [ 'tableColumn', 'tableRow', 'mergeTableCells' ]
}
} )
.then( editor => {
Expand Down
97 changes: 58 additions & 39 deletions docs/features/spelling-and-grammar-checking.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ menu-title: Spelling and grammar checking

# Proofreading, spelling and grammar checking

{@snippet build-classic-source}

<info-box>
The spell checker for CKEditor 5 is a commercial solution provided by our partner, [WebSpellChecker](https://webspellchecker.com/). You can report any issues in its [GitHub repository](https://github.com/WebSpellChecker/wproofreader). The license can be purchased [here](https://ckeditor.com/contact/).
</info-box>
Expand All @@ -29,63 +27,84 @@ There are also over 150 additional languages and specialized dictionaries such a

## Installation

WProofreader is installed separately from CKEditor 5 and does not need to be combined into an editor build as other features. To use this tool, it is necessary to load the WProofreader script on your page and provide the configuration.
WProofreader is delivered as a CKEditor 5 plugin, so it could be combined into an editor build as other features. To add this feature to your rich-text editor, install the [`@webspellchecker/wproofreader-ckeditor5`](https://www.npmjs.com/package/@webspellchecker/wproofreader-ckeditor5) package:

```bash
npm install --save @webspellchecker/wproofreader-ckeditor5
```

Then, add it to your plugin list:

```js
import WProofreader from '@webspellchecker/wproofreader-ckeditor5/src/wproofreader';
// ...

ClassicEditor
.create( editorElement, {
plugins: [ ..., WProofreader ],
// ...
} )
.then( ... )
.catch( ... );
```

<info-box info>
Read more about {@link builds/guides/integration/installing-plugins installing plugins}.
</info-box>

The proofreader can be used either as a [cloud solution](#wproofreader-cloud) or [hosted on your own server](#wproofreader-server).
At this step, it is required to provide a proper configuration. The proofreader can be used either as a [cloud solution](#wproofreader-cloud) or [hosted on your own server](#wproofreader-server).

### WProofreader Cloud

After signing up for a [trial or paid version](https://ckeditor.com/contact/), you will receive your service ID which is used to activate the service.

Add the following configuration to your page:

```html
<script>
window.WEBSPELLCHECKER_CONFIG = {
autoSearch: true,
enableGrammar: true,
serviceId: 'your-service-ID'
};
</script>
```
Add the following configuration to your editor:

And then load the proofreader script:
```js
import WProofreader from '@webspellchecker/wproofreader-ckeditor5/src/wproofreader';
// ...

```html
<script src="https://svc.webspellchecker.net/spellcheck31/wscbundle/wscbundle.js"></script>
ClassicEditor
.create( editorElement, {
plugins: [ ..., WProofreader ],
wproofreader: {
serviceId: 'your-service-ID',
srcUrl: 'https://svc.webspellchecker.net/spellcheck31/wscbundle/wscbundle.js'
}
} )
```

Refer to the [official documentation](https://github.com/WebSpellChecker/wproofreader#wproofreader-cloud) for more details about the cloud setup and available configuration options.
Refer to the [official documentation](https://github.com/WebSpellChecker/wproofreader-ckeditor5#install-instructions) for more details about the cloud setup and available configuration options.

### WProofreader Server

After signing up for a [trial or paid version](https://ckeditor.com/contact/), you will receive access to the WebSpellChecker Server package to install on your own server.

You will need to add the following configuration to your page:

```html
<script>
window.WEBSPELLCHECKER_CONFIG = {
autoSearch: true,
enableGrammar: true,
servicePort: '2880',
servicePath: '/'
};
</script>
```

Then specify the path to the service on your page:

```html
<script src="http(s)://your_host_name/spellcheck/wscbundle/wscbundle.js"></script>
You will need to add the following configuration to your editor:

```js
import WProofreader from '@webspellchecker/wproofreader-ckeditor5/src/wproofreader';
// ...

ClassicEditor
.create( editorElement, {
plugins: [ ..., WProofreader ],
wproofreader: {
serviceProtocol: 'https',
serviceHost: 'localhost',
servicePort: '2880',
servicePath: '/',
srcUrl: 'https://host_name/virtual_directory/wscbundle/wscbundle.js'
}
} )
```

Refer to the [official documentation](https://github.com/WebSpellChecker/wproofreader#wproofreader-server) for more details about the server setup and available configuration options.
Refer to the [official documentation](https://github.com/WebSpellChecker/wproofreader-ckeditor5#install-instructions) for more details about the server setup and available configuration options.

## Configuration

WProofreader configuration is set outside the CKEditor 5 configuration. Refer to the [WProofreader API](http://dev.webspellchecker.net/api/wscbundle/) for further information.
WProofreader configuration is set inside the CKEditor 5 configuration in `wproofreader` object. Refer to the [WProofreader API](https://webspellchecker.com/docs/api/wscbundle/Options.html) for further information.

## Contribute

You can report issues and request features in the [official WProofreader repository](https://github.com/WebSpellChecker/wproofreader/issues).
You can report issues and request features in the [official WProofreader for CKEditor 5 repository](https://github.com/WebSpellChecker/wproofreader-ckeditor5/issues).
4 changes: 2 additions & 2 deletions docs/framework/guides/architecture/editing-engine.md
Original file line number Diff line number Diff line change
Expand Up @@ -226,14 +226,14 @@ editor.data; // The data pipeline (DataController).

### Element types and custom data

The structure of the view resembles the structure in the DOM very closely. The semantics of HTML is defined in its specification. The view structure comes "DTD-free", so in order to provide additional information and to better express the semantics of the content, the view structure implements 6 element types ({@link module:engine/view/containerelement~ContainerElement}, {@link module:engine/view/attributeelement~AttributeElement}, {@link module:engine/view/emptyelement~EmptyElement}, {@link module:engine/view/rawelement~RawElement}, {@link module:engine/view/uielement~UIElement}, and {@link module:engine/view/editableelement~EditableElement}) and so called {@link module:engine/view/element~Element#getCustomProperty "custom properties"} (i.e. custom element properties which are not rendered). This additional information provided by editor features is then used by the {@link module:engine/view/renderer~Renderer} and [converters](#conversion).
The structure of the view resembles the structure in the DOM very closely. The semantics of HTML is defined in its specification. The view structure comes "DTD-free", so in order to provide additional information and to better express the semantics of the content, the view structure implements 6 element types ({@link module:engine/view/containerelement~ContainerElement}, {@link module:engine/view/attributeelement~AttributeElement}, {@link module:engine/view/emptyelement~EmptyElement}, {@link module:engine/view/rawelement~RawElement}, {@link module:engine/view/uielement~UIElement}, and {@link module:engine/view/editableelement~EditableElement}) and so called {@link module:engine/view/element~Element#getCustomProperty "custom properties"} (i.e. custom element properties which are not rendered). This additional information provided by the editor features is then used by the {@link module:engine/view/renderer~Renderer} and [converters](#conversion).

The element types can be defined as follows:

* **Container element** &ndash; The elements that build the structure of the content. Used for block elements such as `<p>`, `<h1>`, `<blockQuote>`, `<li>`, etc.
* **Attribute element** &ndash; The elements that cannot hold container elements inside them. Most model text attributes are converted to view attribute elements. They are used mostly for inline styling elements such as `<strong>`, `<i>`, `<a>`, `<code>`. Similar attribute elements are flattened by the view writer, so e.g. `<a href="..."><a class="bar">x</a></a>` would automatically be optimized to `<a href="..." class="bar">x</a>`.
* **Empty element** &ndash; The elements that must not have any child nodes, for example `<img>`.
* **UI elements** &ndash; The elements that are not a part of the "data" but need to be "inlined" in the content. They are ignored by the selection (it jumps over them) and the view writer in general. The contents of these elements and events coming from them are filtered out, too.
* **UI element** &ndash; The elements that are not a part of the "data" but need to be "inlined" in the content. They are ignored by the selection (it jumps over them) and the view writer in general. The contents of these elements and events coming from them are filtered out, too.
* **Raw element** &ndash; The elements that work as data containers ("wrappers", "sandboxes") but their children are transparent to the editor. Useful when non-standard data must be rendered but the editor should not be concerned what it is and how it works. Users cannot put the selection inside a raw element, split it into smaller chunks or directly modify its content.
* **Editable element** &ndash; The elements used as "nested editables" of non-editable fragments of the content, for example a caption in the image widget, where the `<figure>` wrapping the image is not editable (it is a widget) and the `<figcaption>` inside it is an editable element.

Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@
"@ckeditor/ckeditor5-react": "^2.1.0",
"@ckeditor/ckeditor5-real-time-collaboration": "^21.0.0",
"@ckeditor/ckeditor5-track-changes": "^21.0.0",
"@webspellchecker/wproofreader-ckeditor5": "^1.0.5",
"@wiris/mathtype-ckeditor5": "7.20.0",
"babel-standalone": "^6.26.0",
"coveralls": "^3.1.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ msgstr ""

msgctxt "A generic error message displayed on upload failure. The file name is concatenated to this text."
msgid "Cannot upload file:"
msgstr "파일 업로드 불가"
msgstr "파일 업로드할 수 없음: "
8 changes: 4 additions & 4 deletions packages/ckeditor5-alignment/lang/translations/ko.po
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,19 @@ msgstr ""

msgctxt "Toolbar button tooltip for aligning the text to the left."
msgid "Align left"
msgstr "왼쪽 맞춤"
msgstr "왼쪽 정렬"

msgctxt "Toolbar button tooltip for aligning the text to the right."
msgid "Align right"
msgstr "오른쪽 맞춤"
msgstr "오른쪽 정렬"

msgctxt "Toolbar button tooltip for aligning the text to center."
msgid "Align center"
msgstr "가운데 맞춤"
msgstr "가운데 정렬"

msgctxt "Toolbar button tooltip for making the text justified."
msgid "Justify"
msgstr "양쪽 맞춤"
msgstr "양쪽 정렬"

msgctxt "Dropdown button tooltip for the text alignment feature."
msgid "Text alignment"
Expand Down
2 changes: 1 addition & 1 deletion packages/ckeditor5-alignment/lang/translations/zh.po
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ msgstr "文字對齊"

msgctxt "Label used by assistive technologies describing the text alignment feature toolbar."
msgid "Text alignment toolbar"
msgstr ""
msgstr "文字對齊"
5 changes: 3 additions & 2 deletions packages/ckeditor5-autoformat/docs/features/autoformat.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,9 @@ Example:

In addition to enabling automatic text formatting, you may want to check the following productivity features:

* {@link features/text-transformation Automatic text transformation} &ndash; It enables automatic turning snippets such as `(tm)` into `` and `"foo"` into `“foo”`.
* {@link features/mentions Mentions} &ndash; It brings support for smart autocompletion.
* {@link features/text-transformation Automatic text transformation} &ndash; Enables automatic turning snippets such as `(tm)` into `` and `"foo"` into `“foo”`.
* {@link features/link#autolink-feature Autolink} &ndash; Turns the links and email addresses typed or pasted into the editor into active URLs.
* {@link features/mentions Mentions} &ndash; Brings support for smart autocompletion.

## Installation

Expand Down
4 changes: 2 additions & 2 deletions packages/ckeditor5-autoformat/tests/blockautoformatediting.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ describe( 'blockAutoformatEditing', () => {
editor.conversion.for( 'downcast' )
.elementToElement( {
model: 'softBreak',
view: ( modelElement, viewWriter ) => viewWriter.createEmptyElement( 'br' )
view: ( modelElement, { writer } ) => writer.createEmptyElement( 'br' )
} );

const spy = testUtils.sinon.spy();
Expand Down Expand Up @@ -207,7 +207,7 @@ describe( 'blockAutoformatEditing', () => {
editor.conversion.for( 'downcast' )
.elementToElement( {
model: 'softBreak',
view: ( modelElement, viewWriter ) => viewWriter.createEmptyElement( 'br' )
view: ( modelElement, { writer } ) => writer.createEmptyElement( 'br' )
} );

const spy = testUtils.sinon.spy();
Expand Down
2 changes: 1 addition & 1 deletion packages/ckeditor5-autosave/lang/translations/ko.po
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ msgstr ""

msgctxt "A message that the data is being saved."
msgid "Saving changes"
msgstr "변경사항 저장"
msgstr "변경된 내용을 저장하고 있습니다"
2 changes: 1 addition & 1 deletion packages/ckeditor5-basic-styles/lang/translations/ko.po
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ msgstr "밑줄"

msgctxt "Toolbar button tooltip for the Code feature."
msgid "Code"
msgstr "소스"
msgstr "코드"

msgctxt "Toolbar button tooltip for the Strikethrough feature."
msgid "Strikethrough"
Expand Down
37 changes: 37 additions & 0 deletions packages/ckeditor5-ckfinder/lang/translations/ko.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved.
#
# !!! IMPORTANT !!!
#
# Before you edit this file, please keep in mind that contributing to the project
# translations is possible ONLY via the Transifex online service.
#
# To submit your translations, visit https://www.transifex.com/ckeditor/ckeditor5.
#
# To learn more, check out the official contributor's guide:
# https://ckeditor.com/docs/ckeditor5/latest/framework/guides/contributing/contributing.html
#
msgid ""
msgstr ""
"Language-Team: Korean (https://www.transifex.com/ckeditor/teams/11143/ko/)\n"
"Language: ko\n"
"Plural-Forms: nplurals=1; plural=0;\n"

msgctxt "Toolbar button tooltip for inserting an image or file via a CKFinder file browser."
msgid "Insert image or file"
msgstr "사진이나 파일을 삽입"

msgctxt "Error message displayed when inserting a resized version of an image failed."
msgid "Could not obtain resized image URL."
msgstr "크기가 조절된 사진의 URL을 가져오지 못했습니다."

msgctxt "Title of a notification displayed when inserting a resized version of an image failed."
msgid "Selecting resized image failed"
msgstr "크기가 조절된 이미지 선택 실패"

msgctxt "Error message displayed when an image cannot be inserted at the current position."
msgid "Could not insert image at the current position."
msgstr "현재 위치에 사진을 삽입할 수 없습니다."

msgctxt "Title of a notification displayed when an image cannot be inserted at the current position."
msgid "Inserting image failed"
msgstr "사진 삽입 실패"
25 changes: 25 additions & 0 deletions packages/ckeditor5-code-block/lang/translations/ko.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved.
#
# !!! IMPORTANT !!!
#
# Before you edit this file, please keep in mind that contributing to the project
# translations is possible ONLY via the Transifex online service.
#
# To submit your translations, visit https://www.transifex.com/ckeditor/ckeditor5.
#
# To learn more, check out the official contributor's guide:
# https://ckeditor.com/docs/ckeditor5/latest/framework/guides/contributing/contributing.html
#
msgid ""
msgstr ""
"Language-Team: Korean (https://www.transifex.com/ckeditor/teams/11143/ko/)\n"
"Language: ko\n"
"Plural-Forms: nplurals=1; plural=0;\n"

msgctxt "A label of the button that allows inserting a new code block into the editor content."
msgid "Insert code block"
msgstr "코드 블럭 삽입"

msgctxt "A language of the code block in the editor content when no specific programming language is associated with it."
msgid "Plain text"
msgstr "평문"
Loading

0 comments on commit e16cb29

Please sign in to comment.