From dcae401b467a76aa739356ad83d04e25e5781dbe Mon Sep 17 00:00:00 2001 From: Tony Narlock Date: Sun, 17 Mar 2024 12:29:26 -0500 Subject: [PATCH] docs(README): Note TypeScript and DLL-build support --- README.md | 39 ++------------------------------------- 1 file changed, 2 insertions(+), 37 deletions(-) diff --git a/README.md b/README.md index 8ebd14cf8..a0bafe913 100644 --- a/README.md +++ b/README.md @@ -25,6 +25,8 @@ ckeditor5-math is a TeX-based mathematical plugin for CKEditor 5. You can use it ## Features +- Written in TypeScript (as of v41.2.1) +- DLL build support (as of v36.0.3) - TeX syntax - Inline and display equations - Preview view @@ -267,43 +269,6 @@ CKEditor5.editorInline.InlineEditorEditor My solution for this is use rendering element outside of CKEditor DOM and place it to right place by using absolute position. Alternative solution could be using iframe, but then typesetting engine's scripts and styles have to copy to child document. -## TypeScript users - -ckeditor5-math does not have typings yet. TypeScript builds of CKEditor will see -this: - -```sh -src/ckeditor.ts:63:18 - error TS7016: Could not find a declaration file for module '@isaul32/ckeditor5-math/src/math'. -'/path/to/your/project/node_modules/@isaul32/ckeditor5-math/src/math.js' implicitly has an 'any' type. - -Try `npm i --save-dev @types/isaul32__ckeditor5-math` if it exists or add a new declaration (.d.ts) file containing -`declare module '@isaul32/ckeditor5-math/src/math';` -``` - -### Workaround for typings - -1. Create a `d.ts` declaration file, e.g. `typings/ckeditor5-math.d.ts` - - ```typescript - declare module '@isaul32/ckeditor5-math'; - declare module '@isaul32/ckeditor5-math/src/math'; - declare module '@isaul32/ckeditor5-math/src/autoformatmath'; - ``` -2. In your [`tsconfig.json`](https://www.typescriptlang.org/tsconfig)'s - root-level [`include`](https://www.typescriptlang.org/tsconfig#include) - option, make sure your declaration file is covered, e.g. - - ```json - { - "extends": "ckeditor5/tsconfig.json", - "include": [ - "src", - "typings", - "../../typings" - ] - } - ``` - ## Development Contributions, improvements and bug fixes are welcome. To aid in this, try out