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 28
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 #25 from ckeditor/t/ckeditor5/1457
t/ckeditor5/1457: Implemented Font Color and Font Background Color features
- Loading branch information
Showing
44 changed files
with
3,173 additions
and
26 deletions.
There are no files selected for viewing
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
3 changes: 3 additions & 0 deletions
3
docs/_snippets/features/custom-font-color-and-background-color-options.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,3 @@ | ||
<div id="snippet-custom-font-color-and-background-color-options"> | ||
<p><span style="color:yellow;background-color:hsl(0,0%,0%);">Text</span> in this <span style="color:white;background-color:hsl(0,100%,50%);">sample</span> <span style="color:aqua;background-color:hsl(240,100%,50%);">has</span> <span style="color:lime;background-color:hsl(300,100%,20%);">m</span><span style="color:lime;background-color:hsl(300,100%,30%);">u</span><span style="color:lime;background-color:hsl(300,100%,40%);">l</span><span style="background-color:hsl(300,100%,50%);">t</span><span style="background-color:hsl(300,100%,60%);">i</span><span style="background-color:hsl(300,100%,70%);">p</span><span style="background-color:hsl(300,100%,80%);">l</span><span style="background-color:hsl(300,100%,90%);">e</span> <span style="color:purple;">font colors</span> and <span style="background-color:hsl(120,100%,90%);">font background</span> <span style="color:red;background-color:hsl(0,0%,62.50%);">colors</span>.</p> | ||
</div> |
209 changes: 209 additions & 0 deletions
209
docs/_snippets/features/custom-font-color-and-background-color-options.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,209 @@ | ||
/** | ||
* @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved. | ||
* For licensing, see LICENSE.md. | ||
*/ | ||
|
||
import { CS_CONFIG } from '@ckeditor/ckeditor5-cloud-services/tests/_utils/cloud-services-config'; | ||
|
||
/* globals ClassicEditor, console, window, document */ | ||
ClassicEditor | ||
.create( document.querySelector( '#snippet-custom-font-color-and-background-color-options' ), { | ||
cloudServices: CS_CONFIG, | ||
toolbar: { | ||
items: [ | ||
'heading', '|', 'fontColor', 'fontBackgroundColor', 'bulletedList', 'numberedList', 'undo', 'redo' | ||
], | ||
viewportTopOffset: window.getViewportTopOffsetConfig() | ||
}, | ||
fontBackgroundColor: { | ||
colors: [ | ||
'hsl(0,0%,0%)', | ||
'hsl(0,0%,12.5%)', | ||
'hsl(0,0%,25%)', | ||
'hsl(0,0%,37.5%)', | ||
'hsl(0,0%,50%)', | ||
'hsl(0,0%,62.50%)', | ||
'hsl(0,0%,75%)', | ||
'hsl(0,0%,87.5%)', | ||
{ | ||
color: 'hsl(0,0%,100%)', | ||
hasBorder: true | ||
}, | ||
'hsl(0,100%,10%)', | ||
'hsl(0,100%,20%)', | ||
'hsl(0,100%,30%)', | ||
'hsl(0,100%,40%)', | ||
'hsl(0,100%,50%)', | ||
'hsl(0,100%,60%)', | ||
'hsl(0,100%,70%)', | ||
'hsl(0,100%,80%)', | ||
{ | ||
color: 'hsl(0,100%,90%)', | ||
hasBorder: true | ||
}, | ||
'hsl(30,100%,10%)', | ||
'hsl(30,100%,20%)', | ||
'hsl(30,100%,30%)', | ||
'hsl(30,100%,40%)', | ||
'hsl(30,100%,50%)', | ||
'hsl(30,100%,60%)', | ||
'hsl(30,100%,70%)', | ||
'hsl(30,100%,80%)', | ||
{ | ||
color: 'hsl(30,100%,90%)', | ||
hasBorder: true | ||
}, | ||
'hsl(60,100%,10%)', | ||
'hsl(60,100%,20%)', | ||
'hsl(60,100%,30%)', | ||
'hsl(60,100%,40%)', | ||
'hsl(60,100%,50%)', | ||
'hsl(60,100%,60%)', | ||
'hsl(60,100%,70%)', | ||
'hsl(60,100%,80%)', | ||
{ | ||
color: 'hsl(60,100%,90%)', | ||
hasBorder: true | ||
}, | ||
'hsl(90,100%,10%)', | ||
'hsl(90,100%,20%)', | ||
'hsl(90,100%,30%)', | ||
'hsl(90,100%,40%)', | ||
'hsl(90,100%,50%)', | ||
'hsl(90,100%,60%)', | ||
'hsl(90,100%,70%)', | ||
'hsl(90,100%,80%)', | ||
{ | ||
color: 'hsl(90,100%,90%)', | ||
hasBorder: true | ||
}, | ||
'hsl(120,100%,10%)', | ||
'hsl(120,100%,20%)', | ||
'hsl(120,100%,30%)', | ||
'hsl(120,100%,40%)', | ||
'hsl(120,100%,50%)', | ||
'hsl(120,100%,60%)', | ||
'hsl(120,100%,70%)', | ||
'hsl(120,100%,80%)', | ||
{ | ||
color: 'hsl(120,100%,90%)', | ||
hasBorder: true | ||
}, | ||
'hsl(150,100%,10%)', | ||
'hsl(150,100%,20%)', | ||
'hsl(150,100%,30%)', | ||
'hsl(150,100%,40%)', | ||
'hsl(150,100%,50%)', | ||
'hsl(150,100%,60%)', | ||
'hsl(150,100%,70%)', | ||
'hsl(150,100%,80%)', | ||
{ | ||
color: 'hsl(150,100%,90%)', | ||
hasBorder: true | ||
}, | ||
'hsl(180,100%,10%)', | ||
'hsl(180,100%,20%)', | ||
'hsl(180,100%,30%)', | ||
'hsl(180,100%,40%)', | ||
'hsl(180,100%,50%)', | ||
'hsl(180,100%,60%)', | ||
'hsl(180,100%,70%)', | ||
'hsl(180,100%,80%)', | ||
{ | ||
color: 'hsl(180,100%,90%)', | ||
hasBorder: true | ||
}, | ||
'hsl(210,100%,10%)', | ||
'hsl(210,100%,20%)', | ||
'hsl(210,100%,30%)', | ||
'hsl(210,100%,40%)', | ||
'hsl(210,100%,50%)', | ||
'hsl(210,100%,60%)', | ||
'hsl(210,100%,70%)', | ||
'hsl(210,100%,80%)', | ||
{ | ||
color: 'hsl(210,100%,90%)', | ||
hasBorder: true | ||
}, | ||
'hsl(240,100%,10%)', | ||
'hsl(240,100%,20%)', | ||
'hsl(240,100%,30%)', | ||
'hsl(240,100%,40%)', | ||
'hsl(240,100%,50%)', | ||
'hsl(240,100%,60%)', | ||
'hsl(240,100%,70%)', | ||
'hsl(240,100%,80%)', | ||
{ | ||
color: 'hsl(240,100%,90%)', | ||
hasBorder: true | ||
}, | ||
'hsl(270,100%,10%)', | ||
'hsl(270,100%,20%)', | ||
'hsl(270,100%,30%)', | ||
'hsl(270,100%,40%)', | ||
'hsl(270,100%,50%)', | ||
'hsl(270,100%,60%)', | ||
'hsl(270,100%,70%)', | ||
'hsl(270,100%,80%)', | ||
{ | ||
color: 'hsl(270,100%,90%)', | ||
hasBorder: true | ||
}, | ||
'hsl(300,100%,10%)', | ||
'hsl(300,100%,20%)', | ||
'hsl(300,100%,30%)', | ||
'hsl(300,100%,40%)', | ||
'hsl(300,100%,50%)', | ||
'hsl(300,100%,60%)', | ||
'hsl(300,100%,70%)', | ||
'hsl(300,100%,80%)', | ||
{ | ||
color: 'hsl(300,100%,90%)', | ||
hasBorder: true | ||
}, | ||
'hsl(330,100%,10%)', | ||
'hsl(330,100%,20%)', | ||
'hsl(330,100%,30%)', | ||
'hsl(330,100%,40%)', | ||
'hsl(330,100%,50%)', | ||
'hsl(330,100%,60%)', | ||
'hsl(330,100%,70%)', | ||
'hsl(330,100%,80%)', | ||
{ | ||
color: 'hsl(330,100%,90%)', | ||
hasBorder: true | ||
}, | ||
], | ||
columns: 9 | ||
}, | ||
fontColor: { | ||
colors: [ | ||
'black', | ||
'gray', | ||
'silver', | ||
{ | ||
color: 'white', | ||
hasBorder: true | ||
}, | ||
'maroon', | ||
'red', | ||
'purple', | ||
'fuchsia', | ||
'green', | ||
'lime', | ||
'olive', | ||
'yellow', | ||
'navy', | ||
'blue', | ||
'teal', | ||
'aqua' | ||
], | ||
columns: 4 | ||
} | ||
} ) | ||
.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
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
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
Oops, something went wrong.