This repository has been archived by the owner on Jun 26, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from ckeditor/i/1110
Internal: Simplified the code. Removed a command, added translations, and the documentation. Closes ckeditor/ckeditor5#1110. Closes ckeditor/ckeditor5#5879.
- Loading branch information
Showing
27 changed files
with
1,109 additions
and
1,238 deletions.
There are no files selected for viewing
15 changes: 15 additions & 0 deletions
15
docs/_snippets/features/special-characters-extended-category.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<div id="snippet-special-characters-extended-category"> | ||
<h2 style="text-align:center;">The Flavorful Tuscany Meetup</h2> | ||
<h3 style="text-align:center;">Welcome letter</h3> | ||
<p>Dear Guest,</p> | ||
<p>We are delighted to welcome you to the annual <i>Flavorful Tuscany Meetup</i> and hope you will enjoy the programme as well as your stay at the <a href="https://ckeditor.com">Bilancino Hotel</a>.</p> | ||
<p>Please arrive at the <a href="https://ckeditor.com">Bilancino Hotel</a> reception desk at least half an hour earlier to make sure that the registration process goes as smoothly as possible.</p> | ||
<p>We look forward to welcoming you to the event. The full schedule can be found below.</p> | ||
</div> | ||
|
||
<style> | ||
.ck-content h2 { | ||
border-bottom: none; | ||
margin-bottom: 0; | ||
} | ||
</style> |
65 changes: 65 additions & 0 deletions
65
docs/_snippets/features/special-characters-extended-category.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
/** | ||
* @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved. | ||
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license | ||
*/ | ||
|
||
/* globals window, document, console, ClassicEditor */ | ||
|
||
import { CS_CONFIG } from '@ckeditor/ckeditor5-cloud-services/tests/_utils/cloud-services-config'; | ||
|
||
ClassicEditor | ||
.create( document.querySelector( '#snippet-special-characters-extended-category' ), { | ||
removePlugins: [ | ||
'SpecialCharactersEmoji' | ||
], | ||
toolbar: { | ||
items: [ | ||
'heading', | ||
'|', | ||
'bold', | ||
'italic', | ||
'bulletedList', | ||
'numberedList', | ||
'|', | ||
'outdent', | ||
'indent', | ||
'|', | ||
'alignment', | ||
'|', | ||
'specialCharacters', | ||
'blockQuote', | ||
'link', | ||
'imageUpload', | ||
'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' ] | ||
}, | ||
cloudServices: CS_CONFIG | ||
} ) | ||
.then( editor => { | ||
window.editor = editor; | ||
} ) | ||
.catch( err => { | ||
console.error( err.stack ); | ||
} ); |
15 changes: 15 additions & 0 deletions
15
docs/_snippets/features/special-characters-new-category.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<div id="snippet-special-characters-new-category"> | ||
<h2 style="text-align:center;">The Flavorful Tuscany Meetup</h2> | ||
<h3 style="text-align:center;">Welcome letter</h3> | ||
<p>Dear Guest,</p> | ||
<p>We are delighted to welcome you to the annual <i>Flavorful Tuscany Meetup</i> and hope you will enjoy the programme as well as your stay at the <a href="https://ckeditor.com">Bilancino Hotel</a>.</p> | ||
<p>Please arrive at the <a href="https://ckeditor.com">Bilancino Hotel</a> reception desk at least half an hour earlier to make sure that the registration process goes as smoothly as possible.</p> | ||
<p>We look forward to welcoming you to the event. The full schedule can be found below.</p> | ||
</div> | ||
|
||
<style> | ||
.ck-content h2 { | ||
border-bottom: none; | ||
margin-bottom: 0; | ||
} | ||
</style> |
65 changes: 65 additions & 0 deletions
65
docs/_snippets/features/special-characters-new-category.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
/** | ||
* @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved. | ||
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license | ||
*/ | ||
|
||
/* globals window, document, console, ClassicEditor */ | ||
|
||
import { CS_CONFIG } from '@ckeditor/ckeditor5-cloud-services/tests/_utils/cloud-services-config'; | ||
|
||
ClassicEditor | ||
.create( document.querySelector( '#snippet-special-characters-new-category' ), { | ||
removePlugins: [ | ||
'SpecialCharactersArrowsExtended' | ||
], | ||
toolbar: { | ||
items: [ | ||
'heading', | ||
'|', | ||
'bold', | ||
'italic', | ||
'bulletedList', | ||
'numberedList', | ||
'|', | ||
'outdent', | ||
'indent', | ||
'|', | ||
'alignment', | ||
'|', | ||
'specialCharacters', | ||
'blockQuote', | ||
'link', | ||
'imageUpload', | ||
'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' ] | ||
}, | ||
cloudServices: CS_CONFIG | ||
} ) | ||
.then( editor => { | ||
window.editor = editor; | ||
} ) | ||
.catch( err => { | ||
console.error( err.stack ); | ||
} ); |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
/** | ||
* @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved. | ||
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license | ||
*/ | ||
|
||
/* globals window */ | ||
|
||
import Plugin from '@ckeditor/ckeditor5-core/src/plugin'; | ||
import ClassicEditor from '@ckeditor/ckeditor5-build-classic/src/ckeditor'; | ||
import Alignment from '@ckeditor/ckeditor5-alignment/src/alignment'; | ||
import SpecialCharactersEssentials from '@ckeditor/ckeditor5-special-characters/src/specialcharactersessentials'; | ||
|
||
class SpecialCharactersEmoji extends Plugin { | ||
static get pluginName() { | ||
return 'SpecialCharactersEmoji'; | ||
} | ||
|
||
init() { | ||
this.editor.plugins.get( 'SpecialCharacters' ).addItems( 'Emoji', [ | ||
{ title: 'smiley face', character: '😊' }, | ||
{ title: 'rocket', character: '🚀' }, | ||
{ title: 'basketball', character: '🏀' }, | ||
{ title: 'floppy disk', character: '💾' }, | ||
{ title: 'hearth', character: '❤' } | ||
] ); | ||
} | ||
} | ||
|
||
class SpecialCharactersArrowsExtended extends Plugin { | ||
static get pluginName() { | ||
return 'SpecialCharactersArrowsExtended'; | ||
} | ||
|
||
init() { | ||
this.editor.plugins.get( 'SpecialCharacters' ).addItems( 'Arrows', [ | ||
{ title: 'simple arrow left', character: '←' }, | ||
{ title: 'simple arrow up', character: '↑' }, | ||
{ title: 'simple arrow right', character: '→' }, | ||
{ title: 'simple arrow down', character: '↓' } | ||
] ); | ||
} | ||
} | ||
|
||
ClassicEditor.builtinPlugins.push( Alignment ); | ||
ClassicEditor.builtinPlugins.push( SpecialCharactersEssentials ); | ||
ClassicEditor.builtinPlugins.push( SpecialCharactersEmoji ); | ||
ClassicEditor.builtinPlugins.push( SpecialCharactersArrowsExtended ); | ||
|
||
window.ClassicEditor = ClassicEditor; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<div id="snippet-special-characters"> | ||
<h2 style="text-align:center;">The Flavorful Tuscany Meetup</h2> | ||
<h3 style="text-align:center;">Welcome letter</h3> | ||
<p>Dear Guest,</p> | ||
<p>We are delighted to welcome you to the annual <i>Flavorful Tuscany Meetup</i> and hope you will enjoy the programme as well as your stay at the <a href="https://ckeditor.com">Bilancino Hotel</a>.</p> | ||
<p>Please arrive at the <a href="https://ckeditor.com">Bilancino Hotel</a> reception desk at least half an hour earlier to make sure that the registration process goes as smoothly as possible.</p> | ||
<p>We look forward to welcoming you to the event. The full schedule can be found below.</p> | ||
</div> | ||
|
||
<style> | ||
.ck-content h2 { | ||
border-bottom: none; | ||
margin-bottom: 0; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
/** | ||
* @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved. | ||
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license | ||
*/ | ||
|
||
/* globals window, document, console, ClassicEditor */ | ||
|
||
import { CS_CONFIG } from '@ckeditor/ckeditor5-cloud-services/tests/_utils/cloud-services-config'; | ||
|
||
ClassicEditor | ||
.create( document.querySelector( '#snippet-special-characters' ), { | ||
removePlugins: [ | ||
'SpecialCharactersEmoji', | ||
'SpecialCharactersArrowsExtended' | ||
], | ||
toolbar: { | ||
items: [ | ||
'heading', | ||
'|', | ||
'bold', | ||
'italic', | ||
'bulletedList', | ||
'numberedList', | ||
'|', | ||
'outdent', | ||
'indent', | ||
'|', | ||
'alignment', | ||
'|', | ||
'specialCharacters', | ||
'blockQuote', | ||
'link', | ||
'imageUpload', | ||
'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' ] | ||
}, | ||
cloudServices: CS_CONFIG | ||
} ) | ||
.then( editor => { | ||
window.editor = editor; | ||
} ) | ||
.catch( err => { | ||
console.error( err.stack ); | ||
} ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
--- | ||
category: api-reference | ||
--- | ||
|
||
# Special characters feature for CKEditor 5 | ||
|
||
[![npm version](https://badge.fury.io/js/%40ckeditor%2Fckeditor5-special-characters.svg)](https://www.npmjs.com/package/@ckeditor/ckeditor5-special-characters) | ||
|
||
This package implements the special characters feature for CKEditor 5. | ||
|
||
## Demo | ||
|
||
Check out the {@link features/special-characters#demo demo in the Special characters feature} guide. | ||
|
||
## Documentation | ||
|
||
See the {@link features/special-characters Special characters feature} guide and the {@link module:special-characters/specialcharacters~SpecialCharacters} plugin documentation. | ||
|
||
## Installation | ||
|
||
```plaintext | ||
npm install --save @ckeditor/ckeditor5-special-characters | ||
``` | ||
|
||
## Contribute | ||
|
||
The source code of this package is available on GitHub in https://github.com/ckeditor/ckeditor5-special-characters. | ||
|
||
## External links | ||
|
||
* [`@ckeditor/ckeditor5-special-characters` on npm](https://www.npmjs.com/package/@ckeditor/ckeditor5-special-characters) | ||
* [`ckeditor/ckeditor5-special-characters` on GitHub](https://github.com/ckeditor/ckeditor5-special-characters) | ||
* [Issue tracker](https://github.com/ckeditor/ckeditor5/issues) | ||
* [Changelog](https://github.com/ckeditor/ckeditor5-special-characters/blob/master/CHANGELOG.md) |
Oops, something went wrong.