Skip to content

Commit

Permalink
Merge branch 'master' into i/8137
Browse files Browse the repository at this point in the history
  • Loading branch information
Reinmar committed Dec 22, 2020
2 parents 782a5a0 + 8d9e06b commit a38fa9b
Show file tree
Hide file tree
Showing 274 changed files with 3,973 additions and 1,413 deletions.
162 changes: 162 additions & 0 deletions CHANGELOG.md

Large diffs are not rendered by default.

Empty file.
44 changes: 44 additions & 0 deletions docs/_snippets/features/build-toolbar-source.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
/**
* @license Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/

/* globals window */

import ClassicEditor from '@ckeditor/ckeditor5-build-classic/src/ckeditor';

import Alignment from '@ckeditor/ckeditor5-alignment/src/alignment';
import Strikethrough from '@ckeditor/ckeditor5-basic-styles/src/strikethrough';
import Subscript from '@ckeditor/ckeditor5-basic-styles/src/subscript';
import Superscript from '@ckeditor/ckeditor5-basic-styles/src/superscript';
import Underline from '@ckeditor/ckeditor5-basic-styles/src/underline';
import TableProperties from '@ckeditor/ckeditor5-table/src/tableproperties';
import TableCellProperties from '@ckeditor/ckeditor5-table/src/tablecellproperties';
import FontSize from '@ckeditor/ckeditor5-font/src/fontsize';
import FontFamily from '@ckeditor/ckeditor5-font/src/fontfamily';
import FontColor from '@ckeditor/ckeditor5-font/src/fontcolor';
import FontBackgroundColor from '@ckeditor/ckeditor5-font/src/fontbackgroundcolor';
import CodeBlock from '@ckeditor/ckeditor5-code-block/src/codeblock';
import Code from '@ckeditor/ckeditor5-basic-styles/src/code';
import IndentBlock from '@ckeditor/ckeditor5-indent/src/indentblock';
import Indent from '@ckeditor/ckeditor5-indent/src/indent';
import TodoList from '@ckeditor/ckeditor5-list/src/todolist';

ClassicEditor.builtinPlugins.push( Alignment );
ClassicEditor.builtinPlugins.push( Strikethrough );
ClassicEditor.builtinPlugins.push( Subscript );
ClassicEditor.builtinPlugins.push( Superscript );
ClassicEditor.builtinPlugins.push( Underline );
ClassicEditor.builtinPlugins.push( TableProperties );
ClassicEditor.builtinPlugins.push( TableCellProperties );
ClassicEditor.builtinPlugins.push( FontSize );
ClassicEditor.builtinPlugins.push( FontFamily );
ClassicEditor.builtinPlugins.push( FontColor );
ClassicEditor.builtinPlugins.push( FontBackgroundColor );
ClassicEditor.builtinPlugins.push( CodeBlock );
ClassicEditor.builtinPlugins.push( IndentBlock );
ClassicEditor.builtinPlugins.push( Indent );
ClassicEditor.builtinPlugins.push( Code );
ClassicEditor.builtinPlugins.push( TodoList );

window.ClassicEditor = ClassicEditor;
29 changes: 28 additions & 1 deletion docs/_snippets/features/read-only.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,32 @@
</p>

<div id="snippet-read-only">
<p>This is <a href="https://ckeditor.com">CKEditor&nbsp;5</a>.</p>
<h2>The sales data for Q3 for the <strong>Click&#39;n&#39;go</strong> product line</h2>

<table border="1" cellpadding="1" cellspacing="1" style="width:500px">
<thead>
<tr>
<th scope="row">&nbsp;</th>
<th scope="col">Income</th>
<th scope="col">Revenue</th>
</tr>
</thead>
<tbody>
<tr>
<th scope="row">Walker 3</th>
<td style="text-align:center">$104.000</td>
<td style="text-align:center">15%</td>
</tr>
<tr>
<th scope="row">Stroller</th>
<td style="text-align:center">$12.000</td>
<td style="text-align:center">10%</td>
</tr>
<tr>
<th scope="row">Runner</th>
<td style="text-align:center">$97.500</td>
<td style="text-align:center">15%</td>
</tr>
</tbody>
</table>
</div>
7 changes: 7 additions & 0 deletions docs/_snippets/features/toolbar-basic.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<div id="toolbar-basic">

<p>
The <a href="https://en.wikipedia.org/wiki/Mars">Red Planet</a> is a target that has been aimed at for decades. Both Soviet (later Russian) and American designers looked at the sky and planned. Valeri Polyakov spent almost <strong>438 days</strong> during a single long-term mission onboard the <i>Mir</i> space station to test the ability of humans to thrive in space for long periods of time. It was twenty years ago. The experiments he carried out, the research and all scientific data are still patiently waiting. They are evaluated, researched, re-read again and again, as people near the day they will launch a manned spacecraft toward Mars, the Moon, or the cislunar orbit.
</p>

</div>
22 changes: 22 additions & 0 deletions docs/_snippets/features/toolbar-basic.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/**
* @license Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/

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

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

ClassicEditor
.create( document.querySelector( '#toolbar-basic' ), {
toolbar: {
items: [ 'bold', 'italic', 'link', 'undo', 'redo', 'numberedList', 'bulletedList' ]
},
cloudServices: CS_CONFIG
} )
.then( editor => {
window.editor = editor;
} )
.catch( err => {
console.error( err.stack );
} );
8 changes: 8 additions & 0 deletions docs/_snippets/features/toolbar-breakpoint.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<div id="toolbar-breakpoint">

<h2>The nice Canadian</h2>
<p>Remember Chris Hadfield? Of course, everyone has seen &ldquo;Space Oddity&rdquo; played and sung onboard the <em>ISS</em>. But have you seen the videos he recorded for schools? Short pieces on living in space, brushing your teeth in space, and sleeping in zero gravity? Kids love them. Teachers love them. Schools use them. This is a gift, a thank you gesture, a hand extended back. This humble man made his dream come true, he flew to the stars. But not even once did he forget the people that put him there &ndash; the engineers, designers, scientists.&nbsp;Those before him that went into space and those who gave their life to make this dream possible.</p>

<p>Now he helps bring up a new generation that will build better, safer, faster spaceships. That will once more reach the surface of the Moon, will leave the Earth orbit and fly to Mars, to Venus. Those are years to come and the goals will take a lot of patience. But what he does is gold. He is honest, humble, and true in what he did up there and the generation that came can see that, share in his activities and grab that passion.</p>

</div>
63 changes: 63 additions & 0 deletions docs/_snippets/features/toolbar-breakpoint.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
/**
* @license Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/

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

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

ClassicEditor
.create( document.querySelector( '#toolbar-breakpoint' ), {
toolbar: {
items: [
'heading', '|',
'alignment', '|',
'bold', 'italic', 'strikethrough', 'underline', 'subscript', 'superscript', '|',
'link', '|',
'bulletedList', 'numberedList', 'todoList', '-',
'fontfamily', 'fontsize', 'fontColor', 'fontBackgroundColor', '|',
'code', 'codeBlock', '|',
'insertTable', '|',
'outdent', 'indent', '|',
'imageUpload', 'blockQuote', '|',
'undo', 'redo'
],
shouldNotGroupWhenFull: true,
viewportTopOffset: window.getViewportTopOffsetConfig()
},
image: {
toolbar: [ 'imageStyle:full', 'imageStyle:side', '|', 'imageTextAlternative' ]
},
codeBlock: {
languages: [
{ language: 'css', label: 'CSS' },
{ language: 'html', label: 'HTML' },
{ language: 'javascript', label: 'JavaScript' },
{ language: 'php', label: 'PHP' }
]
},
fontFamily: {
supportAllValues: true
},
fontSize: {
options: [ 9, 10, 11, 12, 'default', 14, 15 ],
supportAllValues: true
},
heading: {
options: [
{ model: 'paragraph', title: 'Paragraph', class: 'ck-heading_paragraph' },
{ model: 'heading1', view: 'h2', title: 'Heading 1', class: 'ck-heading_heading1' },
{ model: 'heading2', view: 'h3', title: 'Heading 2', class: 'ck-heading_heading2' },
{ model: 'heading3', view: 'h4', title: 'Heading 3', class: 'ck-heading_heading3' },
{ model: 'heading4', view: 'h5', title: 'Heading 4', class: 'ck-heading_heading4' }
]
},
cloudServices: CS_CONFIG
} )
.then( editor => {
window.editor = editor;
} )
.catch( err => {
console.error( err.stack );
} );
9 changes: 9 additions & 0 deletions docs/_snippets/features/toolbar-grouping.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<div id="toolbar-grouping">

<h2>The space race</h2>

<p>It is no longer a secret &mdash; though it was for a long time &mdash; that the Soviet Union raced the United States to the Moon and only aknowledging the failure did they focus all their brilliant minds and hard work on the orbital station program known widely as Salyut. The reason for their lunar failure &mdash; we learned that only in the late 1990&rsquo;s after the fall of USSR &mdash; was the lack of a proper plan. And, as some sources suggest, the absence of a real need to achieve that goal. It was the US president&rsquo;s challenge, cast in front of an audience, that the Americans will put a man on the face of Luna before the end of the decade. The Soviets, who have so far been winning in everything concerning the space race, felt obliged to accept the challenge.</p>

<p>So what made the Soviets fail? Why did the <em>N1</em> monster rocket never leave low earth orbit and why did the <em>Lunniy Korabl</em> never reach the surface of our natural satellite? I believe it was because the Soviets never planned to go there in the first place. The greatest minds of that nation were involved, but the undertaking had no heart. And no real favors on the part of the Communist Party. No passion, no fire, no feeling to take that Soviet Man, grab him with the mighty hand formed from the collective effort of the workers and scientists, and cast him into orbit like a gauntlet cast in the face of the American opponent. And most of all &mdash; no time. They were so behind their counterparts from the USA that they just could not make up the lost time.</p>

</div>
59 changes: 59 additions & 0 deletions docs/_snippets/features/toolbar-grouping.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
/**
* @license Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/

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

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

ClassicEditor
.create( document.querySelector( '#toolbar-grouping' ), {
toolbar: {
items: [
'heading', '|',
'fontfamily', 'fontsize', 'fontColor', 'fontBackgroundColor', '|',
'bold', 'italic', 'strikethrough', 'subscript', 'superscript', 'link', '|',
'bulletedList', 'numberedList', 'todoList', '|',
'code', 'codeBlock', '|',
'outdent', 'indent', '|',
'imageUpload', 'blockQuote', '|',
'undo', 'redo'
],
viewportTopOffset: window.getViewportTopOffsetConfig()
},
image: {
toolbar: [ 'imageStyle:full', 'imageStyle:side', '|', 'imageTextAlternative' ]
},
codeBlock: {
languages: [
{ language: 'css', label: 'CSS' },
{ language: 'html', label: 'HTML' },
{ language: 'javascript', label: 'JavaScript' },
{ language: 'php', label: 'PHP' }
]
},
fontFamily: {
supportAllValues: true
},
fontSize: {
options: [ 9, 10, 11, 12, 'default', 14, 15 ],
supportAllValues: true
},
heading: {
options: [
{ model: 'paragraph', title: 'Paragraph', class: 'ck-heading_paragraph' },
{ model: 'heading1', view: 'h2', title: 'Heading 1', class: 'ck-heading_heading1' },
{ model: 'heading2', view: 'h3', title: 'Heading 2', class: 'ck-heading_heading2' },
{ model: 'heading3', view: 'h4', title: 'Heading 3', class: 'ck-heading_heading3' },
{ model: 'heading4', view: 'h5', title: 'Heading 4', class: 'ck-heading_heading4' }
]
},
cloudServices: CS_CONFIG
} )
.then( editor => {
window.editor = editor;
} )
.catch( err => {
console.error( err.stack );
} );
7 changes: 7 additions & 0 deletions docs/_snippets/features/toolbar-separator.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<div id="toolbar-separator">

<p>
The Soviets have been winning in everything concerning the space race up until the American <strong>Moon landing</strong> in 1969. They beat the Americans with the <strong>first manned spaceflight</strong>, the <strong>first woman in space</strong> (and for almost twenty more years the only one), the <strong>first multicraft flight</strong>, and finally &mdash; the <strong>first group flight</strong>. They left Americans on the scorched ground, even if sometimes just by weeks or even days. And in the course of racing the hideous imperialist capitalist to the Silver Globe they achieved one more outstanding success &mdash; the <strong>first orbital docking</strong> between two manned spaceships and a successful <strong>orbital crew transfer</strong> which let to the launch of <strong>world&#39;s first-ever orbital station</strong> <em>Salyut 1</em> and taking back the lead in 1971.
</p>

</div>
22 changes: 22 additions & 0 deletions docs/_snippets/features/toolbar-separator.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/**
* @license Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/

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

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

ClassicEditor
.create( document.querySelector( '#toolbar-separator' ), {
toolbar: {
items: [ 'bold', 'italic', '|', 'undo', 'redo', '|', 'numberedList', 'bulletedList' ]
},
cloudServices: CS_CONFIG
} )
.then( editor => {
window.editor = editor;
} )
.catch( err => {
console.error( err.stack );
} );
8 changes: 8 additions & 0 deletions docs/_snippets/features/toolbar-wrapping.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<div id="toolbar-wrapping">

<h2>The space stations</h2>
<p>The Soviet <em>Salyut</em> space station line was, in fact, two different programs. One was a military <em>Almaz</em> programme with <em>OPS</em> station design, and the other was civilian <em>Salyut</em> with their <em>DOS</em> design. The <em>DOS</em> was, in fact, the hull of an <em>OPS</em> outfitted with additional hardware. The original <em>OPS</em> was designed in the mid-1960&rsquo;s by the <em>OKB-52</em> secret facility lead by Chelomei. As they struggled with funding and fell behind schedule, the original design was &ldquo;borrowed&rdquo; by engineers from <em>OKB-1</em>, lead by Korolev.</p>

<p>His people used Chelomei&rsquo;s main hull and outfitted it with the engines, solar panels, and docking and transfer systems from their own space craft, <em>Soyuz</em> (which was, primarily, developed to fly to the Moon; once it never did, it flew to low Earth orbit in 1967 and still does so, ferrying astronauts and cosmonauts to the <em>ISS</em> in 2021!). Korolev&rsquo;s people used somebody else&rsquo;s experience, but did their own work, and in 1971 for the first time in history they put a space base in orbit. And manned it. And it was a success.</p>

</div>
67 changes: 67 additions & 0 deletions docs/_snippets/features/toolbar-wrapping.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
/**
* @license Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/

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

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

ClassicEditor
.create( document.querySelector( '#toolbar-wrapping' ), {
toolbar: {
items: [
'heading', '|',
'fontfamily', 'fontsize', '|',
'alignment', '|',
'fontColor', 'fontBackgroundColor', '|',
'bold', 'italic', 'strikethrough', 'underline', 'subscript', 'superscript', '|',
'link', '|',
'outdent', 'indent', '|',
'bulletedList', 'numberedList', 'todoList', '|',
'code', 'codeBlock', '|',
'insertTable', '|',
'imageUpload', 'blockQuote', '|',
'undo', 'redo'
],
shouldNotGroupWhenFull: true,
viewportTopOffset: window.getViewportTopOffsetConfig()
},
image: {
toolbar: [ 'imageStyle:full', 'imageStyle:side', '|', 'imageTextAlternative' ]
},
codeBlock: {
languages: [
{ language: 'css', label: 'CSS' },
{ language: 'html', label: 'HTML' },
{ language: 'javascript', label: 'JavaScript' },
{ language: 'php', label: 'PHP' }
]
},
fontFamily: {
supportAllValues: true
},
fontSize: {
options: [ 9, 10, 11, 12, 'default', 14, 15 ],
supportAllValues: true
},
heading: {
options: [
{ model: 'paragraph', title: 'Paragraph', class: 'ck-heading_paragraph' },
{ model: 'heading1', view: 'h2', title: 'Heading 1', class: 'ck-heading_heading1' },
{ model: 'heading2', view: 'h3', title: 'Heading 2', class: 'ck-heading_heading2' },
{ model: 'heading3', view: 'h4', title: 'Heading 3', class: 'ck-heading_heading3' },
{ model: 'heading4', view: 'h5', title: 'Heading 4', class: 'ck-heading_heading4' }
]
},
table: {
contentToolbar: [ 'tableColumn', 'tableRow', 'mergeTableCells', 'tableProperties', 'tableCellProperties' ]
},
cloudServices: CS_CONFIG
} )
.then( editor => {
window.editor = editor;
} )
.catch( err => {
console.error( err.stack );
} );
1 change: 1 addition & 0 deletions docs/_snippets/features/wproofreader.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ ClassicEditor
plugins: [ ArticlePluginSet, EasyImage, WProofreader ],
wproofreader: {
serviceId: '1:Eebp63-lWHbt2-ASpHy4-AYUpy2-fo3mk4-sKrza1-NsuXy4-I1XZC2-0u2F54-aqYWd1-l3Qf14-umd',
lang: 'en_AI',
srcUrl: 'https://svc.webspellchecker.net/spellcheck31/wscbundle/wscbundle.js'
},
cloudServices: CS_CONFIG,
Expand Down
Loading

0 comments on commit a38fa9b

Please sign in to comment.