Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@ckeditor/ckeditor5-editor-balloon

Package Overview
Dependencies
Maintainers
1
Versions
702
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ckeditor/ckeditor5-editor-balloon - npm Package Compare versions

Comparing version 1.0.0-alpha.2 to 1.0.0-beta.1

7

CHANGELOG.md
Changelog
=========
## [1.0.0-beta.1](https://github.com/ckeditor/ckeditor5-editor-balloon/compare/v1.0.0-alpha.2...v1.0.0-beta.1) (2018-03-15)
### Other changes
* Migrated the editor styles to PostCSS (see [ckeditor/ckeditor5-ui#144](https://github.com/ckeditor/ckeditor5-ui/issues/144)). ([bd239e9](https://github.com/ckeditor/ckeditor5-editor-balloon/commit/bd239e9))
## [1.0.0-alpha.2](https://github.com/ckeditor/ckeditor5-editor-balloon/compare/v1.0.0-alpha.1...v1.0.0-alpha.2) (2017-11-14)

@@ -5,0 +12,0 @@

2

LICENSE.md

@@ -5,3 +5,3 @@ Software License Agreement

**Balloon Editor** – https://github.com/ckeditor/ckeditor5-editor-balloon <br>
Copyright (c) 2003-2017, [CKSource](http://cksource.com) Frederico Knabben. All rights reserved.
Copyright (c) 2003-2018, [CKSource](http://cksource.com) Frederico Knabben. All rights reserved.

@@ -8,0 +8,0 @@ Licensed under the terms of any of the following licenses at your choice:

{
"name": "@ckeditor/ckeditor5-editor-balloon",
"version": "1.0.0-alpha.2",
"version": "1.0.0-beta.1",
"description": "Balloon editor implementation for CKEditor 5.",

@@ -10,16 +10,16 @@ "keywords": [

"dependencies": {
"@ckeditor/ckeditor5-core": "^1.0.0-alpha.2",
"@ckeditor/ckeditor5-engine": "^1.0.0-alpha.2",
"@ckeditor/ckeditor5-theme-lark": "^1.0.0-alpha.2",
"@ckeditor/ckeditor5-ui": "^1.0.0-alpha.2",
"@ckeditor/ckeditor5-utils": "^1.0.0-alpha.2"
"@ckeditor/ckeditor5-core": "^1.0.0-beta.1",
"@ckeditor/ckeditor5-engine": "^1.0.0-beta.1",
"@ckeditor/ckeditor5-theme-lark": "^1.0.0-beta.1",
"@ckeditor/ckeditor5-ui": "^1.0.0-beta.1",
"@ckeditor/ckeditor5-utils": "^1.0.0-beta.1"
},
"devDependencies": {
"@ckeditor/ckeditor5-basic-styles": "^1.0.0-alpha.2",
"@ckeditor/ckeditor5-essentials": "^1.0.0-alpha.2",
"@ckeditor/ckeditor5-paragraph": "^1.0.0-alpha.2",
"eslint": "^4.8.0",
"eslint-config-ckeditor5": "^1.0.6",
"@ckeditor/ckeditor5-basic-styles": "^1.0.0-beta.1",
"@ckeditor/ckeditor5-essentials": "^1.0.0-beta.1",
"@ckeditor/ckeditor5-paragraph": "^1.0.0-beta.1",
"eslint": "^4.15.0",
"eslint-config-ckeditor5": "^1.0.7",
"husky": "^0.14.3",
"lint-staged": "^4.2.3"
"lint-staged": "^6.0.0"
},

@@ -26,0 +26,0 @@ "engines": {

@@ -7,3 +7,5 @@ CKEditor 5 balloon editor implementation

[![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)
[![BrowserStack Status](https://www.browserstack.com/automate/badge.svg?badge_key=d3hvenZqQVZERFQ5d09FWXdyT0ozVXhLaVltRFRjTTUyZGpvQWNmWVhUUT0tLUZqNlJ1YWRUd0RvdEVOaEptM1B2Q0E9PQ==--c9d3dee40b9b4471ff3fb516d9ecf8d09292c7e0)](https://www.browserstack.com/automate/public-build/d3hvenZqQVZERFQ5d09FWXdyT0ozVXhLaVltRFRjTTUyZGpvQWNmWVhUUT0tLUZqNlJ1YWRUd0RvdEVOaEptM1B2Q0E9PQ==--c9d3dee40b9b4471ff3fb516d9ecf8d09292c7e0)
[![Coverage Status](https://coveralls.io/repos/github/ckeditor/ckeditor5-editor-balloon/badge.svg?branch=master)](https://coveralls.io/github/ckeditor/ckeditor5-editor-balloon?branch=master)
<br>
[![Dependency Status](https://david-dm.org/ckeditor/ckeditor5-editor-balloon/status.svg)](https://david-dm.org/ckeditor/ckeditor5-editor-balloon)

@@ -10,0 +12,0 @@ [![devDependency Status](https://david-dm.org/ckeditor/ckeditor5-editor-balloon/dev-status.svg)](https://david-dm.org/ckeditor/ckeditor5-editor-balloon?type=dev)

/**
* @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
* @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md.

@@ -10,18 +10,21 @@ */

import StandardEditor from '@ckeditor/ckeditor5-core/src/editor/standardeditor';
import Editor from '@ckeditor/ckeditor5-core/src/editor/editor';
import HtmlDataProcessor from '@ckeditor/ckeditor5-engine/src/dataprocessor/htmldataprocessor';
import ContextualToolbar from '@ckeditor/ckeditor5-ui/src/toolbar/contextual/contextualtoolbar';
import BalloonToolbar from '@ckeditor/ckeditor5-ui/src/toolbar/balloon/balloontoolbar';
import BalloonEditorUI from './ballooneditorui';
import BalloonEditorUIView from './ballooneditoruiview';
import setDataInElement from '@ckeditor/ckeditor5-utils/src/dom/setdatainelement';
import getDataFromElement from '@ckeditor/ckeditor5-utils/src/dom/getdatafromelement';
import DataApiMixin from '@ckeditor/ckeditor5-core/src/editor/utils/dataapimixin';
import ElementApiMixin from '@ckeditor/ckeditor5-core/src/editor/utils/elementapimixin';
import attachToForm from '@ckeditor/ckeditor5-core/src/editor/utils/attachtoform';
import mix from '@ckeditor/ckeditor5-utils/src/mix';
import '../theme/theme.scss';
/**
* The {@glink builds/guides/overview#Balloon-editor balloon editor} implementation (Medium-like editor).
* It uses an inline editable and a toolbar based on the {@link module:ui/toolbar/contextual/contextualtoolbar~ContextualToolbar}.
* The {@glink builds/guides/overview#balloon-editor balloon editor} implementation (Medium-like editor).
* It uses an inline editable and a toolbar based on the {@link module:ui/toolbar/balloon/balloontoolbar~BalloonToolbar}.
* See the {@glink examples/builds/balloon-editor demo}.
*
* In order to create a balloon editor instance, use the static
* {@link module:editor-balloon/ballooneditor~BalloonEditor#create `BalloonEditor.create()`} method.
* {@link module:editor-balloon/ballooneditor~BalloonEditor.create `BalloonEditor.create()`} method.
*

@@ -32,3 +35,3 @@ * # Balloon editor and balloon build

* [`@ckeditor/ckeditor5-editor-balloon`](https://www.npmjs.com/package/@ckeditor/ckeditor5-editor-balloon) package)
* but it is also available in the {@glink builds/guides/overview#Balloon-editor balloon build}.
* but it is also available in the {@glink builds/guides/overview#balloon-editor balloon build}.
*

@@ -41,7 +44,10 @@ * {@glink builds/guides/overview Builds} are ready-to-use editors with plugins bundled in. When using the editor from

* Read more about initializing the editor from source or as a build in
* {@link module:editor-balloon/ballooneditor~BalloonEditor#create `BalloonEditor.create()`}.
* {@link module:editor-balloon/ballooneditor~BalloonEditor.create `BalloonEditor.create()`}.
*
* @extends module:core/editor/standardeditor~StandardEditor
* @mixes module:core/editor/utils/dataapimixin~DataApiMixin
* @mixes module:core/editor/utils/elementapimixin~ElementApiMixin
* @implements module:core/editor/editorwithui~EditorWithUI
* @extends module:core/editor/editor~Editor
*/
export default class BalloonEditor extends StandardEditor {
export default class BalloonEditor extends Editor {
/**

@@ -51,3 +57,3 @@ * Creates an instance of the balloon editor.

* **Note:** do not use the constructor to create editor instances. Use the static
* {@link module:editor-balloon/ballooneditor~BalloonEditor#create `BalloonEditor.create()`} method instead.
* {@link module:editor-balloon/ballooneditor~BalloonEditor.create `BalloonEditor.create()`} method instead.
*

@@ -60,10 +66,16 @@ * @protected

constructor( element, config ) {
super( element, config );
super( config );
this.config.get( 'plugins' ).push( ContextualToolbar );
this.config.define( 'contextualToolbar', this.config.get( 'toolbar' ) );
this.element = element;
this.document.createRoot();
this.config.get( 'plugins' ).push( BalloonToolbar );
this.config.define( 'balloonToolbar', this.config.get( 'toolbar' ) );
this.data.processor = new HtmlDataProcessor();
this.model.document.createRoot();
this.ui = new BalloonEditorUI( this, new BalloonEditorUIView( this.locale, element ) );
attachToForm( this );
}

@@ -139,3 +151,3 @@

} )
.then( () => editor.loadDataFromEditorElement() )
.then( () => editor.data.init( getDataFromElement( element ) ) )
.then( () => {

@@ -150,1 +162,4 @@ editor.fire( 'dataReady' );

}
mix( BalloonEditor, DataApiMixin );
mix( BalloonEditor, ElementApiMixin );
/**
* @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
* @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md.

@@ -54,3 +54,3 @@ */

const view = this.view;
const contextualToolbar = editor.plugins.get( 'ContextualToolbar' );
const balloonToolbar = editor.plugins.get( 'BalloonToolbar' );

@@ -60,3 +60,3 @@ view.render();

// Setup the editable.
const editingRoot = editor.editing.createRoot( view.editableElement );
const editingRoot = editor.editing.view.document.getRoot();
view.editable.bind( 'isReadOnly' ).to( editingRoot );

@@ -67,2 +67,3 @@

view.editable.bind( 'isFocused' ).to( this.focusTracker );
editor.editing.view.attachDomRoot( view.editableElement );
view.editable.name = editingRoot.rootName;

@@ -76,8 +77,8 @@

originKeystrokeHandler: editor.keystrokes,
toolbar: contextualToolbar.toolbarView,
toolbar: balloonToolbar.toolbarView,
beforeFocus() {
contextualToolbar.show();
balloonToolbar.show();
},
afterBlur() {
contextualToolbar.hide();
balloonToolbar.hide();
}

@@ -84,0 +85,0 @@ } );

/**
* @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
* @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md.

@@ -4,0 +4,0 @@ */

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc