ckeditor5-inspector
ckeditor5-inspector copied to clipboard
[TS] Provide TypeScript Typings for CKEditorInspector
Now, that CKEditor 5 37.x ships with TypeScript typings, it would be great to benefit from corresponding typings also for CKEditorInspector
.
Workaround
declare class CKEditorInspector {
static attach(editorOrConfig: Editor | Record<string, Editor>, options?: { isCollapsed?: boolean }): string[];
}
(if I got the documentation straight and skipping attachToAll
)
Agree
Yes, please--trying to work through the React custom component tutorial with TypeScript, but can't use CKEditorInspector
!
Can anyone supply sample code using a workaround? Not sure how to integrate @mmichaelis 's example.
Edit: I ended up creating ckeditor5-inspector.d.ts
with the content:
declare module '@ckeditor/ckeditor5-inspector'; // workaround until they release types for CKEditorInspector
...and this silenced the type error, allowed me to follow the integration steps from the tutorial.