neiki-editor 3.0.2 → 3.0.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 +7 -7
- package/dist/neiki-editor.css +1 -1
- package/dist/neiki-editor.js +10 -3
- package/dist/neiki-editor.min.js +1 -1
- package/package.json +1 -1
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-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-3.0.
|
|
14
|
+
<img src="https://img.shields.io/badge/Version-3.0.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">
|
|
@@ -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/3.0.
|
|
65
|
+
<script src="https://cdn.neikiri.dev/neiki-editor/3.0.3/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/3.0.
|
|
77
|
-
<script src="https://cdn.neikiri.dev/neiki-editor/3.0.
|
|
76
|
+
<link rel="stylesheet" href="https://cdn.neikiri.dev/neiki-editor/3.0.3/neiki-editor.css">
|
|
77
|
+
<script src="https://cdn.neikiri.dev/neiki-editor/3.0.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@3.0.
|
|
87
|
+
<script src="https://cdn.jsdelivr.net/gh/neikiri/neiki-editor@3.0.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@3.0.
|
|
95
|
-
<script src="https://cdn.jsdelivr.net/gh/neikiri/neiki-editor@3.0.
|
|
94
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/neikiri/neiki-editor@3.0.3/dist/neiki-editor.css">
|
|
95
|
+
<script src="https://cdn.jsdelivr.net/gh/neikiri/neiki-editor@3.0.3/dist/neiki-editor.js"></script>
|
|
96
96
|
```
|
|
97
97
|
|
|
98
98
|
#### Package Manager
|
package/dist/neiki-editor.css
CHANGED
package/dist/neiki-editor.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* NeikiEditor - A Modern WYSIWYG Editor
|
|
3
|
-
* Version: 3.0.
|
|
3
|
+
* Version: 3.0.3
|
|
4
4
|
*
|
|
5
5
|
* A lightweight, feature-rich text editor with support for:
|
|
6
6
|
* - Rich text formatting (bold, italic, underline, etc.)
|
|
@@ -2891,7 +2891,7 @@
|
|
|
2891
2891
|
<img src="https://github.com/neikiri/neiki-editor/raw/main/assets/logo.png" alt="Neiki's Editor" style="width: 240px; height: auto; margin: 0 auto 16px; display: block;">
|
|
2892
2892
|
<div style="font-size: 14px; line-height: 2; color: var(--neiki-text-primary);">
|
|
2893
2893
|
<div><strong>${Utils.escapeHTML(t('help.author'))}:</strong> neikiri (Jindřich Stoklasa)</div>
|
|
2894
|
-
<div><strong>${Utils.escapeHTML(t('help.version'))}:</strong> 3.0.
|
|
2894
|
+
<div><strong>${Utils.escapeHTML(t('help.version'))}:</strong> 3.0.3</div>
|
|
2895
2895
|
<div><strong>${Utils.escapeHTML(t('help.github'))}:</strong> <a href="https://github.com/neikiri/neiki-editor" target="_blank" rel="noopener noreferrer" style="color: var(--neiki-accent);">github.com/neikiri/neiki-editor</a></div>
|
|
2896
2896
|
<div><strong>${Utils.escapeHTML(t('help.documentation'))}:</strong> <a href="https://github.com/neikiri/neiki-editor/wiki" target="_blank" rel="noopener noreferrer" style="color: var(--neiki-accent);">Wiki</a></div>
|
|
2897
2897
|
</div>
|
|
@@ -5124,7 +5124,14 @@
|
|
|
5124
5124
|
// Remove grip handles, placeholders, resize handles
|
|
5125
5125
|
clone.querySelectorAll('.neiki-block-grip, .neiki-block-placeholder, .neiki-table-col-resize-handle, .neiki-img-resize-handle, .neiki-img-size-label, .neiki-img-toolbar').forEach(el => el.remove());
|
|
5126
5126
|
this.removeStrayGripSvgs(clone);
|
|
5127
|
-
|
|
5127
|
+
const html = clone.innerHTML;
|
|
5128
|
+
// Return empty string when the editor contains only the default empty
|
|
5129
|
+
// block that browsers insert automatically (e.g. <p><br></p>).
|
|
5130
|
+
// This prevents a blank-looking editor from submitting a non-empty value.
|
|
5131
|
+
if (/^(\s|<p>(\s| |<br\s*\/?>)*<\/p>|<br\s*\/?>)*$/i.test(html)) {
|
|
5132
|
+
return '';
|
|
5133
|
+
}
|
|
5134
|
+
return html;
|
|
5128
5135
|
}
|
|
5129
5136
|
|
|
5130
5137
|
removeStrayGripSvgs(root = this.contentArea) {
|