ckbox
TypeScript icon, indicating that this package has built-in type declarations

2.6.1 • Public • Published

CKBox

https://ckbox.io/

CKBox is a file management platform that makes working with your files easier while providing an outstanding user experience.

Quick start

Using a build served from the CDN is the simplest and fastest way of embedding CKBox in your application. Additionally, all the scripts served from the CDN are loaded faster, as they are hosted on multiple servers around the globe, shortening the response time.

To start using CKBox on your website, embed the following script element in the HTML code of the page:

<script src="https://cdn.ckbox.io/ckbox/2.6.1/ckbox.js"></script>

Quick implementation example:

<!doctype html>
<html>
	<head>
		<meta charset="UTF-8" />
		<script src="https://cdn.ckbox.io/ckbox/2.6.1/ckbox.js"></script>
	</head>
	<body>
		<div id="ckbox"></div>
		<script>
			// You must provide a valid token URL in order to use the application
			// After registering to CKBox, the fastest way to try out CKBox is to use the development token endpoint:
			// https://ckeditor.com/docs/ckbox/latest/guides/configuration/authentication.html#token-endpoint
			CKBox.mount(document.getElementById("ckbox"), {
				tokenUrl: "https://your.token.url",
			});
		</script>
	</body>
</html>

Integration with CKEditor 5

The code snippet below presents the simplest scenario for integration of CKEditor 5 with CKBox. To read more about the integration, please refer to the CKEditor 5 integration guide.

<!doctype html>
<html>
	<head>
		<meta charset="UTF-8" />
		<script src="https://cdn.ckbox.io/ckbox/2.6.1/ckbox.js"></script>
		<link
			rel="stylesheet"
			href="https://cdn.ckbox.io/ckbox/2.6.1/styles/themes/lark.css"
		/>
		<link rel="stylesheet" href="https://cdn.ckeditor.com/ckeditor5/42.0.0/ckeditor5.css" />
	</head>
	<body>
		<div id="editor"></div>

		<script type="importmap">
			{
				"imports": {
					"ckeditor5": "https://cdn.ckeditor.com/ckeditor5/42.0.0/ckeditor5.js",
					"ckeditor5/": "https://cdn.ckeditor.com/ckeditor5/42.0.0/"
				}
			}
		</script>

		<script type="module">
			import {
				ClassicEditor,
				CKBox,
				Bold,
				CloudServices,
				Essentials,
				Font,
				Image,
				ImageUploadEditing,
				ImageUploadProgress,
				Italic,
				LinkEditing,
				Paragraph,
				PictureEditing,
			} from "ckeditor5";

			ClassicEditor.create(document.querySelector("#editor"), {
				plugins: [
					ClassicEditor,
					CKBox,
					Bold,
					CloudServices,
					Essentials,
					Font,
					Image,
					ImageUploadEditing,
					ImageUploadProgress,
					Italic,
					LinkEditing,
					Paragraph,
					PictureEditing,
				],
				ckbox: {
					tokenUrl: "https://your.token.url",
					theme: "lark",
				},
				toolbar: [
					"ckbox",
					"|",
					"undo",
					"redo",
					"|",
					"bold",
					"italic",
					"|",
					"fontSize",
					"fontFamily",
					"fontColor",
					"fontBackgroundColor",
				],
			}).catch((error) => {
				console.error(error);
			});
		</script>
	</body>
</html>

For more advanced integration scenarios, please refer to the CKBox documentation.

Documentation

CKBox documentation includes information about:

  • Enabling CKBox in your application.
  • Integrating CKBox with CKEditor 5.
  • Configuring and customizing CKBox.

You will find ready to use code snippets and live examples there.

License

CKBox (https://ckeditor.com/ckbox/)

Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. CKBox is licensed under a commercial license and is protected by copyright law. For more details about available licensing options please contact us at sales@cksource.com.

Trademarks CKBox is a trademark of CKSource Holding sp. z o.o. All other brand and product names are trademarks, registered trademarks or service marks of their respective holders.

Package Sidebar

Install

npm i ckbox

Weekly Downloads

711

Version

2.6.1

License

SEE LICENSE IN LICENSE.md

Unpacked Size

2.14 MB

Total Files

50

Last publish

Collaborators

  • cksource