neiki-editor 2.3.0 → 2.5.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/README.md +40 -7
- package/dist/neiki-editor.css +10 -1
- package/dist/neiki-editor.js +686 -1
- package/dist/neiki-editor.min.css +1 -0
- package/dist/neiki-editor.min.js +1 -0
- package/package.json +5 -4
package/README.md
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
<img src="https://img.shields.io/badge/css-%23663399.svg?style=for-the-badge&logo=css&logoColor=white" alt="CSS">
|
|
12
12
|
<br>
|
|
13
13
|
<img src="https://img.shields.io/badge/License-MIT-2563EB?style=for-the-badge&logo=open-source-initiative&logoColor=white&labelColor=000F15&logoWidth=20" alt="License">
|
|
14
|
-
<img src="https://img.shields.io/badge/Version-2.
|
|
14
|
+
<img src="https://img.shields.io/badge/Version-2.5.0-2563EB?style=for-the-badge&logo=semantic-release&logoColor=white&labelColor=000F15&logoWidth=20" alt="Version">
|
|
15
15
|
</p>
|
|
16
16
|
|
|
17
17
|
<p align="center">
|
|
@@ -38,16 +38,38 @@
|
|
|
38
38
|
|
|
39
39
|
### CDN (Recommended)
|
|
40
40
|
|
|
41
|
+
Just one file — CSS is embedded automatically:
|
|
42
|
+
|
|
43
|
+
```html
|
|
44
|
+
<script src="https://cdn.jsdelivr.net/gh/neikiri/neiki-editor@2.5.0/dist/neiki-editor.min.js"></script>
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Or if you prefer loading CSS separately:
|
|
48
|
+
|
|
41
49
|
```html
|
|
42
|
-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/neikiri/neiki-editor@2.
|
|
43
|
-
<script src="https://cdn.jsdelivr.net/gh/neikiri/neiki-editor@2.
|
|
50
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/neikiri/neiki-editor@2.5.0/dist/neiki-editor.css">
|
|
51
|
+
<script src="https://cdn.jsdelivr.net/gh/neikiri/neiki-editor@2.5.0/dist/neiki-editor.js"></script>
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### Package Manager
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
npm install neiki-editor
|
|
58
|
+
# or
|
|
59
|
+
yarn add neiki-editor
|
|
60
|
+
# or
|
|
61
|
+
pnpm add neiki-editor
|
|
44
62
|
```
|
|
45
63
|
|
|
46
64
|
### Self-hosted
|
|
47
65
|
|
|
48
|
-
Download `neiki-editor.js`
|
|
66
|
+
Download `neiki-editor.min.js` (includes CSS) or `neiki-editor.js` + `neiki-editor.css` separately:
|
|
49
67
|
|
|
50
68
|
```html
|
|
69
|
+
<!-- Single file (recommended) -->
|
|
70
|
+
<script src="path/to/neiki-editor.min.js"></script>
|
|
71
|
+
|
|
72
|
+
<!-- Or separate files -->
|
|
51
73
|
<link rel="stylesheet" href="path/to/neiki-editor.css">
|
|
52
74
|
<script src="path/to/neiki-editor.js"></script>
|
|
53
75
|
```
|
|
@@ -79,6 +101,8 @@ const editor = new NeikiEditor('#editor', {
|
|
|
79
101
|
spellcheck: true,
|
|
80
102
|
readonly: false,
|
|
81
103
|
theme: 'light', // 'light' or 'dark'
|
|
104
|
+
language: 'en', // 'en', 'cs', or custom via addTranslation()
|
|
105
|
+
translations: null, // custom translation keys (merged with built-in)
|
|
82
106
|
toolbar: [
|
|
83
107
|
'viewCode', 'undo', 'redo', 'findReplace', '|',
|
|
84
108
|
'bold', 'italic', 'underline', 'strikethrough', 'superscript', 'subscript', 'removeFormat', '|',
|
|
@@ -113,7 +137,8 @@ const editor = new NeikiEditor('#editor', {
|
|
|
113
137
|
| `spellcheck` | `boolean` | `true` | Enable browser spellcheck |
|
|
114
138
|
| `readonly` | `boolean` | `false` | Make editor read-only |
|
|
115
139
|
| `theme` | `string` | `'light'` | `'light'` or `'dark'` |
|
|
116
|
-
| `language` | `string` | `'en'` | UI language
|
|
140
|
+
| `language` | `string` | `'en'` | UI language — `en`, `cs`, `zh`, `es`, `de`, `fr`, `pt`, `ja` |
|
|
141
|
+
| `translations` | `object\|null` | `null` | Custom translation keys (merged with built-in) |
|
|
117
142
|
| `toolbar` | `array` | *(see above)* | Toolbar button configuration |
|
|
118
143
|
| `onChange` | `function\|null` | `null` | Callback on content change |
|
|
119
144
|
| `onSave` | `function\|null` | `null` | Callback on save (triggered by Ctrl+S or More menu → Save) |
|
|
@@ -238,6 +263,12 @@ Neiki Editor supports multiple UI languages. Built-in:
|
|
|
238
263
|
|
|
239
264
|
- **English** (`en`) — default
|
|
240
265
|
- **Czech** (`cs`)
|
|
266
|
+
- **Chinese** (`zh`)
|
|
267
|
+
- **Spanish** (`es`)
|
|
268
|
+
- **German** (`de`)
|
|
269
|
+
- **French** (`fr`)
|
|
270
|
+
- **Portuguese** (`pt`)
|
|
271
|
+
- **Japanese** (`ja`)
|
|
241
272
|
|
|
242
273
|
### Set language on init:
|
|
243
274
|
|
|
@@ -606,8 +637,10 @@ function NeikiEditorComponent({ value, onChange }) {
|
|
|
606
637
|
```
|
|
607
638
|
neiki-editor/
|
|
608
639
|
├── dist/
|
|
609
|
-
│ ├── neiki-editor.js
|
|
610
|
-
│
|
|
640
|
+
│ ├── neiki-editor.min.js # Minified editor + embedded CSS (recommended)
|
|
641
|
+
│ ├── neiki-editor.min.css # Minified styles
|
|
642
|
+
│ ├── neiki-editor.js # Editor core (unminified)
|
|
643
|
+
│ └── neiki-editor.css # Editor styles (unminified)
|
|
611
644
|
├── demo/
|
|
612
645
|
│ └── index.html # Interactive demo page
|
|
613
646
|
│ └── logo.png # Demo logo
|
package/dist/neiki-editor.css
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* NeikiEditor - Production-Ready WYSIWYG Rich Text Editor
|
|
3
3
|
* CSS Stylesheet
|
|
4
|
-
* Version:
|
|
4
|
+
* Version: 2.5.0
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
/* ============================================
|
|
@@ -980,6 +980,15 @@
|
|
|
980
980
|
border-top: 1px solid var(--neiki-border-color);
|
|
981
981
|
}
|
|
982
982
|
|
|
983
|
+
.neiki-modal-footer .neiki-btn {
|
|
984
|
+
width: auto;
|
|
985
|
+
height: 38px;
|
|
986
|
+
padding: 0 16px;
|
|
987
|
+
font-size: 14px;
|
|
988
|
+
font-weight: 500;
|
|
989
|
+
border-radius: 6px;
|
|
990
|
+
}
|
|
991
|
+
|
|
983
992
|
/* Form Elements */
|
|
984
993
|
.neiki-form-group {
|
|
985
994
|
margin-bottom: 16px;
|