@lobehub/editor 1.5.5 → 1.5.7
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 +19 -19
- package/es/plugins/common/plugin/index.js +2 -2
- package/es/utils/debug.js +3 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -8,17 +8,17 @@
|
|
|
8
8
|
|
|
9
9
|
A modern, extensible rich text editor built on Meta's Lexical framework with dual-architecture design, featuring both a powerful kernel and React integration. Optimized for AI applications and chat interfaces.
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
[Changelog](./CHANGELOG.md) ·
|
|
11
|
+
[![][npm-release-shield]][npm-release-link]
|
|
12
|
+
[![][github-releasedate-shield]][github-releasedate-link]
|
|
13
|
+
[![][github-action-test-shield]][github-action-test-link]
|
|
14
|
+
[![][github-action-release-shield]][github-action-release-link]<br/>
|
|
15
|
+
[![][github-contributors-shield]][github-contributors-link]
|
|
16
|
+
[![][github-forks-shield]][github-forks-link]
|
|
17
|
+
[![][github-stars-shield]][github-stars-link]
|
|
18
|
+
[![][github-issues-shield]][github-issues-link]
|
|
19
|
+
[![][github-license-shield]][github-license-link]
|
|
20
|
+
|
|
21
|
+
[Changelog](./CHANGELOG.md) · [Report Bug][github-issues-link] · [Request Feature][github-issues-link]
|
|
22
22
|
|
|
23
23
|

|
|
24
24
|
|
|
@@ -70,7 +70,7 @@ A modern, extensible rich text editor built on Meta's Lexical framework with dua
|
|
|
70
70
|
|
|
71
71
|
To install `@lobehub/editor`, run the following command:
|
|
72
72
|
|
|
73
|
-
|
|
73
|
+
[![][bun-shield]][bun-link]
|
|
74
74
|
|
|
75
75
|
```bash
|
|
76
76
|
$ bun add @lobehub/editor
|
|
@@ -82,7 +82,7 @@ $ pnpm add @lobehub/editor
|
|
|
82
82
|
|
|
83
83
|
<div align="right">
|
|
84
84
|
|
|
85
|
-
[
|
|
85
|
+
[![\][back-to-top\]](#readme-top)
|
|
86
86
|
|
|
87
87
|
</div>
|
|
88
88
|
|
|
@@ -231,7 +231,7 @@ editor.dispatchCommand(INSERT_HEADING_COMMAND, { tag: 'h2' });
|
|
|
231
231
|
|
|
232
232
|
<div align="right">
|
|
233
233
|
|
|
234
|
-
[
|
|
234
|
+
[![\][back-to-top\]](#readme-top)
|
|
235
235
|
|
|
236
236
|
</div>
|
|
237
237
|
|
|
@@ -390,7 +390,7 @@ CLEAR_FORMAT_COMMAND;
|
|
|
390
390
|
|
|
391
391
|
<div align="right">
|
|
392
392
|
|
|
393
|
-
[
|
|
393
|
+
[![\][back-to-top\]](#readme-top)
|
|
394
394
|
|
|
395
395
|
</div>
|
|
396
396
|
|
|
@@ -400,11 +400,11 @@ CLEAR_FORMAT_COMMAND;
|
|
|
400
400
|
|
|
401
401
|
You can use Github Codespaces for online development:
|
|
402
402
|
|
|
403
|
-
|
|
403
|
+
[![][github-codespace-shield]][github-codespace-link]
|
|
404
404
|
|
|
405
405
|
Or clone it for local development:
|
|
406
406
|
|
|
407
|
-
|
|
407
|
+
[![][bun-shield]][bun-link]
|
|
408
408
|
|
|
409
409
|
```bash
|
|
410
410
|
$ git clone https://github.com/lobehub/lobe-editor.git
|
|
@@ -471,7 +471,7 @@ DEBUG=lobe-editor:kernel,lobe-editor:plugin:*
|
|
|
471
471
|
|
|
472
472
|
#### Development Usage
|
|
473
473
|
|
|
474
|
-
|
|
474
|
+
```bash
|
|
475
475
|
# Full debug during development
|
|
476
476
|
DEBUG=lobe-editor:*
|
|
477
477
|
|
|
@@ -685,4 +685,4 @@ This project is [MIT](./LICENSE) licensed.
|
|
|
685
685
|
[pr-welcome-link]: https://github.com/lobehub/lobe-editor/pulls
|
|
686
686
|
[pr-welcome-shield]: https://img.shields.io/badge/%F0%9F%A4%AF%20PR%20WELCOME-%E2%86%92-ffcb47?labelColor=black&style=for-the-badge
|
|
687
687
|
[profile-link]: https://github.com/lobehub
|
|
688
|
-
|
|
688
|
+
|
|
@@ -202,7 +202,7 @@ export var CommonPlugin = (_class = /*#__PURE__*/function (_KernelPlugin) {
|
|
|
202
202
|
ctx.appendLine('_');
|
|
203
203
|
}
|
|
204
204
|
if (isUnderline) {
|
|
205
|
-
ctx.appendLine('<
|
|
205
|
+
ctx.appendLine('<ins>');
|
|
206
206
|
}
|
|
207
207
|
var textContent = node.getTextContent();
|
|
208
208
|
var res = textContent.match(/\s+$/);
|
|
@@ -214,7 +214,7 @@ export var CommonPlugin = (_class = /*#__PURE__*/function (_KernelPlugin) {
|
|
|
214
214
|
var lastChar = append.at(-1);
|
|
215
215
|
ctx.appendLine(append);
|
|
216
216
|
if (isUnderline) {
|
|
217
|
-
ctx.appendLine('</
|
|
217
|
+
ctx.appendLine('</ins>');
|
|
218
218
|
}
|
|
219
219
|
if (isItalic) {
|
|
220
220
|
ctx.appendLine('_');
|
package/es/utils/debug.js
CHANGED
|
@@ -147,7 +147,7 @@ export var debugLogger = new DebugLogger();
|
|
|
147
147
|
*/
|
|
148
148
|
if (typeof window !== 'undefined') {
|
|
149
149
|
// Check for server-side DEBUG environment variable (passed through build process)
|
|
150
|
-
var envDebug = process.env.DEBUG;
|
|
150
|
+
var envDebug = typeof process !== 'undefined' ? process.env.DEBUG : undefined;
|
|
151
151
|
|
|
152
152
|
// Simple logic: Environment variable takes precedence, then development mode
|
|
153
153
|
var debugConfig = null;
|
|
@@ -293,7 +293,7 @@ export var browserDebug = {
|
|
|
293
293
|
*/
|
|
294
294
|
getConfig: function getConfig() {
|
|
295
295
|
if (typeof window !== 'undefined') {
|
|
296
|
-
var _envDebug = process.env.DEBUG;
|
|
296
|
+
var _envDebug = typeof process !== 'undefined' ? process.env.DEBUG : undefined;
|
|
297
297
|
var currentDebug = localStorage.getItem('debug');
|
|
298
298
|
if (_envDebug) {
|
|
299
299
|
return {
|
|
@@ -313,7 +313,7 @@ export var browserDebug = {
|
|
|
313
313
|
}
|
|
314
314
|
}
|
|
315
315
|
return {
|
|
316
|
-
enabled: process.env.DEBUG || false,
|
|
316
|
+
enabled: (typeof process !== 'undefined' ? process.env.DEBUG : undefined) || false,
|
|
317
317
|
source: 'server-side'
|
|
318
318
|
};
|
|
319
319
|
},
|
package/package.json
CHANGED