Jelajahi Sumber

Other: The editor name has been changed from `@ckeditor/ckeditor5-build-balloon-toolbar` to `@ckeditor/ckeditor5-build-balloon` (the class name has been changed to `BalloonEditor`). See ckeditor/ckeditor5#546 for more information.

BREAKING CHANGE: The editor name has been changed. See ckeditor/ckeditor5#546.
Piotrek Koszuliński 8 tahun lalu
induk
melakukan
5c7d66f9bd

+ 1 - 1
packages/ckeditor5-editor-balloon/CHANGELOG.md

@@ -5,4 +5,4 @@ Changelog
 
 ### Features
 
-* The first implementation of the balloon toolbar editor. Closes [#1](https://github.com/ckeditor/ckeditor5-editor-balloon-toolbar/issues/1). ([a4462ac](https://github.com/ckeditor/ckeditor5-editor-balloon-toolbar/commit/a4462ac))
+* The first implementation of the balloon editor. Closes [#1](https://github.com/ckeditor/ckeditor5-editor-balloon/issues/1). ([a4462ac](https://github.com/ckeditor/ckeditor5-editor-balloon/commit/a4462ac))

+ 1 - 1
packages/ckeditor5-editor-balloon/LICENSE.md

@@ -1,7 +1,7 @@
 Software License Agreement
 ==========================
 
-**Balloon Toolbar Editor** – https://github.com/ckeditor/ckeditor5-editor-balloon-toolbar <br>
+**Balloon Toolbar Editor** – https://github.com/ckeditor/ckeditor5-editor-balloon <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:

+ 7 - 7
packages/ckeditor5-editor-balloon/README.md

@@ -1,14 +1,14 @@
-CKEditor 5 balloon toolbar editor creator
+CKEditor 5 balloon editor creator
 =========================================
 
 [![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-editor-balloon-toolbar.svg)](https://www.npmjs.com/package/@ckeditor/ckeditor5-editor-balloon-toolbar)
-[![Build Status](https://travis-ci.org/ckeditor/ckeditor5-editor-balloon-toolbar.svg?branch=master)](https://travis-ci.org/ckeditor/ckeditor5-editor-balloon-toolbar)
-[![Test Coverage](https://codeclimate.com/github/ckeditor/ckeditor5-editor-balloon-toolbar/badges/coverage.svg)](https://codeclimate.com/github/ckeditor/ckeditor5-editor-balloon-toolbar/coverage)
-[![Dependency Status](https://david-dm.org/ckeditor/ckeditor5-editor-balloon-toolbar/status.svg)](https://david-dm.org/ckeditor/ckeditor5-editor-balloon-toolbar)
-[![devDependency Status](https://david-dm.org/ckeditor/ckeditor5-editor-balloon-toolbar/dev-status.svg)](https://david-dm.org/ckeditor/ckeditor5-editor-balloon-toolbar?type=dev)
+[![npm version](https://badge.fury.io/js/%40ckeditor%2Fckeditor5-editor-balloon.svg)](https://www.npmjs.com/package/@ckeditor/ckeditor5-editor-balloon)
+[![Build Status](https://travis-ci.org/ckeditor/ckeditor5-editor-balloon.svg?branch=master)](https://travis-ci.org/ckeditor/ckeditor5-editor-balloon)
+[![Test Coverage](https://codeclimate.com/github/ckeditor/ckeditor5-editor-balloon/badges/coverage.svg)](https://codeclimate.com/github/ckeditor/ckeditor5-editor-balloon/coverage)
+[![Dependency Status](https://david-dm.org/ckeditor/ckeditor5-editor-balloon/status.svg)](https://david-dm.org/ckeditor/ckeditor5-editor-balloon)
+[![devDependency Status](https://david-dm.org/ckeditor/ckeditor5-editor-balloon/dev-status.svg)](https://david-dm.org/ckeditor/ckeditor5-editor-balloon?type=dev)
 
-The editor with a balloon toolbar (Medium-like) implementation. More information about the project can be found at the following URL: <https://github.com/ckeditor/ckeditor5-editor-balloon-toolbar>.
+The balloon editor (Medium-like) implementation. More information about the project can be found at the following URL: <https://github.com/ckeditor/ckeditor5-editor-balloon>.
 
 ## License
 

+ 4 - 4
packages/ckeditor5-editor-balloon/package.json

@@ -1,7 +1,7 @@
 {
-  "name": "@ckeditor/ckeditor5-editor-balloon-toolbar",
+  "name": "@ckeditor/ckeditor5-editor-balloon",
   "version": "0.1.0",
-  "description": "Balloon toolbar editor for CKEditor 5.",
+  "description": "Balloon editor for CKEditor 5.",
   "keywords": [],
   "dependencies": {
     "@ckeditor/ckeditor5-core": "^0.9.0",
@@ -26,9 +26,9 @@
   "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-editor-balloon-toolbar/issues",
+  "bugs": "https://github.com/ckeditor/ckeditor5-editor-balloon/issues",
   "repository": {
     "type": "git",
-    "url": "https://github.com/ckeditor/ckeditor5-editor-balloon-toolbar.git"
+    "url": "https://github.com/ckeditor/ckeditor5-editor-balloon.git"
   }
 }

+ 9 - 9
packages/ckeditor5-editor-balloon/src/balloontoolbareditor.js → packages/ckeditor5-editor-balloon/src/ballooneditor.js

@@ -4,27 +4,27 @@
  */
 
 /**
- * @module editor-balloon-toolbar/balloontoolbareditor
+ * @module editor-balloon/ballooneditor
  */
 
 import StandardEditor from '@ckeditor/ckeditor5-core/src/editor/standardeditor';
 import HtmlDataProcessor from '@ckeditor/ckeditor5-engine/src/dataprocessor/htmldataprocessor';
 import ContextualToolbar from '@ckeditor/ckeditor5-ui/src/toolbar/contextual/contextualtoolbar';
-import BalloonToolbarEditorUI from './balloontoolbareditorui';
-import BalloonToolbarEditorUIView from './balloontoolbareditoruiview';
+import BalloonEditorUI from './ballooneditorui';
+import BalloonEditorUIView from './ballooneditoruiview';
 import setDataInElement from '@ckeditor/ckeditor5-utils/src/dom/setdatainelement';
 
 import '../theme/theme.scss';
 
 /**
- * The balloon toolbar editor. Uses an inline editable and a toolbar based
+ * The balloon editor. Uses an inline editable and a toolbar based
  * on the {@link module:ui/toolbar/contextual/contextualtoolbar~ContextualToolbar}.
  *
  * @extends module:core/editor/standardeditor~StandardEditor
  */
-export default class BalloonToolbarEditor extends StandardEditor {
+export default class BalloonEditor extends StandardEditor {
 	/**
-	 * Creates an instance of the balloon toolbar editor.
+	 * Creates an instance of the balloon editor.
 	 *
 	 * @param {HTMLElement} element The DOM element that will be the source for the created editor.
 	 * @param {Object} config The editor configuration.
@@ -37,7 +37,7 @@ export default class BalloonToolbarEditor extends StandardEditor {
 
 		this.document.createRoot();
 		this.data.processor = new HtmlDataProcessor();
-		this.ui = new BalloonToolbarEditorUI( this, new BalloonToolbarEditorUIView( this.locale, element ) );
+		this.ui = new BalloonEditorUI( this, new BalloonEditorUIView( this.locale, element ) );
 	}
 
 	/**
@@ -59,9 +59,9 @@ export default class BalloonToolbarEditor extends StandardEditor {
 	}
 
 	/**
-	 * Creates a balloon toolbar editor instance.
+	 * Creates a balloon editor instance.
 	 *
-	 *		BalloonToolbarEditor.create( document.querySelector( '#editor' ), {
+	 *		BalloonEditor.create( document.querySelector( '#editor' ), {
 	 *			plugins: [ Delete, Enter, Typing, Paragraph, Undo, Bold, Italic ],
 	 *			toolbar: [ 'bold', 'italic' ]
 	 *		} )

+ 4 - 4
packages/ckeditor5-editor-balloon/src/balloontoolbareditorui.js → packages/ckeditor5-editor-balloon/src/ballooneditorui.js

@@ -4,7 +4,7 @@
  */
 
 /**
- * @module editor-balloon-toolbar/balloontoolbareditorui
+ * @module editor-balloon/ballooneditorui
  */
 
 import ComponentFactory from '@ckeditor/ckeditor5-ui/src/componentfactory';
@@ -12,13 +12,13 @@ import FocusTracker from '@ckeditor/ckeditor5-utils/src/focustracker';
 import enableToolbarKeyboardFocus from '@ckeditor/ckeditor5-ui/src/toolbar/enabletoolbarkeyboardfocus';
 
 /**
- * The balloon toolbar editor UI class.
+ * The balloon editor UI class.
  *
  * @implements module:core/editor/editorui~EditorUI
  */
-export default class BalloonToolbarEditorUI {
+export default class BalloonEditorUI {
 	/**
-	 * Creates an instance of the balloon toolbar editor UI class.
+	 * Creates an instance of the balloon editor UI class.
 	 *
 	 * @param {module:core/editor/editor~Editor} editor The editor instance.
 	 * @param {module:ui/editorui/editoruiview~EditorUIView} view The view of the UI.

+ 3 - 3
packages/ckeditor5-editor-balloon/src/balloontoolbareditoruiview.js → packages/ckeditor5-editor-balloon/src/ballooneditoruiview.js

@@ -4,7 +4,7 @@
  */
 
 /**
- * @module editor-balloon-toolbar/balloontoolbareditoruiview
+ * @module editor-balloon/ballooneditoruiview
  */
 
 import EditorUIView from '@ckeditor/ckeditor5-ui/src/editorui/editoruiview';
@@ -15,9 +15,9 @@ import InlineEditableUIView from '@ckeditor/ckeditor5-ui/src/editableui/inline/i
  *
  * @extends module:ui/editorui/editoruiview~EditorUIView
  */
-export default class BalloonToolbarEditorUIView extends EditorUIView {
+export default class BalloonEditorUIView extends EditorUIView {
 	/**
-	 * Creates an instance of the balloon toolbar editor UI view.
+	 * Creates an instance of the balloon editor UI view.
 	 *
 	 * @param {module:utils/locale~Locale} locale The {@link module:core/editor/editor~Editor#locale} instance.
 	 */

+ 20 - 20
packages/ckeditor5-editor-balloon/tests/balloontoolbareditor.js → packages/ckeditor5-editor-balloon/tests/ballooneditor.js

@@ -5,14 +5,14 @@
 
 /* globals document */
 
-import BalloonToolbarEditorUI from '../src/balloontoolbareditorui';
-import BalloonToolbarEditorUIView from '../src/balloontoolbareditoruiview';
+import BalloonEditorUI from '../src/ballooneditorui';
+import BalloonEditorUIView from '../src/ballooneditoruiview';
 
 import HtmlDataProcessor from '@ckeditor/ckeditor5-engine/src/dataprocessor/htmldataprocessor';
 import buildViewConverter from '@ckeditor/ckeditor5-engine/src/conversion/buildviewconverter';
 import buildModelConverter from '@ckeditor/ckeditor5-engine/src/conversion/buildmodelconverter';
 
-import BalloonToolbarEditor from '../src/balloontoolbareditor';
+import BalloonEditor from '../src/ballooneditor';
 import Plugin from '@ckeditor/ckeditor5-core/src/plugin';
 import Paragraph from '@ckeditor/ckeditor5-paragraph/src/paragraph';
 import Bold from '@ckeditor/ckeditor5-basic-styles/src/bold';
@@ -23,7 +23,7 @@ import count from '@ckeditor/ckeditor5-utils/src/count';
 
 testUtils.createSinonSandbox();
 
-describe( 'BalloonToolbarEditor', () => {
+describe( 'BalloonEditor', () => {
 	let editor, editorElement;
 
 	beforeEach( () => {
@@ -39,7 +39,7 @@ describe( 'BalloonToolbarEditor', () => {
 
 	describe( 'constructor()', () => {
 		beforeEach( () => {
-			editor = new BalloonToolbarEditor( editorElement, {
+			editor = new BalloonEditor( editorElement, {
 				plugins: [ Bold ],
 				toolbar: [ 'Bold' ]
 			} );
@@ -66,15 +66,15 @@ describe( 'BalloonToolbarEditor', () => {
 			expect( editor.data.processor ).to.be.instanceof( HtmlDataProcessor );
 		} );
 
-		it( 'creates the UI using BalloonToolbarEditorUI classes', () => {
-			expect( editor.ui ).to.be.instanceof( BalloonToolbarEditorUI );
-			expect( editor.ui.view ).to.be.instanceof( BalloonToolbarEditorUIView );
+		it( 'creates the UI using BalloonEditorUI classes', () => {
+			expect( editor.ui ).to.be.instanceof( BalloonEditorUI );
+			expect( editor.ui.view ).to.be.instanceof( BalloonEditorUIView );
 		} );
 	} );
 
 	describe( 'create()', () => {
 		beforeEach( function() {
-			return BalloonToolbarEditor
+			return BalloonEditor
 				.create( editorElement, {
 					plugins: [ Paragraph, Bold ]
 				} )
@@ -87,8 +87,8 @@ describe( 'BalloonToolbarEditor', () => {
 			return editor.destroy();
 		} );
 
-		it( 'creates an instance which inherits from the BalloonToolbarEditor', () => {
-			expect( editor ).to.be.instanceof( BalloonToolbarEditor );
+		it( 'creates an instance which inherits from the BalloonEditor', () => {
+			expect( editor ).to.be.instanceof( BalloonEditor );
 		} );
 
 		it( 'creates element–less UI view', () => {
@@ -104,7 +104,7 @@ describe( 'BalloonToolbarEditor', () => {
 		} );
 
 		// ckeditor/ckeditor5-editor-classic#53
-		it( 'creates an instance of a BalloonToolbarEditor child class', () => {
+		it( 'creates an instance of a BalloonEditor child class', () => {
 			// Fun fact: Remove the next 3 lines and you'll get a lovely inf loop due to two
 			// editor being initialized on one element.
 			const editorElement = document.createElement( 'div' );
@@ -112,15 +112,15 @@ describe( 'BalloonToolbarEditor', () => {
 
 			document.body.appendChild( editorElement );
 
-			class CustomBalloonToolbarEditor extends BalloonToolbarEditor {}
+			class CustomBalloonEditor extends BalloonEditor {}
 
-			return CustomBalloonToolbarEditor
+			return CustomBalloonEditor
 				.create( editorElement, {
 					plugins: [ Paragraph, Bold ]
 				} )
 				.then( newEditor => {
-					expect( newEditor ).to.be.instanceof( CustomBalloonToolbarEditor );
-					expect( newEditor ).to.be.instanceof( BalloonToolbarEditor );
+					expect( newEditor ).to.be.instanceof( CustomBalloonEditor );
+					expect( newEditor ).to.be.instanceof( BalloonEditor );
 
 					expect( newEditor.getData() ).to.equal( '<p><strong>foo</strong> bar</p>' );
 
@@ -152,7 +152,7 @@ describe( 'BalloonToolbarEditor', () => {
 				}
 			}
 
-			return BalloonToolbarEditor
+			return BalloonEditor
 				.create( editorElement, {
 					plugins: [ EventWatcher ]
 				} )
@@ -174,7 +174,7 @@ describe( 'BalloonToolbarEditor', () => {
 				}
 			}
 
-			return BalloonToolbarEditor
+			return BalloonEditor
 				.create( editorElement, {
 					plugins: [ EventWatcher, Paragraph, Bold ]
 				} )
@@ -196,7 +196,7 @@ describe( 'BalloonToolbarEditor', () => {
 				}
 			}
 
-			return BalloonToolbarEditor
+			return BalloonEditor
 				.create( editorElement, {
 					plugins: [ EventWatcher ]
 				} )
@@ -210,7 +210,7 @@ describe( 'BalloonToolbarEditor', () => {
 
 	describe( 'destroy()', () => {
 		beforeEach( function() {
-			return BalloonToolbarEditor
+			return BalloonEditor
 				.create( editorElement, { plugins: [ Paragraph ] } )
 				.then( newEditor => {
 					editor = newEditor;

+ 5 - 5
packages/ckeditor5-editor-balloon/tests/balloontoolbareditorui.js → packages/ckeditor5-editor-balloon/tests/ballooneditorui.js

@@ -7,15 +7,15 @@
 
 import ComponentFactory from '@ckeditor/ckeditor5-ui/src/componentfactory';
 
-import BalloonToolbarEditorUI from '../src/balloontoolbareditorui';
-import BalloonToolbarEditorUIView from '../src/balloontoolbareditoruiview';
+import BalloonEditorUI from '../src/ballooneditorui';
+import BalloonEditorUIView from '../src/ballooneditoruiview';
 import ClassicTestEditor from '@ckeditor/ckeditor5-core/tests/_utils/classictesteditor';
 import ContextualToolbar from '@ckeditor/ckeditor5-ui/src/toolbar/contextual/contextualtoolbar';
 import FocusTracker from '@ckeditor/ckeditor5-utils/src/focustracker';
 import { keyCodes } from '@ckeditor/ckeditor5-utils/src/keyboard';
 import utils from '@ckeditor/ckeditor5-utils/tests/_utils/utils';
 
-describe( 'BalloonToolbarEditorUI', () => {
+describe( 'BalloonEditorUI', () => {
 	let editorElement, editor, editable, view, ui;
 
 	beforeEach( () => {
@@ -28,8 +28,8 @@ describe( 'BalloonToolbarEditorUI', () => {
 
 		return editor.initPlugins()
 			.then( () => {
-				view = new BalloonToolbarEditorUIView( editor.locale );
-				ui = new BalloonToolbarEditorUI( editor, view );
+				view = new BalloonEditorUIView( editor.locale );
+				ui = new BalloonEditorUI( editor, view );
 				editable = editor.editing.view.getRoot();
 			} );
 	} );

+ 3 - 3
packages/ckeditor5-editor-balloon/tests/balloontoolbareditoruiview.js → packages/ckeditor5-editor-balloon/tests/ballooneditoruiview.js

@@ -3,16 +3,16 @@
  * For licensing, see LICENSE.md.
  */
 
-import BalloonToolbarEditorUIView from '../src/balloontoolbareditoruiview';
+import BalloonEditorUIView from '../src/ballooneditoruiview';
 import InlineEditableUIView from '@ckeditor/ckeditor5-ui/src/editableui/inline/inlineeditableuiview';
 import Locale from '@ckeditor/ckeditor5-utils/src/locale';
 
-describe( 'BalloonToolbarEditorUIView', () => {
+describe( 'BalloonEditorUIView', () => {
 	let locale, view;
 
 	beforeEach( () => {
 		locale = new Locale( 'en' );
-		view = new BalloonToolbarEditorUIView( locale );
+		view = new BalloonEditorUIView( locale );
 	} );
 
 	describe( 'constructor()', () => {

+ 0 - 0
packages/ckeditor5-editor-balloon/tests/manual/balloontoolbareditor.html → packages/ckeditor5-editor-balloon/tests/manual/ballooneditor.html


+ 2 - 2
packages/ckeditor5-editor-balloon/tests/manual/balloontoolbareditor.js → packages/ckeditor5-editor-balloon/tests/manual/ballooneditor.js

@@ -5,7 +5,7 @@
 
 /* globals console:false, document, window */
 
-import BalloonToolbarEditor from '../../src/balloontoolbareditor';
+import BalloonEditor from '../../src/ballooneditor';
 import ArticlePreset from '@ckeditor/ckeditor5-presets/src/article';
 import testUtils from '@ckeditor/ckeditor5-utils/tests/_utils/utils';
 
@@ -18,7 +18,7 @@ function initEditors() {
 	init( '#editor-2' );
 
 	function init( selector ) {
-		BalloonToolbarEditor
+		BalloonEditor
 			.create( document.querySelector( selector ), {
 				plugins: [ ArticlePreset ],
 				toolbar: [ 'headings', 'bold', 'italic', 'link', 'bulletedList', 'numberedList', 'blockQuote' ],

+ 0 - 0
packages/ckeditor5-editor-balloon/tests/manual/balloontoolbareditor.md → packages/ckeditor5-editor-balloon/tests/manual/ballooneditor.md