neiki-editor 2.9.2 → 2.9.3

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 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.9.2-2563EB?style=for-the-badge&logo=semantic-release&logoColor=white&labelColor=000F15&logoWidth=20" alt="Version">
14
+ <img src="https://img.shields.io/badge/Version-2.9.3-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,7 +38,7 @@
38
38
 
39
39
  ---
40
40
 
41
- **Live version:** [https://neiki.eu/editor](https://neiki.eu/editor)
41
+ **Live version:** [https://neikiri.dev/editor](https://neikiri.dev/editor)
42
42
 
43
43
  ---
44
44
 
@@ -52,7 +52,7 @@ Most WYSIWYG editors either pull in a tree of dependencies or force you into a h
52
52
  Add this single line — CSS is included automatically, always the **latest version**:
53
53
 
54
54
  ```html
55
- <script src="https://cdn.neiki.eu/neiki-editor/neiki-editor.min.js"></script>
55
+ <script src="https://cdn.neikiri.dev/neiki-editor/neiki-editor.min.js"></script>
56
56
  ```
57
57
 
58
58
  <details>
@@ -62,19 +62,19 @@ Add this single line — CSS is included automatically, always the **latest vers
62
62
  #### Pin a specific version
63
63
 
64
64
  ```html
65
- <script src="https://cdn.neiki.eu/neiki-editor/2.9.2/neiki-editor.min.js"></script>
65
+ <script src="https://cdn.neikiri.dev/neiki-editor/2.9.3/neiki-editor.min.js"></script>
66
66
  ```
67
67
 
68
68
  #### Load CSS and JS separately
69
69
 
70
70
  ```html
71
71
  <!-- Latest -->
72
- <link rel="stylesheet" href="https://cdn.neiki.eu/neiki-editor/neiki-editor.css">
73
- <script src="https://cdn.neiki.eu/neiki-editor/neiki-editor.js"></script>
72
+ <link rel="stylesheet" href="https://cdn.neikiri.dev/neiki-editor/neiki-editor.css">
73
+ <script src="https://cdn.neikiri.dev/neiki-editor/neiki-editor.js"></script>
74
74
 
75
75
  <!-- Or pinned -->
76
- <link rel="stylesheet" href="https://cdn.neiki.eu/neiki-editor/2.9.2/neiki-editor.css">
77
- <script src="https://cdn.neiki.eu/neiki-editor/2.9.2/neiki-editor.js"></script>
76
+ <link rel="stylesheet" href="https://cdn.neikiri.dev/neiki-editor/2.9.3/neiki-editor.css">
77
+ <script src="https://cdn.neikiri.dev/neiki-editor/2.9.3/neiki-editor.js"></script>
78
78
  ```
79
79
 
80
80
  #### Alternative CDN — jsDelivr
@@ -84,15 +84,15 @@ Add this single line — CSS is included automatically, always the **latest vers
84
84
  <script src="https://cdn.jsdelivr.net/gh/neikiri/neiki-editor@latest/dist/neiki-editor.min.js"></script>
85
85
 
86
86
  <!-- Pinned -->
87
- <script src="https://cdn.jsdelivr.net/gh/neikiri/neiki-editor@2.9.2/dist/neiki-editor.min.js"></script>
87
+ <script src="https://cdn.jsdelivr.net/gh/neikiri/neiki-editor@2.9.3/dist/neiki-editor.min.js"></script>
88
88
 
89
89
  <!-- Separate files (latest) -->
90
90
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/neikiri/neiki-editor@latest/dist/neiki-editor.css">
91
91
  <script src="https://cdn.jsdelivr.net/gh/neikiri/neiki-editor@latest/dist/neiki-editor.js"></script>
92
92
 
93
93
  <!-- Separate files (pinned) -->
94
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/neikiri/neiki-editor@2.9.2/dist/neiki-editor.css">
95
- <script src="https://cdn.jsdelivr.net/gh/neikiri/neiki-editor@2.9.2/dist/neiki-editor.js"></script>
94
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/neikiri/neiki-editor@2.9.3/dist/neiki-editor.css">
95
+ <script src="https://cdn.jsdelivr.net/gh/neikiri/neiki-editor@2.9.3/dist/neiki-editor.js"></script>
96
96
  ```
97
97
 
98
98
  #### Package Manager
@@ -146,6 +146,7 @@ const editor = new NeikiEditor('#editor', {
146
146
  theme: 'light', // 'light' or 'dark'
147
147
  language: 'en', // 'en', 'cs', or custom via addTranslation()
148
148
  translations: null, // custom translation keys (merged with built-in)
149
+ autosaveKey: null, // optional custom localStorage scope for autosave
149
150
  toolbar: [
150
151
  'viewCode', 'undo', 'redo', 'findReplace', '|',
151
152
  'bold', 'italic', 'underline', 'strikethrough', 'superscript', 'subscript', 'removeFormat', '|',
@@ -182,6 +183,7 @@ const editor = new NeikiEditor('#editor', {
182
183
  | `theme` | `string` | `'light'` | `'light'` or `'dark'` |
183
184
  | `language` | `string` | `'en'` | UI language — `en`, `cs`, `zh`, `es`, `de`, `fr`, `pt`, `ja` |
184
185
  | `translations` | `object\|null` | `null` | Custom translation keys (merged with built-in) |
186
+ | `autosaveKey` | `string\|null` | `null` | Custom `localStorage` scope for autosave content and enabled state |
185
187
  | `toolbar` | `array` | *(see above)* | Toolbar button configuration |
186
188
  | `onChange` | `function\|null` | `null` | Callback on content change |
187
189
  | `onSave` | `function\|null` | `null` | Callback on save (triggered by Ctrl+S or More menu → Save) |
@@ -365,6 +367,15 @@ Autosave is accessible from the **More menu** (⋯) in the default toolbar. When
365
367
  - Content is saved to `localStorage` on every content change (debounced)
366
368
  - The status bar shows "Autosaving..." / "Saved locally"
367
369
  - Content is restored on page reload **only when autosave was enabled**
370
+ - Autosave keys are scoped by page URL and editor identity by default, so multiple editors do not overwrite each other
371
+
372
+ For apps where the same URL can edit different records, pass a custom `autosaveKey`:
373
+
374
+ ```javascript
375
+ new NeikiEditor('#editor', {
376
+ autosaveKey: 'article-42'
377
+ });
378
+ ```
368
379
 
369
380
  > **Note:** For production use (CMS, blog, etc.), use the `onSave` callback or `onChange` callback to save content to your database instead.
370
381
 
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * NeikiEditor - Production-Ready WYSIWYG Rich Text Editor
3
3
  * CSS Stylesheet
4
- * Version: 2.9.2
4
+ * Version: 2.9.3
5
5
  */
6
6
 
7
7
  /* ============================================