Skip to content

Commit

Permalink
Moved CKBox package to public repository.
Browse files Browse the repository at this point in the history
  • Loading branch information
psmyrek committed Jun 20, 2022
1 parent 78264ff commit e71f31d
Show file tree
Hide file tree
Showing 48 changed files with 6,734 additions and 4 deletions.
1 change: 1 addition & 0 deletions packages/ckeditor5-build-balloon-block/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"@ckeditor/ckeditor5-autoformat": "^34.1.0",
"@ckeditor/ckeditor5-basic-styles": "^34.1.0",
"@ckeditor/ckeditor5-block-quote": "^34.1.0",
"@ckeditor/ckeditor5-ckbox": "^0.0.1",
"@ckeditor/ckeditor5-ckfinder": "^34.1.0",
"@ckeditor/ckeditor5-cloud-services": "^34.1.0",
"@ckeditor/ckeditor5-easy-image": "^34.1.0",
Expand Down
4 changes: 4 additions & 0 deletions packages/ckeditor5-build-balloon-block/src/ckeditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import BlockToolbar from '@ckeditor/ckeditor5-ui/src/toolbar/block/blocktoolbar'
import Bold from '@ckeditor/ckeditor5-basic-styles/src/bold';
import Italic from '@ckeditor/ckeditor5-basic-styles/src/italic';
import BlockQuote from '@ckeditor/ckeditor5-block-quote/src/blockquote';
import CKBox from '@ckeditor/ckeditor5-ckbox/src/ckbox';
import CKFinder from '@ckeditor/ckeditor5-ckfinder/src/ckfinder';
import EasyImage from '@ckeditor/ckeditor5-easy-image/src/easyimage';
import Heading from '@ckeditor/ckeditor5-heading/src/heading';
Expand All @@ -27,6 +28,7 @@ import List from '@ckeditor/ckeditor5-list/src/list';
import MediaEmbed from '@ckeditor/ckeditor5-media-embed/src/mediaembed';
import Paragraph from '@ckeditor/ckeditor5-paragraph/src/paragraph';
import PasteFromOffice from '@ckeditor/ckeditor5-paste-from-office/src/pastefromoffice';
import PictureEditing from '@ckeditor/ckeditor5-image/src/pictureediting';
import Table from '@ckeditor/ckeditor5-table/src/table';
import TableToolbar from '@ckeditor/ckeditor5-table/src/tabletoolbar';
import TextTransformation from '@ckeditor/ckeditor5-typing/src/texttransformation';
Expand All @@ -45,6 +47,7 @@ BalloonEditor.builtinPlugins = [
Bold,
Italic,
BlockQuote,
CKBox,
CKFinder,
CloudServices,
EasyImage,
Expand All @@ -60,6 +63,7 @@ BalloonEditor.builtinPlugins = [
MediaEmbed,
Paragraph,
PasteFromOffice,
PictureEditing,
Table,
TableToolbar,
TextTransformation
Expand Down
1 change: 1 addition & 0 deletions packages/ckeditor5-build-balloon/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"@ckeditor/ckeditor5-autoformat": "^34.1.0",
"@ckeditor/ckeditor5-basic-styles": "^34.1.0",
"@ckeditor/ckeditor5-block-quote": "^34.1.0",
"@ckeditor/ckeditor5-ckbox": "^0.0.1",
"@ckeditor/ckeditor5-ckfinder": "^34.1.0",
"@ckeditor/ckeditor5-cloud-services": "^34.1.0",
"@ckeditor/ckeditor5-easy-image": "^34.1.0",
Expand Down
4 changes: 4 additions & 0 deletions packages/ckeditor5-build-balloon/src/ckeditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import Autoformat from '@ckeditor/ckeditor5-autoformat/src/autoformat';
import Bold from '@ckeditor/ckeditor5-basic-styles/src/bold';
import Italic from '@ckeditor/ckeditor5-basic-styles/src/italic';
import BlockQuote from '@ckeditor/ckeditor5-block-quote/src/blockquote';
import CKBox from '@ckeditor/ckeditor5-ckbox/src/ckbox';
import CKFinder from '@ckeditor/ckeditor5-ckfinder/src/ckfinder';
import EasyImage from '@ckeditor/ckeditor5-easy-image/src/easyimage';
import Heading from '@ckeditor/ckeditor5-heading/src/heading';
Expand All @@ -26,6 +27,7 @@ import List from '@ckeditor/ckeditor5-list/src/list';
import MediaEmbed from '@ckeditor/ckeditor5-media-embed/src/mediaembed';
import Paragraph from '@ckeditor/ckeditor5-paragraph/src/paragraph';
import PasteFromOffice from '@ckeditor/ckeditor5-paste-from-office/src/pastefromoffice';
import PictureEditing from '@ckeditor/ckeditor5-image/src/pictureediting';
import Table from '@ckeditor/ckeditor5-table/src/table';
import TableToolbar from '@ckeditor/ckeditor5-table/src/tabletoolbar';
import TextTransformation from '@ckeditor/ckeditor5-typing/src/texttransformation';
Expand All @@ -41,6 +43,7 @@ BalloonEditor.builtinPlugins = [
Bold,
Italic,
BlockQuote,
CKBox,
CKFinder,
CloudServices,
EasyImage,
Expand All @@ -56,6 +59,7 @@ BalloonEditor.builtinPlugins = [
MediaEmbed,
Paragraph,
PasteFromOffice,
PictureEditing,
Table,
TableToolbar,
TextTransformation
Expand Down
1 change: 1 addition & 0 deletions packages/ckeditor5-build-classic/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"@ckeditor/ckeditor5-autoformat": "^34.1.0",
"@ckeditor/ckeditor5-basic-styles": "^34.1.0",
"@ckeditor/ckeditor5-block-quote": "^34.1.0",
"@ckeditor/ckeditor5-ckbox": "^0.0.1",
"@ckeditor/ckeditor5-ckfinder": "^34.1.0",
"@ckeditor/ckeditor5-cloud-services": "^34.1.0",
"@ckeditor/ckeditor5-easy-image": "^34.1.0",
Expand Down
4 changes: 4 additions & 0 deletions packages/ckeditor5-build-classic/src/ckeditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import Autoformat from '@ckeditor/ckeditor5-autoformat/src/autoformat';
import Bold from '@ckeditor/ckeditor5-basic-styles/src/bold';
import Italic from '@ckeditor/ckeditor5-basic-styles/src/italic';
import BlockQuote from '@ckeditor/ckeditor5-block-quote/src/blockquote';
import CKBox from '@ckeditor/ckeditor5-ckbox/src/ckbox';
import CKFinder from '@ckeditor/ckeditor5-ckfinder/src/ckfinder';
import EasyImage from '@ckeditor/ckeditor5-easy-image/src/easyimage';
import Heading from '@ckeditor/ckeditor5-heading/src/heading';
Expand All @@ -26,6 +27,7 @@ import List from '@ckeditor/ckeditor5-list/src/list';
import MediaEmbed from '@ckeditor/ckeditor5-media-embed/src/mediaembed';
import Paragraph from '@ckeditor/ckeditor5-paragraph/src/paragraph';
import PasteFromOffice from '@ckeditor/ckeditor5-paste-from-office/src/pastefromoffice';
import PictureEditing from '@ckeditor/ckeditor5-image/src/pictureediting';
import Table from '@ckeditor/ckeditor5-table/src/table';
import TableToolbar from '@ckeditor/ckeditor5-table/src/tabletoolbar';
import TextTransformation from '@ckeditor/ckeditor5-typing/src/texttransformation';
Expand All @@ -41,6 +43,7 @@ ClassicEditor.builtinPlugins = [
Bold,
Italic,
BlockQuote,
CKBox,
CKFinder,
CloudServices,
EasyImage,
Expand All @@ -56,6 +59,7 @@ ClassicEditor.builtinPlugins = [
MediaEmbed,
Paragraph,
PasteFromOffice,
PictureEditing,
Table,
TableToolbar,
TextTransformation
Expand Down
1 change: 1 addition & 0 deletions packages/ckeditor5-build-decoupled-document/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"@ckeditor/ckeditor5-autoformat": "^34.1.0",
"@ckeditor/ckeditor5-basic-styles": "^34.1.0",
"@ckeditor/ckeditor5-block-quote": "^34.1.0",
"@ckeditor/ckeditor5-ckbox": "^0.0.1",
"@ckeditor/ckeditor5-ckfinder": "^34.1.0",
"@ckeditor/ckeditor5-cloud-services": "^34.1.0",
"@ckeditor/ckeditor5-easy-image": "^34.1.0",
Expand Down
4 changes: 4 additions & 0 deletions packages/ckeditor5-build-decoupled-document/src/ckeditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import Italic from '@ckeditor/ckeditor5-basic-styles/src/italic';
import Strikethrough from '@ckeditor/ckeditor5-basic-styles/src/strikethrough';
import Underline from '@ckeditor/ckeditor5-basic-styles/src/underline';
import BlockQuote from '@ckeditor/ckeditor5-block-quote/src/blockquote';
import CKBox from '@ckeditor/ckeditor5-ckbox/src/ckbox';
import CKFinder from '@ckeditor/ckeditor5-ckfinder/src/ckfinder';
import EasyImage from '@ckeditor/ckeditor5-easy-image/src/easyimage';
import Heading from '@ckeditor/ckeditor5-heading/src/heading';
Expand All @@ -36,6 +37,7 @@ import ListProperties from '@ckeditor/ckeditor5-list/src/listproperties';
import MediaEmbed from '@ckeditor/ckeditor5-media-embed/src/mediaembed';
import Paragraph from '@ckeditor/ckeditor5-paragraph/src/paragraph';
import PasteFromOffice from '@ckeditor/ckeditor5-paste-from-office/src/pastefromoffice';
import PictureEditing from '@ckeditor/ckeditor5-image/src/pictureediting';
import Table from '@ckeditor/ckeditor5-table/src/table';
import TableToolbar from '@ckeditor/ckeditor5-table/src/tabletoolbar';
import TextTransformation from '@ckeditor/ckeditor5-typing/src/texttransformation';
Expand All @@ -58,6 +60,7 @@ DecoupledEditor.builtinPlugins = [
Strikethrough,
Underline,
BlockQuote,
CKBox,
CKFinder,
CloudServices,
EasyImage,
Expand All @@ -76,6 +79,7 @@ DecoupledEditor.builtinPlugins = [
MediaEmbed,
Paragraph,
PasteFromOffice,
PictureEditing,
Table,
TableToolbar,
TextTransformation
Expand Down
1 change: 1 addition & 0 deletions packages/ckeditor5-build-inline/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"@ckeditor/ckeditor5-autoformat": "^34.1.0",
"@ckeditor/ckeditor5-basic-styles": "^34.1.0",
"@ckeditor/ckeditor5-block-quote": "^34.1.0",
"@ckeditor/ckeditor5-ckbox": "^0.0.1",
"@ckeditor/ckeditor5-ckfinder": "^34.1.0",
"@ckeditor/ckeditor5-cloud-services": "^34.1.0",
"@ckeditor/ckeditor5-easy-image": "^34.1.0",
Expand Down
4 changes: 4 additions & 0 deletions packages/ckeditor5-build-inline/src/ckeditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import Autoformat from '@ckeditor/ckeditor5-autoformat/src/autoformat';
import Bold from '@ckeditor/ckeditor5-basic-styles/src/bold';
import Italic from '@ckeditor/ckeditor5-basic-styles/src/italic';
import BlockQuote from '@ckeditor/ckeditor5-block-quote/src/blockquote';
import CKBox from '@ckeditor/ckeditor5-ckbox/src/ckbox';
import CKFinder from '@ckeditor/ckeditor5-ckfinder/src/ckfinder';
import EasyImage from '@ckeditor/ckeditor5-easy-image/src/easyimage';
import Heading from '@ckeditor/ckeditor5-heading/src/heading';
Expand All @@ -26,6 +27,7 @@ import List from '@ckeditor/ckeditor5-list/src/list';
import MediaEmbed from '@ckeditor/ckeditor5-media-embed/src/mediaembed';
import Paragraph from '@ckeditor/ckeditor5-paragraph/src/paragraph';
import PasteFromOffice from '@ckeditor/ckeditor5-paste-from-office/src/pastefromoffice';
import PictureEditing from '@ckeditor/ckeditor5-image/src/pictureediting';
import Table from '@ckeditor/ckeditor5-table/src/table';
import TableToolbar from '@ckeditor/ckeditor5-table/src/tabletoolbar';
import TextTransformation from '@ckeditor/ckeditor5-typing/src/texttransformation';
Expand All @@ -41,6 +43,7 @@ InlineEditor.builtinPlugins = [
Bold,
Italic,
BlockQuote,
CKBox,
CKFinder,
CloudServices,
EasyImage,
Expand All @@ -56,6 +59,7 @@ InlineEditor.builtinPlugins = [
MediaEmbed,
Paragraph,
PasteFromOffice,
PictureEditing,
Table,
TableToolbar,
TextTransformation
Expand Down
4 changes: 4 additions & 0 deletions packages/ckeditor5-ckbox/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Changelog
=========

All changes in the package are documented in the main repository. See: https://github.com/ckeditor/ckeditor5/blob/master/CHANGELOG.md.
17 changes: 17 additions & 0 deletions packages/ckeditor5-ckbox/LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
Software License Agreement
==========================

**CKEditor 5 CKBox feature**https://github.com/ckeditor/ckeditor5-ckbox <br>
Copyright (c) 2003-2022, [CKSource Holding sp. z o.o.](http://cksource.com) All rights reserved.

Licensed under the terms of [GNU General Public License Version 2 or later](http://www.gnu.org/licenses/gpl.html).

Sources of Intellectual Property Included in CKEditor
-----------------------------------------------------

Where not otherwise indicated, all CKEditor content is authored by CKSource engineers and consists of CKSource-owned intellectual property. In some specific instances, CKEditor will incorporate work done by developers outside of CKSource with their express permission.

Trademarks
----------

**CKEditor** is a trademark of [CKSource Holding sp. z o.o.](http://cksource.com) All other brand and product names are trademarks, registered trademarks or service marks of their respective holders.
19 changes: 19 additions & 0 deletions packages/ckeditor5-ckbox/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
CKEditor 5 CKBox integration
=========================================

[![npm version](https://badge.fury.io/js/%40ckeditor%2Fckeditor5-ckbox.svg)](https://www.npmjs.com/package/@ckeditor/ckeditor5-ckbox)
[![Coverage Status](https://coveralls.io/repos/github/ckeditor/ckeditor5/badge.svg?branch=master)](https://coveralls.io/github/ckeditor/ckeditor5?branch=master)
[![Build Status](https://travis-ci.com/ckeditor/ckeditor5.svg?branch=master)](https://app.travis-ci.com/github/ckeditor/ckeditor5)
![Dependency Status](https://img.shields.io/librariesio/release/npm/@ckeditor/ckeditor5-ckbox)

This package implements the [CKBox feature](https://ckeditor.com/docs/ckeditor5/latest/features/ckbox.html). This feature allows you to easily insert images as well as links to files into the editor content. It is a bridge between CKEditor 5 WYSIWYG editor and CKBox file manager and uploader.

## Documentation

See the [CKBox integration guide](https://ckeditor.com/docs/ckeditor5/latest/features/ckbox.html) and the [plugin documentation](https://ckeditor.com/docs/ckeditor5/latest/api/ckbox.html) to learn more about the integration.

Check out the [comprehensive Image upload guide](https://ckeditor.com/docs/ckeditor5/latest/features/image-upload.html) to learn about other ways to upload images into CKEditor 5.

## License

Licensed under the terms of [GNU General Public License Version 2 or later](http://www.gnu.org/licenses/gpl.html). For full details about the license, please check the `LICENSE.md` file or [https://ckeditor.com/legal/ckeditor-oss-license](https://ckeditor.com/legal/ckeditor-oss-license).
38 changes: 38 additions & 0 deletions packages/ckeditor5-ckbox/ckeditor5-metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"plugins": [
{
"name": "CKBox",
"className": "CKBox",
"description": "Allows inserting images as well as links to files into the rich-text editor content.",
"docs": "features/images/image-upload/ckbox.html",
"path": "src/ckbox.js",
"requires": [
"CloudServices",
"Link",
"Image",
"ImageUpload",
"PictureEditing"
],
"uiComponents": [
{
"name": "ckbox",
"type": "Button",
"iconPath": "theme/icons/browse-files.svg"
}
],
"htmlOutput": [
{
"elements": [
"a",
"figure",
"img"
],
"attributes": [
"data-ckbox-resource-id"
],
"_comment": "If `config.ckbox.ignoreDataId` is set to false (off), the asset ID as the `data-ckbox-resource-id` attribute is added on the inserted elements (by default)."
}
]
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<script src="https://cdn.ckbox.io/CKBox/0.0.2-dev.3/ckbox.js"></script>
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/**
* @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. 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 LinkImageEditing from '@ckeditor/ckeditor5-link/src/linkimageediting';
import PictureEditing from '@ckeditor/ckeditor5-image/src/pictureediting';
import CKBox from '@ckeditor/ckeditor5-ckbox/src/ckbox';

ClassicEditor.builtinPlugins.push(
LinkImageEditing,
PictureEditing,
CKBox
);

window.ClassicEditor = ClassicEditor;
11 changes: 11 additions & 0 deletions packages/ckeditor5-ckbox/docs/_snippets/features/ckbox.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<div id="snippet-ckbox">
<h2>Steam locos are really useful!</h2>
<figure class="image image-style-side"><img src="%BASE_PATH%/assets/img/locos.jpg" alt="Steam locomotives waiting at a small freight station.">
<figcaption>Steam locomotives waiting at a small freight station.</figcaption>
</figure>
<p>A steam locomotive is one that uses a steam engine as the prime source of power to move and pull the cars.</p>
<p>Steam locomotives are very popular today and can be seen working on all continents (with the exception of Antarctica maybe, where the railway network is rather scarce). Being powerful and not requiring additional technical infrastructure like their younger siblings &mdash; the electric locomotives &mdash; steam engines are perfect for most types of tasks.</p>
<p>Steam engines can pull passenger trains, boxcars with goods, tank cars, platform wagons with wood logs... Should the conditions be tough and the load be too heavy for a single steam locomotive, that can be put together in a pair of engines. And sometimes you can even see three of four of them if the job is exceptionally demanding.</p>
<p>Most national and private railway companies nowadays own or lease a multitude of steam engines, ranging from small, nimble ones used for maneuvering on the station to the bulky, large ones for the cross-continental trail.</p>
<p>Steam engines also come in all shapes and all colors, making up a happy useful bunch.</p>
</div>
48 changes: 48 additions & 0 deletions packages/ckeditor5-ckbox/docs/_snippets/features/ckbox.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
/**
* @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/

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

import { TOKEN_URL } from '@ckeditor/ckeditor5-ckbox/tests/_utils/ckbox-config';

ClassicEditor
.create( document.querySelector( '#snippet-ckbox' ), {
toolbar: {
items: [
'heading',
'|',
'bold',
'italic',
'link',
'insertTable',
'|',
'undo',
'redo',
'|',
'ckbox'
]
},
ui: {
viewportOffset: {
top: window.getViewportTopOffsetConfig()
}
},
ckbox: {
tokenUrl: TOKEN_URL
}
} )
.then( editor => {
window.editor = editor;

window.attachTourBalloon( {
target: window.findToolbarItem( editor.ui.view.toolbar,
item => item.label && item.label === 'Open file manager' ),
text: 'Click to open the file manager.',
editor
} );
} )
.catch( err => {
console.error( err.stack );
} );
Loading

0 comments on commit e71f31d

Please sign in to comment.