Skip to content

Moving render calls out of EditorUIView constructors #1150

Closed

Description

Other - Comment/Feedback

A problem arose when I was testing the alexeckermann/ckeditor5-emptyness plugin where I wanted to extend the editors view template to bind a class name to a property.

The initial implementation passed with the ClassicEditor as the test case. However, when subsequently integrated into a project using a BalloonEditor it hit a wall because the plugin couldn't call to extend a template that was already rendered.

In debugging I came across an inconsistency which explained why the classic editor passed and why the balloon editor didn't. The classic editor does not call any methods in its constructor that render the InlineEditableUIView instance. That, the ClassicEditorUIView defers calls to add a child view until its own render is called.

BalloonEditorUIView, InlineEditorUIView, and DecoupledEditorUIView all call registerChild with the InlineEditableUIView in their constructor.

Is it possible that any child view (or specifically editable views) rendering is moved to render and not called in scope of constructor?

I suspect there may be some wider ramifications of such a change I may not be aware of, so I'm raising it for comment/feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions