-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from alexeckermann/issue-5
Fixes issue #5 for extending editor.ui.view template
- Loading branch information
Showing
10 changed files
with
265 additions
and
87 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
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
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
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,26 @@ | ||
import ClassicTestEditor from '@ckeditor/ckeditor5-core/tests/_utils/classictesteditor'; | ||
import EditorUI from '@ckeditor/ckeditor5-core/src/editor/editorui'; | ||
import IncompatibleTestEditorUIVIew from './incompatibletesteditoruiview'; | ||
|
||
export default class IncompatibleTestEditor extends ClassicTestEditor { | ||
/** | ||
* @inheritDoc | ||
*/ | ||
constructor( element, config ) { | ||
super( element, config ); | ||
|
||
if ( config._test.missingEditable === true ) { | ||
// Intentially remove the editable property to trip up the plugin. | ||
this.ui = new EditorUI( this, new IncompatibleTestEditorUIVIew( this.locale ) ); | ||
this.ui.view.editable = null; | ||
} | ||
|
||
if ( config._test.renderView === true ) { | ||
// Render the editable view so that its template can not be extended | ||
this.ui.view.editable.render(); | ||
} | ||
|
||
|
||
} | ||
|
||
} |
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,16 @@ | ||
import BoxedEditorUIView from '@ckeditor/ckeditor5-ui/src/editorui/boxed/boxededitoruiview'; | ||
import InlineEditableUIView from '@ckeditor/ckeditor5-ui/src/editableui/inline/inlineeditableuiview'; | ||
|
||
export default class IncompatibleTestEditorUIView extends BoxedEditorUIView { | ||
|
||
render() { | ||
|
||
this.editable = new InlineEditableUIView( this.locale ); | ||
|
||
super.render(); | ||
|
||
} | ||
|
||
|
||
|
||
} |
Oops, something went wrong.