ckeditor-math-chem-editor 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 athif
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,56 @@
1
+ # ckeditor-math-chem-editor
2
+
3
+ A React CKEditor component with integrated math and chemistry editor popup built using CKEditor 5 and MathLive.
4
+
5
+ ## Features
6
+
7
+ - CKEditor 5 React integration
8
+ - Built-in math and chemistry input popup
9
+ - MathLive-powered formula editing
10
+ - Automatic CSS imports from the package itself
11
+
12
+ ## Installation
13
+
14
+ Install the package and its peer dependencies:
15
+
16
+ ```bash
17
+ npm install ckeditor-math-chem-editor react react-dom ckeditor5 @ckeditor/ckeditor5-react mathlive
18
+ ```
19
+
20
+ ## Usage
21
+
22
+ ```jsx
23
+ import { useState } from 'react';
24
+ import CkEditor from 'ckeditor-math-chem-editor';
25
+
26
+ export default function Example() {
27
+ const [value, setValue] = useState('<p>Hello world</p>');
28
+
29
+ return (
30
+ <CkEditor
31
+ value={value}
32
+ onChange={setValue}
33
+ />
34
+ );
35
+ }
36
+ ```
37
+
38
+ ## Props
39
+
40
+ - `value`: HTML string shown inside the editor
41
+ - `onChange`: callback that receives updated HTML content
42
+ - `className`: optional wrapper class name
43
+
44
+ ## Notes
45
+
46
+ - This package is published as an ESM React package and is intended for apps that already use a modern bundler such as Vite, Webpack, or Next.js.
47
+ - Package styles are imported automatically when you import the component.
48
+ - CKEditor is configured with `licenseKey: 'GPL'` in the component, so make sure that matches your distribution requirements.
49
+
50
+ ## Package contents
51
+
52
+ - `src/Ckeditor.jsx`
53
+ - `src/CustomMathEditor.css`
54
+ - `src/SpecialCharacterModal.jsx`
55
+ - `src/SpecialCharacterModal.css`
56
+ - `src/index.js`
package/package.json ADDED
@@ -0,0 +1,46 @@
1
+ {
2
+ "name": "ckeditor-math-chem-editor",
3
+ "version": "1.0.0",
4
+ "description": "CKEditor React component with built-in math and chemistry editor popup using MathLive.",
5
+ "type": "module",
6
+ "main": "./src/index.js",
7
+ "module": "./src/index.js",
8
+ "exports": {
9
+ ".": "./src/index.js"
10
+ },
11
+ "files": [
12
+ "src",
13
+ "README.md",
14
+ "LICENSE"
15
+ ],
16
+ "sideEffects": [
17
+ "**/*.css"
18
+ ],
19
+ "scripts": {
20
+ "check:package": "npm pack --dry-run"
21
+ },
22
+ "keywords": [
23
+ "ckeditor",
24
+ "ckeditor5",
25
+ "react",
26
+ "mathlive",
27
+ "math-editor",
28
+ "chemistry-editor"
29
+ ],
30
+ "author": "athif",
31
+ "license": "MIT",
32
+ "peerDependencies": {
33
+ "@ckeditor/ckeditor5-react": "^11.1.2",
34
+ "ckeditor5": "^48.2.0",
35
+ "mathlive": "^0.109.2",
36
+ "react": "^18.0.0 || ^19.0.0",
37
+ "react-dom": "^18.0.0 || ^19.0.0"
38
+ },
39
+ "devDependencies": {
40
+ "@ckeditor/ckeditor5-react": "^11.1.2",
41
+ "ckeditor5": "^48.2.0",
42
+ "mathlive": "^0.109.2",
43
+ "react": "^19.2.6",
44
+ "react-dom": "^19.2.6"
45
+ }
46
+ }