This repository has been archived by the owner on Jun 26, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature: Introduced the editor with a balloon toolbar build.
- Loading branch information
0 parents
commit 82fe8d5
Showing
25 changed files
with
707 additions
and
0 deletions.
There are no files selected for viewing
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,12 @@ | ||
# Configurations to normalize the IDE behavior. | ||
# http://editorconfig.org/ | ||
|
||
root = true | ||
|
||
[*] | ||
indent_style = tab | ||
tab_width = 4 | ||
charset = utf-8 | ||
end_of_line = lf | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true |
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,18 @@ | ||
* text=auto | ||
|
||
*.htaccess eol=lf | ||
*.cgi eol=lf | ||
*.sh eol=lf | ||
|
||
*.css text | ||
*.htm text | ||
*.html text | ||
*.js text | ||
*.json text | ||
*.php text | ||
*.txt text | ||
*.md text | ||
|
||
*.png -text | ||
*.gif -text | ||
*.jpg -text |
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,9 @@ | ||
### Suggested merge commit message ([convention](https://github.com/ckeditor/ckeditor5-design/wiki/Git-commit-message-convention)) | ||
|
||
Type: Message. Closes #000. | ||
|
||
--- | ||
|
||
### Additional information | ||
|
||
*For example – encountered issues, assumptions you had to make, other affected tickets, etc.* |
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,5 @@ | ||
# These files will be ignored by Git and by our linting tools: | ||
# gulp lint | ||
# gulp lint-staged | ||
|
||
node_modules/ |
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,2 @@ | ||
tests/** | ||
sample/** |
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 @@ | ||
Contributing | ||
======================================== | ||
|
||
Information about contributing can be found on the following page: <https://github.com/ckeditor/ckeditor5/blob/master/CONTRIBUTING.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,23 @@ | ||
Software License Agreement | ||
========================== | ||
|
||
**CKEditor 5 editor with a balloon toolbar build** – https://github.com/ckeditor/ckeditor5-build-balloon-toolbar <br> | ||
Copyright (c) 2003-2017, [CKSource](http://cksource.com) Frederico Knabben. All rights reserved. | ||
|
||
Licensed under the terms of any of the following licenses at your choice: | ||
|
||
* [GNU General Public License Version 2 or later (the "GPL")](http://www.gnu.org/licenses/gpl.html) | ||
* [GNU Lesser General Public License Version 2.1 or later (the "LGPL")](http://www.gnu.org/licenses/lgpl.html) | ||
* [Mozilla Public License Version 1.1 or later (the "MPL")](http://www.mozilla.org/MPL/MPL-1.1.html) | ||
|
||
You are not required to, but if you want to explicitly declare the license you have chosen to be bound to when using, reproducing, modifying and distributing this software, just include a text file titled "legal.txt" in your version of this software, indicating your license choice. In any case, your choice will not restrict any recipient of your version of this software to use, reproduce, modify and distribute this software under any of the above licenses. | ||
|
||
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](http://cksource.com) Frederico Knabben. 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,69 @@ | ||
CKEditor 5 editor with a balloon toolbar build | ||
============================================== | ||
|
||
[![Join the chat at https://gitter.im/ckeditor/ckeditor5](https://badges.gitter.im/ckeditor/ckeditor5.svg)](https://gitter.im/ckeditor/ckeditor5?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) | ||
[![npm version](https://badge.fury.io/js/%40ckeditor%2Fckeditor5-build-balloon-toolbar.svg)](https://www.npmjs.com/package/@ckeditor/ckeditor5-build-balloon-toolbar) | ||
[![Dependency Status](https://david-dm.org/ckeditor/ckeditor5-build-balloon-toolbar/status.svg)](https://david-dm.org/ckeditor/ckeditor5-build-balloon-toolbar) | ||
[![devDependency Status](https://david-dm.org/ckeditor/ckeditor5-build-balloon-toolbar/dev-status.svg)](https://david-dm.org/ckeditor/ckeditor5-build-balloon-toolbar?type=dev) | ||
|
||
The editor with a balloon toolbar build. Read more in the [classic editor](https://ckeditor5.github.io/docs/nightly/ckeditor5/latest/builds/guides/overview.html#Classic-editor) and see the [demo](https://ckeditor5.github.io/docs/nightly/ckeditor5/latest/examples/builds/classic-editor.html). | ||
|
||
## Documentation | ||
|
||
See: | ||
|
||
* [Installation](https://ckeditor5.github.io/docs/nightly/ckeditor5/latest/builds/guides/integration/installation.html) for how to install this package and what it contains. | ||
* [Basic API](https://ckeditor5.github.io/docs/nightly/ckeditor5/latest/builds/guides/integration/basic-api.html) for how to create an editor and interact with it. | ||
* [Configuration](https://ckeditor5.github.io/docs/nightly/ckeditor5/latest/builds/guides/integration/configuration.html) for how to configure the editor. | ||
* [Creating custom builds](https://ckeditor5.github.io/docs/nightly/ckeditor5/latest/builds/guides/development/custom-builds.html) for how to customize the build (configure and rebuild the editor bundle). | ||
|
||
## Quick start | ||
|
||
First, install the build from npm: | ||
|
||
``` | ||
npm install --save @ckeditor/ckeditor5-build-balloon-toolbar | ||
``` | ||
|
||
And use it in your website: | ||
|
||
```html | ||
<div id="editor"> | ||
<p>This is the editor content.</p> | ||
</div> | ||
<script src="./node_modules/@ckeditor/ckeditor5-build-balloon-toolbar/build/ckeditor.js"></script> | ||
<script> | ||
BalloonToolbarEditor | ||
.create( document.querySelector( '#editor' ) ) | ||
.then( editor => { | ||
window.editor = editor; | ||
} ) | ||
.catch( err => { | ||
console.error( err.stack ); | ||
} ); | ||
</script> | ||
``` | ||
|
||
Or in your JavaScript application: | ||
|
||
```js | ||
import { BalloonToolbarEditor } from '@ckeditor/ckeditor5-build-balloon-toolbar/build/ckeditor'; | ||
|
||
// Or using CommonJS verion: | ||
// const BalloonToolbarEditor = require( '@ckeditor/ckeditor5-build-balloon-toolbar/build/ckeditor' ).BalloonToolbarEditor; | ||
|
||
BalloonToolbarEditor | ||
.create( document.querySelector( '#editor' ) ) | ||
.then( editor => { | ||
window.editor = editor; | ||
} ) | ||
.catch( err => { | ||
console.error( err.stack ); | ||
} ); | ||
``` | ||
|
||
**Note:** If you are planning to integrate CKEditor 5 deep into your application it is actually more convenient and recommended to install and import the source modules directly (like it happens in `ckeditor.js`). Read more in the [Bundling guide](https://ckeditor5.github.io/docs/nightly/ckeditor5/latest/builds/guides/integration/bundling.html). | ||
|
||
## License | ||
|
||
Licensed under the GPL, LGPL and MPL licenses, at your choice. For full details about the license, please check the `LICENSE.md` file. |
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,9 @@ | ||
#!/usr/bin/env bash | ||
|
||
echo "Building 'build/ckeditor.js'..." | ||
echo "" | ||
|
||
webpack | ||
|
||
echo "" | ||
echo "Done." |
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 @@ | ||
#!/usr/bin/env node | ||
|
||
/** | ||
* @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. | ||
* For licensing, see LICENSE.md. | ||
*/ | ||
|
||
'use strict'; | ||
|
||
const { bundler } = require( '@ckeditor/ckeditor5-dev-utils' ); | ||
const buildConfig = require( '../build-config' ); | ||
|
||
console.log( 'Creating the entry file...' ); | ||
|
||
bundler.createEntryFile( 'ckeditor.js', buildConfig ); | ||
|
||
console.log( 'Done.' ); |
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,54 @@ | ||
/** | ||
* @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. | ||
* For licensing, see LICENSE.md. | ||
*/ | ||
|
||
'use strict'; | ||
|
||
module.exports = { | ||
// The editor creator to use. | ||
editor: '@ckeditor/ckeditor5-editor-balloon-toolbar/src/balloontoolbareditor', | ||
|
||
// The name under which the editor will be exported. | ||
moduleName: 'BalloonToolbarEditor', | ||
|
||
// Plugins to include in the build. | ||
plugins: [ | ||
'@ckeditor/ckeditor5-presets/src/essentials', | ||
|
||
'@ckeditor/ckeditor5-autoformat/src/autoformat', | ||
'@ckeditor/ckeditor5-basic-styles/src/bold', | ||
'@ckeditor/ckeditor5-basic-styles/src/italic', | ||
'@ckeditor/ckeditor5-block-quote/src/blockquote', | ||
'@ckeditor/ckeditor5-heading/src/heading', | ||
'@ckeditor/ckeditor5-image/src/image', | ||
'@ckeditor/ckeditor5-image/src/imagecaption', | ||
'@ckeditor/ckeditor5-image/src/imagestyle', | ||
'@ckeditor/ckeditor5-image/src/imagetoolbar', | ||
'@ckeditor/ckeditor5-link/src/link', | ||
'@ckeditor/ckeditor5-list/src/list', | ||
'@ckeditor/ckeditor5-paragraph/src/paragraph', | ||
], | ||
|
||
// UI language. Language codes follow the https://en.wikipedia.org/wiki/ISO_639-1 format. | ||
language: 'en', | ||
|
||
// Editor config. | ||
config: { | ||
toolbar: [ | ||
'headings', | ||
'bold', | ||
'italic', | ||
'link', | ||
'bulletedList', | ||
'numberedList', | ||
'blockQuote', | ||
'undo', | ||
'redo' | ||
], | ||
|
||
image: { | ||
toolbar: [ 'imageStyleFull', 'imageStyleSide', '|', 'imageTextAlternative' ] | ||
} | ||
} | ||
}; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
/** | ||
* @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. | ||
* For licensing, see LICENSE.md. | ||
*/ | ||
|
||
import BalloonToolbarEditorBase from '@ckeditor/ckeditor5-editor-balloon-toolbar/src/balloontoolbareditor'; | ||
import EssentialsPlugin from '@ckeditor/ckeditor5-presets/src/essentials'; | ||
import AutoformatPlugin from '@ckeditor/ckeditor5-autoformat/src/autoformat'; | ||
import BoldPlugin from '@ckeditor/ckeditor5-basic-styles/src/bold'; | ||
import ItalicPlugin from '@ckeditor/ckeditor5-basic-styles/src/italic'; | ||
import BlockquotePlugin from '@ckeditor/ckeditor5-block-quote/src/blockquote'; | ||
import HeadingPlugin from '@ckeditor/ckeditor5-heading/src/heading'; | ||
import ImagePlugin from '@ckeditor/ckeditor5-image/src/image'; | ||
import ImagecaptionPlugin from '@ckeditor/ckeditor5-image/src/imagecaption'; | ||
import ImagestylePlugin from '@ckeditor/ckeditor5-image/src/imagestyle'; | ||
import ImagetoolbarPlugin from '@ckeditor/ckeditor5-image/src/imagetoolbar'; | ||
import LinkPlugin from '@ckeditor/ckeditor5-link/src/link'; | ||
import ListPlugin from '@ckeditor/ckeditor5-list/src/list'; | ||
import ParagraphPlugin from '@ckeditor/ckeditor5-paragraph/src/paragraph'; | ||
|
||
export class BalloonToolbarEditor extends BalloonToolbarEditorBase {} | ||
|
||
BalloonToolbarEditor.build = { | ||
plugins: [ | ||
EssentialsPlugin, | ||
AutoformatPlugin, | ||
BoldPlugin, | ||
ItalicPlugin, | ||
BlockquotePlugin, | ||
HeadingPlugin, | ||
ImagePlugin, | ||
ImagecaptionPlugin, | ||
ImagestylePlugin, | ||
ImagetoolbarPlugin, | ||
LinkPlugin, | ||
ListPlugin, | ||
ParagraphPlugin | ||
], | ||
config: { | ||
toolbar: [ | ||
'headings', | ||
'bold', | ||
'italic', | ||
'link', | ||
'bulletedList', | ||
'numberedList', | ||
'blockQuote', | ||
'undo', | ||
'redo' | ||
], | ||
image: { | ||
toolbar: [ | ||
'imageStyleFull', | ||
'imageStyleSide', | ||
'|', | ||
'imageTextAlternative' | ||
] | ||
} | ||
} | ||
}; |
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,52 @@ | ||
{ | ||
"name": "@ckeditor/ckeditor5-build-balloon-toolbar", | ||
"version": "0.0.1", | ||
"description": "CKEditor 5 editor with a balloon toolbar build.", | ||
"keywords": [ | ||
"ckeditor5-build", | ||
"text editor", | ||
"WYSIWYG", | ||
"rich-text editor" | ||
], | ||
"main": "./build/ckeditor.js", | ||
"dependencies": { | ||
"@ckeditor/ckeditor5-editor-balloon-toolbar": "*", | ||
"@ckeditor/ckeditor5-presets": "^0.2.2", | ||
"@ckeditor/ckeditor5-autoformat": "^0.5.1", | ||
"@ckeditor/ckeditor5-basic-styles": "^0.8.1", | ||
"@ckeditor/ckeditor5-block-quote": "^0.1.1", | ||
"@ckeditor/ckeditor5-heading": "^0.9.1", | ||
"@ckeditor/ckeditor5-image": "^0.6.0", | ||
"@ckeditor/ckeditor5-link": "^0.7.0", | ||
"@ckeditor/ckeditor5-list": "^0.6.1", | ||
"@ckeditor/ckeditor5-paragraph": "^0.8.0" | ||
}, | ||
"devDependencies": { | ||
"@ckeditor/ckeditor5-dev-utils": "^3.0.0", | ||
"@ckeditor/ckeditor5-dev-webpack-plugin": "^2.0.11", | ||
"babel-minify-webpack-plugin": "^0.2.0", | ||
"css-loader": "^0.28.5", | ||
"node-sass": "^4.5.3", | ||
"raw-loader": "^0.5.1", | ||
"sass-loader": "^6.0.6", | ||
"style-loader": "^0.18.2", | ||
"webpack": "^3.5.5" | ||
}, | ||
"engines": { | ||
"node": ">=6.0.0", | ||
"npm": ">=3.0.0" | ||
}, | ||
"author": "CKSource (http://cksource.com/)", | ||
"license": "(GPL-2.0 OR LGPL-2.1 OR MPL-1.1)", | ||
"homepage": "https://ckeditor5.github.io", | ||
"bugs": "https://github.com/ckeditor/ckeditor5-build-balloon-toolbar/issues", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/ckeditor/ckeditor5-build-balloon-toolbar.git" | ||
}, | ||
"scripts": { | ||
"build": "npm run create-entry-file && npm run build-ckeditor", | ||
"create-entry-file": "./bin/create-entry-file.js", | ||
"build-ckeditor": "./bin/build-ckeditor.sh" | ||
} | ||
} |
Oops, something went wrong.