neiki-editor 2.9.3 → 2.9.5
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 +661 -21
- package/README.md +11 -9
- package/dist/neiki-editor.css +104 -2
- package/dist/neiki-editor.js +319 -36
- package/dist/neiki-editor.min.css +1 -1
- package/dist/neiki-editor.min.js +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
<img src="https://img.shields.io/badge/html5-%23E34F26.svg?style=for-the-badge&logo=html5&logoColor=white" alt="HTML5">
|
|
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
|
-
<img src="https://img.shields.io/badge/License-
|
|
14
|
-
<img src="https://img.shields.io/badge/Version-2.9.
|
|
13
|
+
<img src="https://img.shields.io/badge/License-AGPL--3.0-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.5-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">
|
|
@@ -62,7 +62,7 @@ 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.neikiri.dev/neiki-editor/2.9.
|
|
65
|
+
<script src="https://cdn.neikiri.dev/neiki-editor/2.9.5/neiki-editor.min.js"></script>
|
|
66
66
|
```
|
|
67
67
|
|
|
68
68
|
#### Load CSS and JS separately
|
|
@@ -73,8 +73,8 @@ Add this single line — CSS is included automatically, always the **latest vers
|
|
|
73
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.neikiri.dev/neiki-editor/2.9.
|
|
77
|
-
<script src="https://cdn.neikiri.dev/neiki-editor/2.9.
|
|
76
|
+
<link rel="stylesheet" href="https://cdn.neikiri.dev/neiki-editor/2.9.5/neiki-editor.css">
|
|
77
|
+
<script src="https://cdn.neikiri.dev/neiki-editor/2.9.5/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.
|
|
87
|
+
<script src="https://cdn.jsdelivr.net/gh/neikiri/neiki-editor@2.9.5/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.
|
|
95
|
-
<script src="https://cdn.jsdelivr.net/gh/neikiri/neiki-editor@2.9.
|
|
94
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/neikiri/neiki-editor@2.9.5/dist/neiki-editor.css">
|
|
95
|
+
<script src="https://cdn.jsdelivr.net/gh/neikiri/neiki-editor@2.9.5/dist/neiki-editor.js"></script>
|
|
96
96
|
```
|
|
97
97
|
|
|
98
98
|
#### Package Manager
|
|
@@ -147,6 +147,7 @@ const editor = new NeikiEditor('#editor', {
|
|
|
147
147
|
language: 'en', // 'en', 'cs', or custom via addTranslation()
|
|
148
148
|
translations: null, // custom translation keys (merged with built-in)
|
|
149
149
|
autosaveKey: null, // optional custom localStorage scope for autosave
|
|
150
|
+
custom_class: null, // optional custom CSS class for the content area
|
|
150
151
|
toolbar: [
|
|
151
152
|
'viewCode', 'undo', 'redo', 'findReplace', '|',
|
|
152
153
|
'bold', 'italic', 'underline', 'strikethrough', 'superscript', 'subscript', 'removeFormat', '|',
|
|
@@ -192,6 +193,7 @@ const editor = new NeikiEditor('#editor', {
|
|
|
192
193
|
| `onReady` | `function\|null` | `null` | Callback when editor is ready |
|
|
193
194
|
| `showHelp` | `boolean` | `true` | Show Help button in More menu (⋯) |
|
|
194
195
|
| `imageUploadHandler` | `function\|null` | `null` | Async callback `(file) => Promise<url>` for uploading images to a server/CDN instead of base64 |
|
|
196
|
+
| `custom_class` | `string\|null` | `null` | Custom CSS class appended to the editor content area (`neiki-content`) |
|
|
195
197
|
|
|
196
198
|
---
|
|
197
199
|
|
|
@@ -742,7 +744,7 @@ neiki-editor/
|
|
|
742
744
|
|
|
743
745
|
## 📄 License
|
|
744
746
|
|
|
745
|
-
This project is licensed under the
|
|
747
|
+
This project is licensed under the GNU Affero General Public License v3 — see the [LICENSE](LICENSE) file for details.
|
|
746
748
|
|
|
747
749
|
---
|
|
748
750
|
|
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: 2.9.
|
|
4
|
+
* Version: 2.9.5
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
/* ============================================
|
|
@@ -433,6 +433,7 @@
|
|
|
433
433
|
}
|
|
434
434
|
|
|
435
435
|
.neiki-content img {
|
|
436
|
+
display: inline-block;
|
|
436
437
|
max-width: 100%;
|
|
437
438
|
height: auto;
|
|
438
439
|
border-radius: 4px;
|
|
@@ -1141,6 +1142,84 @@
|
|
|
1141
1142
|
border-radius: 5px 0 0 5px;
|
|
1142
1143
|
}
|
|
1143
1144
|
|
|
1145
|
+
.neiki-image-upload-zone {
|
|
1146
|
+
position: relative;
|
|
1147
|
+
display: grid;
|
|
1148
|
+
justify-items: center;
|
|
1149
|
+
gap: 7px;
|
|
1150
|
+
padding: 24px 18px;
|
|
1151
|
+
border: 2px dashed var(--neiki-border-color);
|
|
1152
|
+
border-radius: 8px;
|
|
1153
|
+
background: var(--neiki-bg-secondary);
|
|
1154
|
+
color: var(--neiki-text-secondary);
|
|
1155
|
+
text-align: center;
|
|
1156
|
+
cursor: pointer;
|
|
1157
|
+
transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
|
|
1158
|
+
}
|
|
1159
|
+
|
|
1160
|
+
.neiki-image-upload-zone:hover,
|
|
1161
|
+
.neiki-image-upload-zone:focus-visible {
|
|
1162
|
+
border-color: var(--neiki-accent-color);
|
|
1163
|
+
background: var(--neiki-bg-primary);
|
|
1164
|
+
box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.12);
|
|
1165
|
+
outline: none;
|
|
1166
|
+
}
|
|
1167
|
+
|
|
1168
|
+
.neiki-image-upload-zone.drag-over {
|
|
1169
|
+
border-color: var(--neiki-accent-color);
|
|
1170
|
+
background: rgba(13, 110, 253, 0.08);
|
|
1171
|
+
}
|
|
1172
|
+
|
|
1173
|
+
.neiki-image-upload-zone.has-files {
|
|
1174
|
+
border-style: solid;
|
|
1175
|
+
border-color: var(--neiki-accent-color);
|
|
1176
|
+
}
|
|
1177
|
+
|
|
1178
|
+
.neiki-image-upload-input {
|
|
1179
|
+
position: absolute;
|
|
1180
|
+
width: 1px;
|
|
1181
|
+
height: 1px;
|
|
1182
|
+
opacity: 0;
|
|
1183
|
+
pointer-events: none;
|
|
1184
|
+
}
|
|
1185
|
+
|
|
1186
|
+
.neiki-image-upload-icon {
|
|
1187
|
+
width: 38px;
|
|
1188
|
+
height: 38px;
|
|
1189
|
+
color: var(--neiki-accent-color);
|
|
1190
|
+
}
|
|
1191
|
+
|
|
1192
|
+
.neiki-image-upload-icon svg {
|
|
1193
|
+
width: 100%;
|
|
1194
|
+
height: 100%;
|
|
1195
|
+
fill: currentColor;
|
|
1196
|
+
}
|
|
1197
|
+
|
|
1198
|
+
.neiki-image-upload-title {
|
|
1199
|
+
color: var(--neiki-text-primary);
|
|
1200
|
+
font-size: 14px;
|
|
1201
|
+
font-weight: 600;
|
|
1202
|
+
}
|
|
1203
|
+
|
|
1204
|
+
.neiki-image-upload-hint,
|
|
1205
|
+
.neiki-image-upload-files {
|
|
1206
|
+
max-width: 100%;
|
|
1207
|
+
color: var(--neiki-text-muted);
|
|
1208
|
+
font-size: 12px;
|
|
1209
|
+
line-height: 1.4;
|
|
1210
|
+
}
|
|
1211
|
+
|
|
1212
|
+
.neiki-image-upload-files {
|
|
1213
|
+
overflow: hidden;
|
|
1214
|
+
text-overflow: ellipsis;
|
|
1215
|
+
white-space: nowrap;
|
|
1216
|
+
}
|
|
1217
|
+
|
|
1218
|
+
.neiki-image-upload-zone.has-files .neiki-image-upload-files {
|
|
1219
|
+
color: var(--neiki-accent-color);
|
|
1220
|
+
font-weight: 500;
|
|
1221
|
+
}
|
|
1222
|
+
|
|
1144
1223
|
.neiki-form-row {
|
|
1145
1224
|
display: flex;
|
|
1146
1225
|
gap: 16px;
|
|
@@ -1513,7 +1592,7 @@
|
|
|
1513
1592
|
Floating Selection Toolbar
|
|
1514
1593
|
============================================ */
|
|
1515
1594
|
.neiki-floating-toolbar {
|
|
1516
|
-
position:
|
|
1595
|
+
position: fixed;
|
|
1517
1596
|
z-index: 1000;
|
|
1518
1597
|
display: none;
|
|
1519
1598
|
background: var(--neiki-bg-primary);
|
|
@@ -1975,6 +2054,29 @@
|
|
|
1975
2054
|
font-size: 16px; /* Prevents iOS zoom on focus */
|
|
1976
2055
|
}
|
|
1977
2056
|
|
|
2057
|
+
.neiki-image-upload-zone {
|
|
2058
|
+
grid-template-columns: 32px 1fr;
|
|
2059
|
+
justify-items: start;
|
|
2060
|
+
gap: 4px 10px;
|
|
2061
|
+
padding: 14px;
|
|
2062
|
+
text-align: left;
|
|
2063
|
+
}
|
|
2064
|
+
|
|
2065
|
+
.neiki-image-upload-icon {
|
|
2066
|
+
grid-row: span 3;
|
|
2067
|
+
width: 30px;
|
|
2068
|
+
height: 30px;
|
|
2069
|
+
}
|
|
2070
|
+
|
|
2071
|
+
.neiki-image-upload-title {
|
|
2072
|
+
font-size: 13px;
|
|
2073
|
+
}
|
|
2074
|
+
|
|
2075
|
+
.neiki-image-upload-hint,
|
|
2076
|
+
.neiki-image-upload-files {
|
|
2077
|
+
font-size: 11px;
|
|
2078
|
+
}
|
|
2079
|
+
|
|
1978
2080
|
.neiki-find-replace {
|
|
1979
2081
|
width: 100%;
|
|
1980
2082
|
border-radius: 0;
|