neiki-editor 3.0.0 → 3.0.1
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 +35 -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.1-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.1/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.1/neiki-editor.css">
|
|
77
|
+
<script src="https://cdn.neikiri.dev/neiki-editor/3.0.1/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.1/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.1/dist/neiki-editor.css">
|
|
95
|
+
<script src="https://cdn.jsdelivr.net/gh/neikiri/neiki-editor@3.0.1/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.1
|
|
4
4
|
*
|
|
5
5
|
* A lightweight, feature-rich text editor with support for:
|
|
6
6
|
* - Rich text formatting (bold, italic, underline, etc.)
|
|
@@ -2801,7 +2801,7 @@
|
|
|
2801
2801
|
<img src="https://github.com/neikiri/neiki-editor/raw/main/logo.png" alt="Neiki's Editor" style="width: 120px; height: auto; margin: 0 auto 16px; display: block;">
|
|
2802
2802
|
<div style="font-size: 14px; line-height: 2; color: var(--neiki-text-primary);">
|
|
2803
2803
|
<div><strong>${Utils.escapeHTML(t('help.author'))}:</strong> neikiri (Jindřich Stoklasa)</div>
|
|
2804
|
-
<div><strong>${Utils.escapeHTML(t('help.version'))}:</strong> 3.0.
|
|
2804
|
+
<div><strong>${Utils.escapeHTML(t('help.version'))}:</strong> 3.0.1</div>
|
|
2805
2805
|
<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>
|
|
2806
2806
|
<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>
|
|
2807
2807
|
</div>
|
|
@@ -5127,7 +5127,39 @@
|
|
|
5127
5127
|
|
|
5128
5128
|
const voidTags = new Set(['area', 'base', 'br', 'col', 'embed', 'hr', 'img', 'input', 'link', 'meta', 'param', 'source', 'track', 'wbr']);
|
|
5129
5129
|
const blockTags = new Set(['article', 'aside', 'blockquote', 'caption', 'colgroup', 'div', 'figure', 'figcaption', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'header', 'hr', 'li', 'main', 'ol', 'p', 'pre', 'section', 'table', 'tbody', 'td', 'tfoot', 'th', 'thead', 'tr', 'ul', 'video']);
|
|
5130
|
-
const tokens =
|
|
5130
|
+
const tokens = [];
|
|
5131
|
+
let index = 0;
|
|
5132
|
+
|
|
5133
|
+
while (index < input.length) {
|
|
5134
|
+
const tagStart = input.indexOf('<', index);
|
|
5135
|
+
|
|
5136
|
+
if (tagStart === -1) {
|
|
5137
|
+
tokens.push(input.slice(index));
|
|
5138
|
+
break;
|
|
5139
|
+
}
|
|
5140
|
+
|
|
5141
|
+
if (tagStart > index) {
|
|
5142
|
+
tokens.push(input.slice(index, tagStart));
|
|
5143
|
+
}
|
|
5144
|
+
|
|
5145
|
+
if (input.slice(tagStart, tagStart + 4) === '<!--') {
|
|
5146
|
+
const commentEnd = input.indexOf('-->', tagStart + 4);
|
|
5147
|
+
const end = commentEnd === -1 ? input.length : commentEnd + 3;
|
|
5148
|
+
tokens.push(input.slice(tagStart, end));
|
|
5149
|
+
index = end;
|
|
5150
|
+
continue;
|
|
5151
|
+
}
|
|
5152
|
+
|
|
5153
|
+
const tagEnd = Utils.findTagEnd(input, tagStart + 1);
|
|
5154
|
+
if (tagEnd === -1) {
|
|
5155
|
+
tokens.push(input.slice(tagStart));
|
|
5156
|
+
break;
|
|
5157
|
+
}
|
|
5158
|
+
|
|
5159
|
+
tokens.push(input.slice(tagStart, tagEnd + 1));
|
|
5160
|
+
index = tagEnd + 1;
|
|
5161
|
+
}
|
|
5162
|
+
|
|
5131
5163
|
const lines = [];
|
|
5132
5164
|
let indent = 0;
|
|
5133
5165
|
let inlineDepth = 0;
|