@jx3box/jx3box-editor 1.7.0 → 1.7.2
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/assets/css/markdown.less
CHANGED
|
@@ -49,14 +49,14 @@
|
|
|
49
49
|
|
|
50
50
|
.u-help {
|
|
51
51
|
margin-bottom: 10px;
|
|
52
|
-
display: inline-block;
|
|
53
|
-
color: #0366d6;
|
|
54
|
-
font-weight: bold;
|
|
55
|
-
cursor: pointer;
|
|
56
|
-
text-decoration: none;
|
|
52
|
+
// display: inline-block;
|
|
53
|
+
// color: #0366d6;
|
|
54
|
+
// font-weight: bold;
|
|
55
|
+
// cursor: pointer;
|
|
56
|
+
// text-decoration: none;
|
|
57
57
|
|
|
58
|
-
|
|
59
|
-
text-decoration:
|
|
58
|
+
a:hover {
|
|
59
|
+
text-decoration: underline;
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
62
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jx3box/jx3box-editor",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.2",
|
|
4
4
|
"description": "JX3BOX Article & Editor",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -31,11 +31,11 @@
|
|
|
31
31
|
"last 2 versions"
|
|
32
32
|
],
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@jx3box/jx3box-common": "^7.6.
|
|
35
|
-
"@jx3box/jx3box-data": "^3.0.
|
|
34
|
+
"@jx3box/jx3box-common": "^7.6.8",
|
|
35
|
+
"@jx3box/jx3box-data": "^3.0.4",
|
|
36
36
|
"@jx3box/jx3box-emotion": "^1.1.5",
|
|
37
37
|
"@jx3box/jx3box-macro": "^1.0.1",
|
|
38
|
-
"@jx3box/jx3box-talent": "^1.1.
|
|
38
|
+
"@jx3box/jx3box-talent": "^1.1.9",
|
|
39
39
|
"@jx3box/markdown": "^0.1.5",
|
|
40
40
|
"@tinymce/tinymce-vue": "^3.2.2",
|
|
41
41
|
"axios": "^0.19.2",
|
package/public/tinymce.html
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
<link rel="icon" href="<%= BASE_URL %>favicon.ico" />
|
|
10
10
|
<script src="https://oss.jx3box.com/static/tinymce/tinymce.min.js?v=0.1.0"></script>
|
|
11
11
|
<!-- TODO: -->
|
|
12
|
-
<!-- <script src="http://localhost:
|
|
12
|
+
<!-- <script src="http://localhost:3000/tinymce.min.js"></script> -->
|
|
13
13
|
</head>
|
|
14
14
|
<body>
|
|
15
15
|
<div id="app"></div>
|
|
@@ -1,13 +1,32 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="c-editor-markdown-dialog">
|
|
3
|
-
<span
|
|
3
|
+
<span
|
|
4
|
+
class="c-markdown-toolbar-video c-markdown-toolbar-item"
|
|
5
|
+
@click="handleClick"
|
|
6
|
+
title="插入视频"
|
|
7
|
+
>
|
|
4
8
|
<i class="el-icon-video-camera"></i>
|
|
5
9
|
</span>
|
|
6
10
|
|
|
7
|
-
<el-dialog
|
|
8
|
-
|
|
11
|
+
<el-dialog
|
|
12
|
+
:visible.sync="visible"
|
|
13
|
+
title="插入视频"
|
|
14
|
+
:modal-append-to-body="false"
|
|
15
|
+
>
|
|
16
|
+
<div class="u-help">
|
|
17
|
+
请填入BV号或链接地址。<a
|
|
18
|
+
style="color: #0366d6; font-weight: normal"
|
|
19
|
+
href="/tool/686/"
|
|
20
|
+
target="_blank"
|
|
21
|
+
>[点击查看帮助]</a
|
|
22
|
+
>
|
|
23
|
+
</div>
|
|
9
24
|
|
|
10
|
-
<el-input
|
|
25
|
+
<el-input
|
|
26
|
+
class="u-input"
|
|
27
|
+
placeholder="请输入BV号或链接地址"
|
|
28
|
+
v-model="videoUrl"
|
|
29
|
+
></el-input>
|
|
11
30
|
|
|
12
31
|
<div slot="footer">
|
|
13
32
|
<el-button @click="cancel">取消</el-button>
|
|
@@ -35,11 +54,22 @@ export default {
|
|
|
35
54
|
this.videoUrl = "";
|
|
36
55
|
},
|
|
37
56
|
insert() {
|
|
38
|
-
|
|
57
|
+
let videox = this.videoUrl;
|
|
58
|
+
if (videox.startsWith("https://www.bilibili.com/video/")) {
|
|
59
|
+
const regex = /https:\/\/www.bilibili.com\/video\/(BV\w+)/;
|
|
60
|
+
const found = videox.match(regex);
|
|
61
|
+
if (found) {
|
|
62
|
+
videox = found[1];
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
if (!videox) {
|
|
66
|
+
alert("请输入BV号");
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
const content = `<iframe class="w-player-bilibili" src="//player.bilibili.com/player.html?bvid=${videox}" scrolling="no" border="0" frameborder="no" framespacing="0" allowfullscreen="true" width="400" height="300"> </iframe>`;
|
|
39
70
|
|
|
40
71
|
this.$emit("insert", content);
|
|
41
72
|
|
|
42
|
-
|
|
43
73
|
this.videoUrl = "";
|
|
44
74
|
|
|
45
75
|
this.visible = false;
|