@jx3box/jx3box-editor 1.8.9 → 1.9.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/.env +2 -1
- package/package.json +1 -1
- package/public/tinymce.html +2 -2
- package/src/Tinymce.vue +3 -2
- package/vue.config.js +38 -37
package/.env
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
STATIC_PATH=origin
|
|
1
|
+
STATIC_PATH=origin
|
|
2
|
+
VUE_APP_DEV_COMPONENT=true
|
package/package.json
CHANGED
package/public/tinymce.html
CHANGED
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
<meta name="renderer" content="webkit" />
|
|
8
8
|
<title><%= htmlWebpackPlugin.options.title %></title>
|
|
9
9
|
<link rel="icon" href="<%= BASE_URL %>favicon.ico" />
|
|
10
|
-
|
|
10
|
+
<script src="https://oss.jx3box.com/static/tinymce/tinymce.min.js?v=1.8.9"></script>
|
|
11
11
|
<!-- TODO: -->
|
|
12
|
-
<script src="http://localhost:3000/tinymce.min.js"></script>
|
|
12
|
+
<!-- <script src="http://localhost:3000/tinymce.min.js"></script> -->
|
|
13
13
|
</head>
|
|
14
14
|
<body>
|
|
15
15
|
<div id="app"></div>
|
package/src/Tinymce.vue
CHANGED
|
@@ -63,7 +63,7 @@ export default {
|
|
|
63
63
|
|
|
64
64
|
// 样式
|
|
65
65
|
// TODO:
|
|
66
|
-
content_css: process.env.
|
|
66
|
+
content_css: process.env.VUE_APP_DEV_COMPONENT == 'true' ? '/css/article.css' : `https://oss.jx3box.com/static/jx3box-editor/css/article.css`,
|
|
67
67
|
// content_css: `http://localhost:3000/skins/content/default/content.min.css`,
|
|
68
68
|
body_class: "c-article c-article-editor c-article-tinymce",
|
|
69
69
|
height: this.height || 800,
|
|
@@ -205,7 +205,8 @@ export default {
|
|
|
205
205
|
tinyMCE.editors["tinymce"].insertContent(IMAGE)
|
|
206
206
|
},
|
|
207
207
|
},
|
|
208
|
-
mounted: function() {
|
|
208
|
+
mounted: function() {
|
|
209
|
+
},
|
|
209
210
|
components: {
|
|
210
211
|
Editor,
|
|
211
212
|
Upload,
|
package/vue.config.js
CHANGED
|
@@ -1,34 +1,35 @@
|
|
|
1
1
|
const path = require('path');
|
|
2
2
|
const pkg = require("./package.json");
|
|
3
3
|
const { JX3BOX } = require("@jx3box/jx3box-common");
|
|
4
|
+
const webpack = require('webpack')
|
|
4
5
|
|
|
5
6
|
module.exports = {
|
|
6
7
|
|
|
7
8
|
//❤️ Multiple pages ~
|
|
8
|
-
pages:{
|
|
9
|
-
article
|
|
10
|
-
title
|
|
11
|
-
entry:'demo/A.js',
|
|
12
|
-
template
|
|
13
|
-
filename:'index.html',
|
|
9
|
+
pages: {
|
|
10
|
+
article: {
|
|
11
|
+
title: '文章内容渲染',
|
|
12
|
+
entry: 'demo/A.js',
|
|
13
|
+
template: 'public/article.html',
|
|
14
|
+
filename: 'index.html',
|
|
14
15
|
},
|
|
15
|
-
tinymce
|
|
16
|
-
title
|
|
17
|
-
entry:'demo/T.js',
|
|
18
|
-
template
|
|
19
|
-
filename:'tinymce/index.html',
|
|
16
|
+
tinymce: {
|
|
17
|
+
title: 'Tinymce编辑器',
|
|
18
|
+
entry: 'demo/T.js',
|
|
19
|
+
template: 'public/tinymce.html',
|
|
20
|
+
filename: 'tinymce/index.html',
|
|
20
21
|
},
|
|
21
|
-
markdown
|
|
22
|
-
title
|
|
23
|
-
entry:'demo/M.js',
|
|
24
|
-
template
|
|
25
|
-
filename:'markdown/index.html',
|
|
22
|
+
markdown: {
|
|
23
|
+
title: 'Markdown编辑器',
|
|
24
|
+
entry: 'demo/M.js',
|
|
25
|
+
template: 'public/article.html',
|
|
26
|
+
filename: 'markdown/index.html',
|
|
26
27
|
},
|
|
27
|
-
article_markdown
|
|
28
|
-
title
|
|
29
|
-
entry:'demo/MarkdownArticleDemo.js',
|
|
30
|
-
template
|
|
31
|
-
filename:'article_markdown/index.html',
|
|
28
|
+
article_markdown: {
|
|
29
|
+
title: 'Markdown文章内容渲染',
|
|
30
|
+
entry: 'demo/MarkdownArticleDemo.js',
|
|
31
|
+
template: 'public/article.html',
|
|
32
|
+
filename: 'article_markdown/index.html',
|
|
32
33
|
},
|
|
33
34
|
},
|
|
34
35
|
|
|
@@ -39,26 +40,26 @@ module.exports = {
|
|
|
39
40
|
(process.env.NODE_ENV === 'development' && '/') ||
|
|
40
41
|
|
|
41
42
|
//BY origin
|
|
42
|
-
(process.env.STATIC_PATH === "origin" && `${JX3BOX.__staticPath["origin"]}${pkg.name}/`) ||
|
|
43
|
+
(process.env.STATIC_PATH === "origin" && `${JX3BOX.__staticPath["origin"]}${pkg.name}/`) ||
|
|
43
44
|
|
|
44
45
|
//BY github
|
|
45
|
-
(process.env.STATIC_PATH === "github" && `${JX3BOX.__staticPath["github"]}${pkg.name}/`) ||
|
|
46
|
+
(process.env.STATIC_PATH === "github" && `${JX3BOX.__staticPath["github"]}${pkg.name}/`) ||
|
|
46
47
|
|
|
47
48
|
//BY jsdelivr
|
|
48
|
-
(process.env.STATIC_PATH === "jsdelivr" && `${JX3BOX.__staticPath["jsdelivr"]}${pkg.name}@gh-pages/`) ||
|
|
49
|
+
(process.env.STATIC_PATH === "jsdelivr" && `${JX3BOX.__staticPath["jsdelivr"]}${pkg.name}@gh-pages/`) ||
|
|
49
50
|
|
|
50
51
|
//BY OSS=>CDN
|
|
51
52
|
(process.env.STATIC_PATH === "mirror" && `${JX3BOX.__staticPath["mirror"]}${pkg.name}/`) ||
|
|
52
53
|
|
|
53
54
|
//BY relative path
|
|
54
|
-
(process.env.STATIC_PATH === "repo" && `/${pkg.name}/`) ||
|
|
55
|
+
(process.env.STATIC_PATH === "repo" && `/${pkg.name}/`) ||
|
|
55
56
|
|
|
56
57
|
//BY root path or bind a domain
|
|
57
|
-
(process.env.STATIC_PATH == 'root' && '/') ||
|
|
58
|
+
(process.env.STATIC_PATH == 'root' && '/') ||
|
|
58
59
|
|
|
59
60
|
//for lost
|
|
60
61
|
'/',
|
|
61
|
-
|
|
62
|
+
|
|
62
63
|
//❤️ Porxy ~
|
|
63
64
|
devServer: {
|
|
64
65
|
proxy: {
|
|
@@ -70,13 +71,13 @@ module.exports = {
|
|
|
70
71
|
},
|
|
71
72
|
"/api/team": {
|
|
72
73
|
target: "https://team.api.jx3box.com",
|
|
73
|
-
onProxyReq: function(request) {
|
|
74
|
+
onProxyReq: function (request) {
|
|
74
75
|
request.setHeader("origin", "");
|
|
75
76
|
},
|
|
76
77
|
},
|
|
77
78
|
"/api": {
|
|
78
79
|
target: "https://next2.jx3box.com",
|
|
79
|
-
onProxyReq: function(request) {
|
|
80
|
+
onProxyReq: function (request) {
|
|
80
81
|
request.setHeader("origin", "");
|
|
81
82
|
},
|
|
82
83
|
},
|
|
@@ -107,8 +108,8 @@ module.exports = {
|
|
|
107
108
|
|
|
108
109
|
//💝 in-line svg imgs ~
|
|
109
110
|
config.module
|
|
110
|
-
|
|
111
|
-
|
|
111
|
+
.rule("vue")
|
|
112
|
+
.use("vue-svg-inline-loader")
|
|
112
113
|
.loader("vue-svg-inline-loader")
|
|
113
114
|
|
|
114
115
|
|
|
@@ -120,14 +121,14 @@ module.exports = {
|
|
|
120
121
|
path.resolve(__dirname, './node_modules/@jx3box/jx3box-common/css/var.less'),
|
|
121
122
|
// path.resolve(__dirname, './src/assets/css/var.less')
|
|
122
123
|
)
|
|
123
|
-
function addStyleResource
|
|
124
|
+
function addStyleResource(rule) {
|
|
124
125
|
rule.use('style-resource')
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
126
|
+
.loader('style-resources-loader')
|
|
127
|
+
.options({
|
|
128
|
+
patterns: preload_styles,
|
|
129
|
+
})
|
|
129
130
|
}
|
|
130
131
|
types.forEach(type => addStyleResource(config.module.rule('less').oneOf(type)));
|
|
131
132
|
|
|
132
|
-
}
|
|
133
|
+
},
|
|
133
134
|
};
|