@wangeditor-next/code-highlight 1.1.0 → 1.2.0
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/CHANGELOG.md +85 -0
- package/LICENSE +21 -0
- package/dist/code-highlight/src/vendor/prism.d.ts +1 -0
- package/dist/css/style.css +78 -1
- package/dist/index.esm.js +4827 -18
- package/dist/index.js +4839 -19
- package/package.json +3 -2
- package/dist/index.esm.js.map +0 -1
- package/dist/index.js.map +0 -1
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
# Change Log
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
|
+
|
|
6
|
+
# [1.2.0](https://github.com/cycleccc/wangEditor/compare/@wangeditor-next/code-highlight@1.1.0...@wangeditor-next/code-highlight@1.2.0) (2024-05-30)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* ** issue 5872 :** 文本高亮添加 abap 支持 ([cbb0524](https://github.com/cycleccc/wangEditor/commit/cbb05248968b3a9994979c595c23dbdc7c378b7e))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
# 1.1.0 (2024-05-19)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Bug Fixes
|
|
21
|
+
|
|
22
|
+
* 代码块 - 增加 lua groovy 语言 ([ef4f62a](https://github.com/cycleccc/wangEditor/commit/ef4f62a876e95995f7c8f6f41d8d44b2505dd5f6))
|
|
23
|
+
* 更新各包之间依赖版本 ([75c552c](https://github.com/cycleccc/wangEditor/commit/75c552cc8ed54765bebb86a7ec5329a7fc79e85f))
|
|
24
|
+
* 修复 pnpm 安装 @wangeditor/editor 出现警告的问题 ([4087fbe](https://github.com/cycleccc/wangEditor/commit/4087fbee01c76bdd55e747a5e86c5e4a8d6a8353))
|
|
25
|
+
* 移除了每个包下的 publishConfig directory 配置 ([16559f0](https://github.com/cycleccc/wangEditor/commit/16559f052545c111318be760e64291a521bdcc65))
|
|
26
|
+
* 粘贴 <code> 代码块出错 ([fc44d9f](https://github.com/cycleccc/wangEditor/commit/fc44d9ff36cb9566d9dc5490b4be14f2e5bd3f3c))
|
|
27
|
+
* issue 4308 - 自定义字号、字体无法回显 ([ad38b8c](https://github.com/cycleccc/wangEditor/commit/ad38b8ce6dbcff1d65785c8d6701238ad351f562))
|
|
28
|
+
* rename es module filename ([1821d4e](https://github.com/cycleccc/wangEditor/commit/1821d4eef49e64efcb41b848849ca7a5e6472044))
|
|
29
|
+
* table - elemToHtml ([e36e609](https://github.com/cycleccc/wangEditor/commit/e36e6092ef721723169afc8bf0560a47ac9f4dfc))
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
### Features
|
|
33
|
+
|
|
34
|
+
* code highlight ([42b2f8d](https://github.com/cycleccc/wangEditor/commit/42b2f8d192e2433593c11ad0b8424737f6cffb58))
|
|
35
|
+
* i18n ([c11b244](https://github.com/cycleccc/wangEditor/commit/c11b2440f91b99d40bca18b675c66a22b6e160c9))
|
|
36
|
+
* parse html ([2a5eace](https://github.com/cycleccc/wangEditor/commit/2a5eace00f33cded50b68e8164748ec2480213fd))
|
|
37
|
+
* toHtml 机制 ([1c4d872](https://github.com/cycleccc/wangEditor/commit/1c4d8729f84aaab6a448f23064b34a20596305e9))
|
|
38
|
+
* upload video ([ac8e6f8](https://github.com/cycleccc/wangEditor/commit/ac8e6f8b5258e593714676a6f6be359ba525833c))
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
## [1.0.3](https://github.com/wangeditor-team/wangEditor/compare/@wangeditor/code-highlight@1.0.2...@wangeditor/code-highlight@1.0.3) (2022-09-14)
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
### Bug Fixes
|
|
48
|
+
|
|
49
|
+
* 代码块 - 增加 lua groovy 语言 ([ef4f62a](https://github.com/wangeditor-team/wangEditor/commit/ef4f62a876e95995f7c8f6f41d8d44b2505dd5f6))
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
## [1.0.2](https://github.com/wangeditor-team/wangEditor/compare/@wangeditor/code-highlight@1.0.1...@wangeditor/code-highlight@1.0.2) (2022-06-02)
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
### Bug Fixes
|
|
59
|
+
|
|
60
|
+
* issue 4308 - 自定义字号、字体无法回显 ([ad38b8c](https://github.com/wangeditor-team/wangEditor/commit/ad38b8ce6dbcff1d65785c8d6701238ad351f562))
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
## 1.0.1 (2022-04-18)
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
### Bug Fixes
|
|
70
|
+
|
|
71
|
+
* 更新各包之间依赖版本 ([75c552c](https://github.com/wangeditor-team/wangEditor/commit/75c552cc8ed54765bebb86a7ec5329a7fc79e85f))
|
|
72
|
+
* 修复 pnpm 安装 @wangeditor/editor 出现警告的问题 ([4087fbe](https://github.com/wangeditor-team/wangEditor/commit/4087fbee01c76bdd55e747a5e86c5e4a8d6a8353))
|
|
73
|
+
* 移除了每个包下的 publishConfig directory 配置 ([16559f0](https://github.com/wangeditor-team/wangEditor/commit/16559f052545c111318be760e64291a521bdcc65))
|
|
74
|
+
* 粘贴 <code> 代码块出错 ([fc44d9f](https://github.com/wangeditor-team/wangEditor/commit/fc44d9ff36cb9566d9dc5490b4be14f2e5bd3f3c))
|
|
75
|
+
* rename es module filename ([1821d4e](https://github.com/wangeditor-team/wangEditor/commit/1821d4eef49e64efcb41b848849ca7a5e6472044))
|
|
76
|
+
* table - elemToHtml ([e36e609](https://github.com/wangeditor-team/wangEditor/commit/e36e6092ef721723169afc8bf0560a47ac9f4dfc))
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
### Features
|
|
80
|
+
|
|
81
|
+
* code highlight ([42b2f8d](https://github.com/wangeditor-team/wangEditor/commit/42b2f8d192e2433593c11ad0b8424737f6cffb58))
|
|
82
|
+
* i18n ([c11b244](https://github.com/wangeditor-team/wangEditor/commit/c11b2440f91b99d40bca18b675c66a22b6e160c9))
|
|
83
|
+
* parse html ([2a5eace](https://github.com/wangeditor-team/wangEditor/commit/2a5eace00f33cded50b68e8164748ec2480213fd))
|
|
84
|
+
* toHtml 机制 ([1c4d872](https://github.com/wangeditor-team/wangEditor/commit/1c4d8729f84aaab6a448f23064b34a20596305e9))
|
|
85
|
+
* upload video ([ac8e6f8](https://github.com/wangeditor-team/wangEditor/commit/ac8e6f8b5258e593714676a6f6be359ba525833c))
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2021 - present wangEditor-team
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -22,6 +22,7 @@ import 'prismjs/components/prism-bash';
|
|
|
22
22
|
import 'prismjs/components/prism-markdown';
|
|
23
23
|
import 'prismjs/components/prism-lua';
|
|
24
24
|
import 'prismjs/components/prism-groovy';
|
|
25
|
+
import 'prismjs/components/prism-abap';
|
|
25
26
|
export declare const prismTokenTypes: string[];
|
|
26
27
|
/**
|
|
27
28
|
* 获取 prism token 的字符串长度
|
package/dist/css/style.css
CHANGED
|
@@ -1 +1,78 @@
|
|
|
1
|
-
.w-e-text-container [data-slate-editor] pre
|
|
1
|
+
.w-e-text-container [data-slate-editor] pre > code {
|
|
2
|
+
text-shadow: 0 1px white;
|
|
3
|
+
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
|
|
4
|
+
text-align: left;
|
|
5
|
+
white-space: pre;
|
|
6
|
+
word-spacing: normal;
|
|
7
|
+
word-break: normal;
|
|
8
|
+
word-wrap: normal;
|
|
9
|
+
line-height: 1.5;
|
|
10
|
+
-moz-tab-size: 4;
|
|
11
|
+
-o-tab-size: 4;
|
|
12
|
+
tab-size: 4;
|
|
13
|
+
-webkit-hyphens: none;
|
|
14
|
+
hyphens: none;
|
|
15
|
+
padding: 1em;
|
|
16
|
+
margin: 0.5em 0;
|
|
17
|
+
overflow: auto;
|
|
18
|
+
}
|
|
19
|
+
.w-e-text-container [data-slate-editor] pre > code .token.comment,
|
|
20
|
+
.w-e-text-container [data-slate-editor] pre > code .token.prolog,
|
|
21
|
+
.w-e-text-container [data-slate-editor] pre > code .token.doctype,
|
|
22
|
+
.w-e-text-container [data-slate-editor] pre > code .token.cdata {
|
|
23
|
+
color: slategray;
|
|
24
|
+
}
|
|
25
|
+
.w-e-text-container [data-slate-editor] pre > code .token.punctuation {
|
|
26
|
+
color: #999;
|
|
27
|
+
}
|
|
28
|
+
.w-e-text-container [data-slate-editor] pre > code .token.namespace {
|
|
29
|
+
opacity: 0.7;
|
|
30
|
+
}
|
|
31
|
+
.w-e-text-container [data-slate-editor] pre > code .token.property,
|
|
32
|
+
.w-e-text-container [data-slate-editor] pre > code .token.tag,
|
|
33
|
+
.w-e-text-container [data-slate-editor] pre > code .token.boolean,
|
|
34
|
+
.w-e-text-container [data-slate-editor] pre > code .token.number,
|
|
35
|
+
.w-e-text-container [data-slate-editor] pre > code .token.constant,
|
|
36
|
+
.w-e-text-container [data-slate-editor] pre > code .token.symbol,
|
|
37
|
+
.w-e-text-container [data-slate-editor] pre > code .token.deleted {
|
|
38
|
+
color: #905;
|
|
39
|
+
}
|
|
40
|
+
.w-e-text-container [data-slate-editor] pre > code .token.selector,
|
|
41
|
+
.w-e-text-container [data-slate-editor] pre > code .token.attr-name,
|
|
42
|
+
.w-e-text-container [data-slate-editor] pre > code .token.string,
|
|
43
|
+
.w-e-text-container [data-slate-editor] pre > code .token.char,
|
|
44
|
+
.w-e-text-container [data-slate-editor] pre > code .token.builtin,
|
|
45
|
+
.w-e-text-container [data-slate-editor] pre > code .token.inserted {
|
|
46
|
+
color: #690;
|
|
47
|
+
}
|
|
48
|
+
.w-e-text-container [data-slate-editor] pre > code .token.operator,
|
|
49
|
+
.w-e-text-container [data-slate-editor] pre > code .token.entity,
|
|
50
|
+
.w-e-text-container [data-slate-editor] pre > code .token.url,
|
|
51
|
+
.w-e-text-container [data-slate-editor] pre > code .language-css .token.string,
|
|
52
|
+
.w-e-text-container [data-slate-editor] pre > code .style .token.string {
|
|
53
|
+
color: #9a6e3a;
|
|
54
|
+
}
|
|
55
|
+
.w-e-text-container [data-slate-editor] pre > code .token.atrule,
|
|
56
|
+
.w-e-text-container [data-slate-editor] pre > code .token.attr-value,
|
|
57
|
+
.w-e-text-container [data-slate-editor] pre > code .token.keyword {
|
|
58
|
+
color: #07a;
|
|
59
|
+
}
|
|
60
|
+
.w-e-text-container [data-slate-editor] pre > code .token.function,
|
|
61
|
+
.w-e-text-container [data-slate-editor] pre > code .token.class-name {
|
|
62
|
+
color: #DD4A68;
|
|
63
|
+
}
|
|
64
|
+
.w-e-text-container [data-slate-editor] pre > code .token.regex,
|
|
65
|
+
.w-e-text-container [data-slate-editor] pre > code .token.important,
|
|
66
|
+
.w-e-text-container [data-slate-editor] pre > code .token.variable {
|
|
67
|
+
color: #e90;
|
|
68
|
+
}
|
|
69
|
+
.w-e-text-container [data-slate-editor] pre > code .token.important,
|
|
70
|
+
.w-e-text-container [data-slate-editor] pre > code .token.bold {
|
|
71
|
+
font-weight: bold;
|
|
72
|
+
}
|
|
73
|
+
.w-e-text-container [data-slate-editor] pre > code .token.italic {
|
|
74
|
+
font-style: italic;
|
|
75
|
+
}
|
|
76
|
+
.w-e-text-container [data-slate-editor] pre > code .token.entity {
|
|
77
|
+
cursor: help;
|
|
78
|
+
}
|