Ckeditor5: ClassicTestEditor initializaton flow is not the same as ClassicEditor

Created on 5 Jul 2018  路  3Comments  路  Source: ckeditor/ckeditor5

In the ClassicTestEditor editableElement is created in the class constructor, so it is available before the plugins initialization https://github.com/ckeditor/ckeditor5-core/blob/eb43b632faa036041e58c917204819955beec6e6/tests/_utils/classictesteditor.js#L41

In the ClassicEditor editableElement is created in ClassicEditorUI#init() that is after plugins initialization.

What's the difference?

When you use editableElement in the Plugin#constructor or Plugin#init then ClassicEditor will throw but ClassicTestEditor won't.

This is an example, all unit tests of BalloonToolbar are green, but MT throws: https://github.com/ckeditor/ckeditor5-ui/issues/424

core bug

All 3 comments

I think we agreed in the past that we don't reference (UI) View#element in constructors but in init(). So it's not a big deal that CTE works that way but as in https://github.com/ckeditor/ckeditor5-ui/issues/424 we have to remember about that when developing new plugins.

Plugin#init() is still before the EditorUI#init().

Was this page helpful?
0 / 5 - 0 ratings

Related issues

wwalc picture wwalc  路  3Comments

devaptas picture devaptas  路  3Comments

MCMicS picture MCMicS  路  3Comments

benjismith picture benjismith  路  3Comments

Reinmar picture Reinmar  路  3Comments