Skip to content
This repository has been archived by the owner on Jun 26, 2020. It is now read-only.

Commit

Permalink
Merge pull request #285 from ckeditor/i/6445
Browse files Browse the repository at this point in the history
Docs: Added more buttons to the Table snippets toolbar. Closes ckeditor/ckeditor5#6445.
  • Loading branch information
AnnaTomanek authored Mar 25, 2020
2 parents 2f55c6a + 3c75814 commit 00e5d36
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 31 deletions.
35 changes: 31 additions & 4 deletions docs/_snippets/features/build-table-source.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,40 @@

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

import Table from '@ckeditor/ckeditor5-table/src/table';
import TableToolbar from '@ckeditor/ckeditor5-table/src/tabletoolbar';
import FontFamily from '@ckeditor/ckeditor5-font/src/fontfamily';
import FontSize from '@ckeditor/ckeditor5-font/src/fontsize';
import Alignment from '@ckeditor/ckeditor5-alignment/src/alignment';
import IndentBlock from '@ckeditor/ckeditor5-indent/src/indentblock';
import TableProperties from '@ckeditor/ckeditor5-table/src/tableproperties';
import TableCellProperties from '@ckeditor/ckeditor5-table/src/tablecellproperties';

ClassicEditor.builtinPlugins.push( Table );
ClassicEditor.builtinPlugins.push( TableToolbar );
import { CS_CONFIG } from '@ckeditor/ckeditor5-cloud-services/tests/_utils/cloud-services-config';

ClassicEditor.builtinPlugins.push( FontFamily, FontSize, Alignment, IndentBlock );
ClassicEditor.defaultConfig = {
cloudServices: CS_CONFIG,
toolbar: {
items: [
'insertTable',
'|',
'fontFamily', 'fontSize',
'|',
'bold', 'italic',
'|',
'alignment:left', 'alignment:center', 'alignment:right', 'alignment:justify',
'|',
'bulletedList', 'numberedList',
'|',
'indent', 'outdent',
'|',
'link', 'blockQuote',
'|',
'undo', 'redo'
],
viewportTopOffset: window.getViewportTopOffsetConfig()
},
indentBlock: { offset: 30, unit: 'px' }
};

window.ClassicEditor = ClassicEditor;
window.CKEditorPlugins = {
Expand Down
9 changes: 0 additions & 9 deletions docs/_snippets/features/table-styling-colors.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@

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

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

const customColorPalette = [
{
color: 'hsl(4, 90%, 58%)',
Expand Down Expand Up @@ -96,13 +94,6 @@ ClassicEditor
CKEditorPlugins.TableProperties,
CKEditorPlugins.TableCellProperties
],
cloudServices: CS_CONFIG,
toolbar: {
items: [
'insertTable', '|', 'heading', '|', 'bold', 'italic', '|', 'undo', 'redo'
],
viewportTopOffset: window.getViewportTopOffsetConfig()
},
table: {
contentToolbar: [ 'tableColumn', 'tableRow', 'mergeTableCells', 'tableProperties', 'tableCellProperties' ],
tableProperties: {
Expand Down
9 changes: 0 additions & 9 deletions docs/_snippets/features/table-styling.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@

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

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

const COLOR_PALETTE = [
{
color: 'hsl(0, 0%, 0%)',
Expand Down Expand Up @@ -97,13 +95,6 @@ ClassicEditor
CKEditorPlugins.TableProperties,
CKEditorPlugins.TableCellProperties
],
cloudServices: CS_CONFIG,
toolbar: {
items: [
'insertTable', '|', 'heading', '|', 'bold', 'italic', '|', 'undo', 'redo'
],
viewportTopOffset: window.getViewportTopOffsetConfig()
},
table: {
contentToolbar: [ 'tableColumn', 'tableRow', 'mergeTableCells', 'tableProperties', 'tableCellProperties' ],
tableProperties: {
Expand Down
9 changes: 0 additions & 9 deletions docs/_snippets/features/table.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,8 @@

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

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

ClassicEditor
.create( document.querySelector( '#snippet-table' ), {
cloudServices: CS_CONFIG,
toolbar: {
items: [
'insertTable', '|', 'heading', '|', 'bold', 'italic', '|', 'undo', 'redo'
],
viewportTopOffset: window.getViewportTopOffsetConfig()
},
table: {
contentToolbar: [ 'tableColumn', 'tableRow', 'mergeTableCells' ]
}
Expand Down

0 comments on commit 00e5d36

Please sign in to comment.