@lambo-design/wang-editor 1.0.0-beta.11 → 1.0.0-beta.12
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/package.json +3 -6
- package/src/index.vue +4 -2
- package/src/js/wang-editor.js +4703 -0
- package/src/styles/css/index.less +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lambo-design/wang-editor",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.12",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"author": "lambo",
|
|
@@ -9,12 +9,9 @@
|
|
|
9
9
|
"access": "public",
|
|
10
10
|
"registry": "https://registry.npmjs.org/"
|
|
11
11
|
},
|
|
12
|
-
"dependencies": {
|
|
13
|
-
"wangeditor": "^3.1.1"
|
|
14
|
-
},
|
|
15
12
|
"devDependencies": {
|
|
16
|
-
"@lambo-design/core": "^4.7.1-beta.
|
|
17
|
-
"@lambo-design/shared": "^1.0.0-beta.
|
|
13
|
+
"@lambo-design/core": "^4.7.1-beta.169",
|
|
14
|
+
"@lambo-design/shared": "^1.0.0-beta.298"
|
|
18
15
|
},
|
|
19
16
|
"scripts": {
|
|
20
17
|
"release": "pnpm release-beta && git push --follow-tags && pnpm re-publish",
|
package/src/index.vue
CHANGED
|
@@ -101,7 +101,7 @@ export default {
|
|
|
101
101
|
},
|
|
102
102
|
mounted() {
|
|
103
103
|
let self = this;
|
|
104
|
-
const Editor = require('
|
|
104
|
+
const Editor = require('./js/wang-editor.js')
|
|
105
105
|
self.editor = new Editor(`#${this.editorId}`)
|
|
106
106
|
self.editor.customConfig.onchange = (html) => {
|
|
107
107
|
let text = self.editor.txt.text()
|
|
@@ -159,6 +159,7 @@ export default {
|
|
|
159
159
|
self.editor.customConfig.menus = [
|
|
160
160
|
'head', // 标题
|
|
161
161
|
'bold', // 粗体
|
|
162
|
+
'hr', //分割线
|
|
162
163
|
'fontSize', // 字号
|
|
163
164
|
'fontName', // 字体
|
|
164
165
|
'italic', // 斜体
|
|
@@ -189,7 +190,8 @@ export default {
|
|
|
189
190
|
'#7b5ba1',
|
|
190
191
|
'#46acc8',
|
|
191
192
|
'#f9963b',
|
|
192
|
-
'#ffffff'
|
|
193
|
+
'#ffffff',
|
|
194
|
+
'#FF0000'
|
|
193
195
|
]
|
|
194
196
|
if (!this.preservePasteStyle) {
|
|
195
197
|
self.editor.customConfig.pasteTextHandle = function (content) {
|