8
0
Эх сурвалжийг харах

Move schema and conversion definition to init method of table properties plugins.

Maciej Gołaszewski 6 жил өмнө
parent
commit
1046b6cb81

+ 9 - 1
packages/ckeditor5-table/src/tablecellpropertiesediting.js

@@ -12,6 +12,7 @@ import { downcastToStyle, upcastAttribute, upcastBorderStyles } from './tablepro
 import { addBorderRules } from '@ckeditor/ckeditor5-engine/src/view/styles/border';
 import { addPaddingRules } from '@ckeditor/ckeditor5-engine/src/view/styles/padding';
 import { addBackgroundRules } from '@ckeditor/ckeditor5-engine/src/view/styles/background';
+import TableEditing from './tableediting';
 
 /**
  * The table cell properties editing feature.
@@ -37,7 +38,14 @@ export default class TableCellPropertiesEditing extends Plugin {
 	/**
 	 * @inheritDoc
 	 */
-	afterInit() {
+	static get requires() {
+		return [ TableEditing ];
+	}
+
+	/**
+	 * @inheritDoc
+	 */
+	init() {
 		const editor = this.editor;
 		const schema = editor.model.schema;
 		const conversion = editor.conversion;

+ 9 - 1
packages/ckeditor5-table/src/tablepropertiesediting.js

@@ -12,6 +12,7 @@ import { addBorderRules } from '@ckeditor/ckeditor5-engine/src/view/styles/borde
 import { addBackgroundRules } from '@ckeditor/ckeditor5-engine/src/view/styles/background';
 
 import { downcastTableAttribute, upcastAttribute, upcastBorderStyles } from './tableproperties/utils';
+import TableEditing from './tableediting';
 
 /**
  * The table properties editing feature.
@@ -29,7 +30,14 @@ export default class TablePropertiesEditing extends Plugin {
 	/**
 	 * @inheritDoc
 	 */
-	afterInit() {
+	static get requires() {
+		return [ TableEditing ];
+	}
+
+	/**
+	 * @inheritDoc
+	 */
+	init() {
 		const editor = this.editor;
 		const schema = editor.model.schema;
 		const conversion = editor.conversion;