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

Commit

Permalink
Code refactoring.
Browse files Browse the repository at this point in the history
  • Loading branch information
oleq committed Jan 16, 2019
1 parent 3d35c37 commit 6c095b9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 16 deletions.
16 changes: 1 addition & 15 deletions src/inlineeditorui.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import EditorUI from '@ckeditor/ckeditor5-core/src/editor/editorui';
import enableToolbarKeyboardFocus from '@ckeditor/ckeditor5-ui/src/toolbar/enabletoolbarkeyboardfocus';
import normalizeToolbarConfig from '@ckeditor/ckeditor5-ui/src/toolbar/normalizetoolbarconfig';
import { attachPlaceholder } from '@ckeditor/ckeditor5-engine/src/view/placeholder';
import { attachPlaceholder, getPlaceholderElement } from '@ckeditor/ckeditor5-engine/src/view/placeholder';

/**
* The inline editor UI class.
Expand Down Expand Up @@ -97,17 +97,3 @@ export default class InlineEditorUI extends EditorUI {
super.destroy();
}
}

function getPlaceholderElement( viewRoot ) {
return () => {
if ( viewRoot.childCount === 1 ) {
const firstRootChild = viewRoot.getChild( 0 );

if ( firstRootChild.is( 'p' ) ) {
return firstRootChild;
}
}

return null;
};
}
2 changes: 1 addition & 1 deletion src/inlineeditoruiview.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ export default class InlineEditorUIView extends EditorUIView {
* @readonly
* @member {module:ui/editableui/inline/inlineeditableuiview~InlineEditableUIView}
*/
this.editable = new InlineEditableUIView( locale, editableElement, editingView );
this.editable = new InlineEditableUIView( locale, editingView, editableElement );
}

/**
Expand Down

0 comments on commit 6c095b9

Please sign in to comment.