-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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 #11938 from ckeditor/ci/1645
Feature (ckbox): Added a new package (`@ckeditor/ckeditor5-ckbox`), which integrates the CKBox service with CKEditor 5.
- Loading branch information
Showing
58 changed files
with
6,752 additions
and
14 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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
Large diffs are not rendered by default.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
packages/ckeditor5-build-decoupled-document/build/ckeditor.js.map
Large diffs are not rendered by default.
Oops, something went wrong.
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
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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
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. |
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,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. |
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,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). |
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,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)." | ||
} | ||
] | ||
} | ||
] | ||
} |
1 change: 1 addition & 0 deletions
1
packages/ckeditor5-ckbox/docs/_snippets/features/build-ckbox-source.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 @@ | ||
<script src="https://cdn.ckbox.io/CKBox/0.0.2-dev.3/ckbox.js"></script> |
19 changes: 19 additions & 0 deletions
19
packages/ckeditor5-ckbox/docs/_snippets/features/build-ckbox-source.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,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
11
packages/ckeditor5-ckbox/docs/_snippets/features/ckbox.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,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 — the electric locomotives — 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> |
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-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 { SERVICE_ORIGIN, 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, | ||
serviceOrigin: SERVICE_ORIGIN | ||
} | ||
} ) | ||
.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 ); | ||
} ); |
Oops, something went wrong.