Skip to content
This repository has been archived by the owner on Jun 26, 2020. It is now read-only.

Commit

Permalink
Merge pull request #88 from ckeditor/t/35
Browse files Browse the repository at this point in the history
Other: Extracted widget API to a separate package. Closes #35.

BREAKING CHANGE: The widget API is now available in the `ckeditor5-widget` package. See #35.
  • Loading branch information
Reinmar authored Mar 31, 2017
2 parents bbd0ee7 + 5d7fff9 commit 016b68e
Show file tree
Hide file tree
Showing 14 changed files with 9 additions and 1,403 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"@ckeditor/ckeditor5-engine": "^0.8.0",
"@ckeditor/ckeditor5-ui": "^0.7.1",
"@ckeditor/ckeditor5-utils": "^0.8.0",
"@ckeditor/ckeditor5-theme-lark": "^0.6.1"
"@ckeditor/ckeditor5-theme-lark": "^0.6.1",
"@ckeditor/ckeditor5-widget": "*"
},
"devDependencies": {
"@ckeditor/ckeditor5-clipboard": "^0.4.1",
Expand Down
2 changes: 1 addition & 1 deletion src/image.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

import Plugin from '@ckeditor/ckeditor5-core/src/plugin';
import ImageEngine from './image/imageengine';
import Widget from './widget/widget';
import Widget from '@ckeditor/ckeditor5-widget/src/widget';
import ImageTextAlternative from './imagetextalternative';

import '../theme/theme.scss';
Expand Down
2 changes: 1 addition & 1 deletion src/image/imageengine.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

import Plugin from '@ckeditor/ckeditor5-core/src/plugin';
import buildModelConverter from '@ckeditor/ckeditor5-engine/src/conversion/buildmodelconverter';
import WidgetEngine from '../widget/widgetengine';
import WidgetEngine from '@ckeditor/ckeditor5-widget/src/widgetengine';
import { viewToModelImage, createImageAttributeConverter } from './converters';
import { toImageWidget } from './utils';
import ViewContainerElement from '@ckeditor/ckeditor5-engine/src/view/containerelement';
Expand Down
4 changes: 2 additions & 2 deletions src/image/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@
* @module image/image/utils
*/

import { toWidget, isWidget } from '../widget/utils';
import { toWidget, isWidget } from '@ckeditor/ckeditor5-widget/src/utils';
import ModelElement from '@ckeditor/ckeditor5-engine/src/model/element';

const imageSymbol = Symbol( 'isImage' );

/**
* Converts given {@link module:engine/view/element~Element} to image widget:
* * adds {@link module:engine/view/element~Element#setCustomProperty custom property} allowing to recognize image widget element,
* * calls {@link module:image/widget/utils~toWidget toWidget} function with proper element's label creator.
* * calls {@link module:widget/utils~toWidget toWidget} function with proper element's label creator.
*
* @param {module:engine/view/element~Element} viewElement
* @param {String} label Element's label. It will be concatenated with image's `alt` attribute if one is present.
Expand Down
2 changes: 1 addition & 1 deletion src/imagecaption/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import ModelElement from '@ckeditor/ckeditor5-engine/src/model/element';
import ViewEditableElement from '@ckeditor/ckeditor5-engine/src/view/editableelement';
import { attachPlaceholder } from '@ckeditor/ckeditor5-engine/src/view/placeholder';
import { toWidgetEditable } from '../widget/utils';
import { toWidgetEditable } from '@ckeditor/ckeditor5-widget/src/utils';

const captionSymbol = Symbol( 'imageCaption' );

Expand Down
121 changes: 0 additions & 121 deletions src/widget/utils.js

This file was deleted.

Loading

0 comments on commit 016b68e

Please sign in to comment.