@jx3box/jx3box-editor 1.8.8 → 1.9.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.
@@ -0,0 +1,3 @@
1
+ @import '../../node_modules/@jx3box/jx3box-common/css/var.less';
2
+ @import '../../node_modules/csslab/base.less';
3
+ @import '../../assets/css/article.less';
@@ -7,7 +7,7 @@
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
- <script src="https://oss.jx3box.com/static/tinymce/tinymce.min.js?v=1.8.8"></script>
10
+ <script src="https://oss.jx3box.com/static/tinymce/tinymce.min.js?v=1.8.9"></script>
11
11
  <!-- TODO: -->
12
12
  <!-- <script src="http://localhost:3000/tinymce.min.js"></script> -->
13
13
  </head>
package/src/Tinymce.vue CHANGED
@@ -63,7 +63,7 @@ export default {
63
63
 
64
64
  // 样式
65
65
  // TODO:
66
- content_css: `https://oss.jx3box.com/static/tinymce/skins/content/default/content.min.css`,
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,9 @@ export default {
205
205
  tinyMCE.editors["tinymce"].insertContent(IMAGE)
206
206
  },
207
207
  },
208
- mounted: function() {},
208
+ mounted: function() {
209
+ console.log(process.env)
210
+ },
209
211
  components: {
210
212
  Editor,
211
213
  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 : 'public/article.html',
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 : 'Tinymce编辑器',
17
- entry:'demo/T.js',
18
- template : 'public/tinymce.html',
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 : 'Markdown编辑器',
23
- entry:'demo/M.js',
24
- template : 'public/article.html',
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 : 'Markdown文章内容渲染',
29
- entry:'demo/MarkdownArticleDemo.js',
30
- template : 'public/article.html',
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
- .rule("vue")
111
- .use("vue-svg-inline-loader")
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 (rule) {
124
+ function addStyleResource(rule) {
124
125
  rule.use('style-resource')
125
- .loader('style-resources-loader')
126
- .options({
127
- patterns: preload_styles,
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
  };