@jx3box/jx3box-editor 1.3.3 → 1.3.6

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.
@@ -28,8 +28,9 @@
28
28
  }
29
29
  .nobreak;
30
30
  }
31
- .u-info{
32
- .pr;top:-4px;
31
+ .u-info {
32
+ .pr;
33
+ top: -4px;
33
34
  .h(68px);
34
35
  display: flex;
35
36
  flex-direction: column;
@@ -49,17 +50,33 @@
49
50
  padding: 2px 8px;
50
51
  .fz(12px, 14px);
51
52
  color: #fff;
52
- background-color:#aaa;
53
+ background-color: #aaa;
53
54
  border-radius: 2px;
54
55
 
55
- &.lv-1{background-color: #32d3c4;}
56
- &.lv-2{background-color: #86c0fb;}
57
- &.lv-3{background-color: #33d9ff;}
58
- &.lv-4{background-color: #ffdb2a;}
59
- &.lv-5{background-color: #ffa739;}
60
- &.lv-6{background-color: #ff70b2;}
61
- &.lv-7{background-color: #ff3399;}
62
- &.lv-8{background-color: #f93c3c;}
56
+ &.lv-1 {
57
+ background-color: #32d3c4;
58
+ }
59
+ &.lv-2 {
60
+ background-color: #86c0fb;
61
+ }
62
+ &.lv-3 {
63
+ background-color: #33d9ff;
64
+ }
65
+ &.lv-4 {
66
+ background-color: #ffdb2a;
67
+ }
68
+ &.lv-5 {
69
+ background-color: #ffa739;
70
+ }
71
+ &.lv-6 {
72
+ background-color: #ff70b2;
73
+ }
74
+ &.lv-7 {
75
+ background-color: #ff3399;
76
+ }
77
+ &.lv-8 {
78
+ background-color: #f93c3c;
79
+ }
63
80
  }
64
81
  .u-vip {
65
82
  .ml(5px);
@@ -125,8 +142,8 @@
125
142
  }
126
143
  }
127
144
 
128
- .u-medal{
129
- img{
145
+ .u-medal {
146
+ img {
130
147
  padding: 0;
131
148
  margin: 0;
132
149
  .size(20px);
@@ -145,7 +162,7 @@
145
162
  }
146
163
 
147
164
  .u-teams {
148
- .mt(10px);
165
+ .mt(5px);
149
166
  .u-team {
150
167
  .db;
151
168
  background-color: #f2f6fc;
@@ -155,9 +172,9 @@
155
172
  // color:@color-link;
156
173
  }
157
174
  .r(3px);
158
- padding:0 5px;
159
- display: flex;
160
- align-items: center;
175
+ padding: 0 5px;
176
+ display: flex;
177
+ align-items: center;
161
178
  }
162
179
  .u-team-logo {
163
180
  .size(22px);
@@ -217,15 +217,19 @@
217
217
  .m-database-search {
218
218
  position: sticky;
219
219
  z-index: 100;
220
- top: 0px;
221
- padding:10px 20px 10px 200px;
220
+ top: 0;
221
+ padding:10px 20px 10px 20px;
222
222
  background-color:#fff;
223
223
  .pr;
224
224
 
225
225
  .u-client{
226
- .pa;.lt(20px,10px);
226
+ // .pa;.lt(20px,10px);
227
+ margin-right:15px;
227
228
  }
228
- .u-input{}
229
+ .u-input{
230
+ flex:1;
231
+ }
232
+ display: flex;
229
233
  }
230
234
 
231
235
  .m-database-tabs {
@@ -7,6 +7,18 @@
7
7
  box-shadow: 0 1px 0 #0366d6;
8
8
  }
9
9
  }
10
+
11
+ .e-jx3-author{
12
+ padding: 2px 5px;
13
+ border-radius: 3px;
14
+ border: 1px solid #8250df;
15
+ color:#8250df;
16
+
17
+ &:hover{
18
+ box-shadow: none;
19
+ background-color: #fafbfc;
20
+ }
21
+ }
10
22
  }
11
23
  // @media print {
12
24
  // .c-article {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jx3box/jx3box-editor",
3
- "version": "1.3.3",
3
+ "version": "1.3.6",
4
4
  "description": "JX3BOX Article & Editor",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -0,0 +1,341 @@
1
+ <template>
2
+ <div class="c-resource">
3
+ <!-- 上传触发按钮 -->
4
+ <el-button class="u-switch" type="primary" @click="openDialog" :disabled="!enable"> <img class="u-icon" svg-inline :src="boxIcon" />魔盒资源 </el-button>
5
+
6
+ <!-- 弹出界面 -->
7
+ <el-dialog class="c-large-dialog" title="魔盒资源库" :visible.sync="dialogVisible">
8
+ <div class="c-resource-content" v-loading="loading">
9
+ <div class="m-database-search">
10
+ <el-input class="u-input" placeholder="请输入 ID 或 名称" v-model="query" @change="search" @keyup.enter.native="search">
11
+ <template slot="prepend">ID /名称</template>
12
+ </el-input>
13
+ </div>
14
+
15
+ <el-tabs class="m-database-tabs" v-model="type" type="card" @tab-click="changeType">
16
+ <el-tab-pane label="魔盒用户" name="authors">
17
+ <span slot="label" class="u-tab-label">
18
+ <i class="el-icon-s-custom" style="margin-right:5px;"></i>
19
+ <b>魔盒用户</b>
20
+ </span>
21
+ <p v-if="total && done" class="m-resource-count">
22
+ <i class="el-icon-s-data"></i> 共找到 <b>{{ total }}</b> 条记录
23
+ </p>
24
+ <ul class="m-resource-list">
25
+ <li v-for="(o, i) in authors" class="u-item" :key="i" :class="{ on: !!o.isSelected }" @click="selectAuthor(o, i)" ref="author">
26
+ <span class="u-id">ID:{{ o.ID }}</span>
27
+ <img class="u-pic" :title="'AuthorID:' + o.display_name" :src="userAvatar(o.user_avatar)" />
28
+ <span class="u-primary">
29
+ <span class="u-name">
30
+ {{ o.display_name }}
31
+ </span>
32
+ <div class="u-remark">
33
+ {{o.user_bio}}
34
+ </div>
35
+ </span>
36
+ </li>
37
+ </ul>
38
+ <el-alert v-if="!authors.length && done" title="没有找到相关条目" type="info" show-icon></el-alert>
39
+ </el-tab-pane>
40
+ <!-- <el-tab-pane label="表情" name="emotions">
41
+ <span slot="label" class="u-tab-label">
42
+ <i class="el-icon-sugar"></i>
43
+ <b>表情</b>
44
+ </span>
45
+ <p v-if="total && done" class="m-resource-count">
46
+ <i class="el-icon-s-data"></i> 共找到 <b>{{ total }}</b> 条记录
47
+ </p>
48
+ <ul class="m-resource-iconlist">
49
+ <li v-for="(o, i) in emotions" class="u-item" :key="i" :class="{ on: !!o.isSelected }" @click="selectEmotion(o)" ref="emotion">
50
+ <img class="e-jx3-emotion" :src="userAvatar(o.url)" :alt="query" />
51
+ </li>
52
+ </ul>
53
+ <el-alert v-if="!emotions.length && done" title="没有找到相关条目" type="info" show-icon></el-alert>
54
+ </el-tab-pane> -->
55
+ </el-tabs>
56
+
57
+ <template v-if="multipage">
58
+ <!-- 下一页 -->
59
+ <el-button class="m-archive-more" :class="{ show: hasNextPage }" type="primary" icon="el-icon-arrow-down" @click="appendPage">加载更多</el-button>
60
+ <!-- 分页 -->
61
+ <el-pagination
62
+ class="m-archive-pages"
63
+ background
64
+ layout="total, prev, pager, next,jumper"
65
+ :hide-on-single-page="true"
66
+ :page-size="per"
67
+ :total="total"
68
+ :current-page.sync="page"
69
+ @current-change="changePage"
70
+ ></el-pagination>
71
+ </template>
72
+
73
+ <div class="m-database-tip" v-show="isBlank">❤ 请输入搜索条件查询</div>
74
+ </div>
75
+
76
+ <!-- 插入按钮 -->
77
+ <span slot="footer" class="dialog-footer">
78
+ <el-button @click="dialogVisible = false">取 消</el-button>
79
+ <el-button type="primary" @click="insert">
80
+ {{ buttonTXT }}
81
+ </el-button>
82
+ </span>
83
+ </el-dialog>
84
+ </div>
85
+ </template>
86
+
87
+ <script>
88
+ import { loadResource, loadStat, getIcons } from "../service/database";
89
+ import { loadAuthors, loadEmotions } from "../service/cms";
90
+ import { getUserInfo } from "../service/author";
91
+ import { __iconPath, __Root, __OriginRoot, __imgPath } from "@jx3box/jx3box-common/data/jx3box.json";
92
+ import detach_types from "../assets/data/detach_type.json";
93
+ import { iconLink, getLink, showAvatar } from "@jx3box/jx3box-common/js/utils";
94
+ import User from "@jx3box/jx3box-common/js/user";
95
+ export default {
96
+ name: "Resource",
97
+ props: {
98
+ enable: {
99
+ type: Boolean,
100
+ default: true,
101
+ },
102
+ },
103
+ data: function() {
104
+ return {
105
+ dialogVisible: false,
106
+ actived: false,
107
+ userInfo: {},
108
+
109
+ type: "authors",
110
+ query: "",
111
+ strict: false,
112
+ client: location.hostname.includes("origin") ? "origin" : "std",
113
+
114
+ skill: [],
115
+ buff: [],
116
+ item: [],
117
+ icon: [],
118
+ npc: [],
119
+ authors: [],
120
+ selectedAuthor: {},
121
+ emotions: [],
122
+
123
+ done: false,
124
+ loading: false,
125
+
126
+ isSuper: false,
127
+
128
+ html: "",
129
+
130
+ per: 10,
131
+ page: 1,
132
+ total: 1,
133
+ pages: 1
134
+ };
135
+ },
136
+ computed: {
137
+ buttonTXT: function() {
138
+ return this.selectedCount ? "插 入" : "确 定";
139
+ },
140
+ isBlank: function() {
141
+ return !this.query && !this[this.type]["length"];
142
+ },
143
+ selectedCount: function() {
144
+ return !!this.html;
145
+ },
146
+ isNumber: function() {
147
+ return !isNaN(this.query);
148
+ },
149
+ hasNextPage: function() {
150
+ return this.total > 1 && this.page < this.pages;
151
+ },
152
+ multipage: function() {
153
+ return this.type !== "icon" && this.done && this.pages > 1;
154
+ },
155
+ iconDir: function() {
156
+ return this.client === "origin" ? "origin_icon" : "icon";
157
+ },
158
+ userStatus: function (){
159
+ return User.getInfo().status
160
+ },
161
+ uid: function (){
162
+ return User.getInfo().uid
163
+ },
164
+ canInsertAuthor: function() {
165
+ return User.getLevel(this.userInfo && this.userInfo.experience) >= 2;
166
+ },
167
+ boxIcon: function() {
168
+ return __imgPath + 'image/common/jx3box_white.svg'
169
+ },
170
+ },
171
+ watch: {
172
+ html: function(newval) {
173
+ this.$emit("update", newval);
174
+ },
175
+ },
176
+ methods: {
177
+ getData: function(page = 1, append = false) {
178
+ if (!this.query) return;
179
+
180
+ this.loading = true;
181
+ this.per = 10;
182
+ this.done = false;
183
+ let query = this.query;
184
+ let params = {
185
+ strict: ~~this.strict,
186
+ per: this.per,
187
+ page: page,
188
+ client: this.client,
189
+ };
190
+
191
+ // 图标
192
+ if (this.type === 'authors') {
193
+ params = {
194
+ ...params,
195
+ name: query,
196
+ }
197
+ loadAuthors(params)
198
+ .then((res) => {
199
+ if (!append) this.authors = [];
200
+ let list = this.transformData(res.data.data.list)
201
+ this.authors = this.authors.concat(list);
202
+ this.pages = res.data.data.pages;
203
+ this.total = res.data.data.total;
204
+ })
205
+ .finally(() => {
206
+ this.done = true;
207
+ this.loading = false;
208
+ });
209
+
210
+ } else if (this.type === 'emotions') {
211
+ this.per = 30;
212
+ params = {
213
+ per: this.per,
214
+ page: page,
215
+ search: query,
216
+ }
217
+ loadEmotions(params)
218
+ .then((res) => {
219
+ if (!append) this.emotions = [];
220
+ let list = this.transformData(res.data.data.list)
221
+ this.emotions = this.emotions.concat(list);
222
+ this.pages = res.data.data.pages;
223
+ this.total = res.data.data.total;
224
+ })
225
+ .finally(() => {
226
+ this.done = true;
227
+ this.loading = false;
228
+ });
229
+ }
230
+ },
231
+ search: function() {
232
+ this.page = 1;
233
+ this.getData();
234
+ },
235
+ appendPage: function() {
236
+ this.getData(++this.page, true);
237
+ },
238
+ changePage: function(i) {
239
+ this.getData(i);
240
+ },
241
+ changeType: function() {
242
+ this.page = 1;
243
+ this.getData();
244
+ },
245
+ setAuthors: function() {
246
+ try {
247
+ let author = sessionStorage.getItem("atAuthor");
248
+ if (author) {
249
+ author = JSON.parse(author);
250
+ author = author.split(',') || [];
251
+ if (this.selectedAuthor.ID && !author.includes(String(this.selectedAuthor.ID))) {
252
+ author.push(this.selectedAuthor.ID);
253
+ }
254
+ sessionStorage.setItem("atAuthor", JSON.stringify(author.join(',')));
255
+ } else {
256
+ sessionStorage.setItem("atAuthor", JSON.stringify(String(this.selectedAuthor.ID)));
257
+ }
258
+ } catch (error) {
259
+ console.log(error)
260
+ }
261
+ },
262
+ insert: function() {
263
+ if (this.type === 'authors') {
264
+ if (this.userStatus == 0 && this.canInsertAuthor) {
265
+ this.setAuthors();
266
+ this.$emit("insert", this.html);
267
+ this.dialogVisible = false;
268
+ this.selectedAuthor = {};
269
+ } else {
270
+ this.$alert('您的等级不足或无权限(Lv2以上可用)', '消息');
271
+ }
272
+ } else {
273
+ this.$emit("insert", this.html);
274
+ this.dialogVisible = false;
275
+ }
276
+ },
277
+ transformData: function(data) {
278
+ data.forEach((item) => {
279
+ item.isSelected = false;
280
+ });
281
+ return data;
282
+ },
283
+ selectAuthor: function (o){
284
+ this.resetItems();
285
+ this.selectedAuthor = o;
286
+ o.isSelected = true;
287
+ this.html = `<a data-type="author" class="e-jx3-author w-jx3-element" data-mode="" data-id="${o.ID}" target="_blank" href="/author/${o.ID}">@${o.display_name}</a>`
288
+ },
289
+ selectEmotion: function (o){
290
+ this.resetItems();
291
+ o.isSelected = true;
292
+ this.html = `<img class="e-jx3-emotion" style="width:80px;" src="${o.url}" alt="${o.id}"/>`
293
+ },
294
+ resetItems: function() {
295
+ let data = this[this.type];
296
+ data.forEach((item) => {
297
+ item.isSelected = false;
298
+ });
299
+ this.html = "";
300
+ },
301
+ getLink : function (type,id){
302
+ let domain = this.client == "origin" ? __OriginRoot : __Root;
303
+ return domain + getLink(type,id).slice(1)
304
+ },
305
+ userAvatar: function(url) {
306
+ return showAvatar(url,'m');
307
+ },
308
+ loadUserInfo: function (){
309
+ if (!this.uid) return;
310
+ getUserInfo(this.uid).then(res => {
311
+ this.userInfo = res
312
+ })
313
+ },
314
+
315
+ // 杂项
316
+ // ==============================
317
+ openDialog: function() {
318
+ this.dialogVisible = true;
319
+ if (!this.actived) {
320
+ loadStat().then((data) => {
321
+ this.stat = data;
322
+ this.actived = true;
323
+ });
324
+ }
325
+ },
326
+ },
327
+ created: function() {
328
+ this.loadUserInfo();
329
+ },
330
+ };
331
+ </script>
332
+
333
+ <style lang="less">
334
+ @import "../assets/css/resource.less";
335
+
336
+ .m-item-pop {
337
+ padding: 0 !important;
338
+ background: none !important;
339
+ border: none;
340
+ }
341
+ </style>
package/src/Markdown.vue CHANGED
@@ -5,7 +5,8 @@
5
5
 
6
6
  <div class="c-editor-header">
7
7
  <Upload v-if="attachmentEnable" @insert="insertAttachments" :enable="true" />
8
- <Resource v-if="resourceEnable" @insert="insertResource" :enable="true" />
8
+ <Resource style="margin-right: 5px;" v-if="resourceEnable" @insert="insertResource" :enable="true" />
9
+ <BoxResource v-if="resourceEnable" @insert="insertResource" :enable="true" />
9
10
  </div>
10
11
 
11
12
  <slot></slot>
@@ -37,6 +38,7 @@ import { uploadFile } from "../service/cms";
37
38
 
38
39
  import Upload from "./Upload";
39
40
  import Resource from "./Resource";
41
+ import BoxResource from "./BoxResource";
40
42
 
41
43
  // jx3
42
44
  import markdownMacro from './components/markdown/macro.vue'
@@ -69,7 +71,8 @@ export default {
69
71
  markdownEditor,
70
72
  Upload,
71
73
  Resource,
72
-
74
+ BoxResource,
75
+
73
76
  markdownMacro,
74
77
  markdownPz,
75
78
  markdownKatex,
@@ -215,7 +218,6 @@ export default {
215
218
  }
216
219
  },
217
220
  insertResource: function(data) {
218
- console.log(data)
219
221
  this.$md.insertText(this.$md.getTextareaDom(), {
220
222
  prefix: data,
221
223
  subfix: "",
package/src/Resource.vue CHANGED
@@ -164,45 +164,6 @@
164
164
  </ul>
165
165
  <el-alert v-if="!icon.length && done" title="没有找到相关条目" type="info" show-icon></el-alert>
166
166
  </el-tab-pane>
167
- <el-tab-pane label="魔盒用户" name="authors">
168
- <span slot="label" class="u-tab-label">
169
- <i class="el-icon-s-custom" style="margin-right:5px;"></i>
170
- <b>魔盒用户</b>
171
- </span>
172
- <p v-if="total && done" class="m-resource-count">
173
- <i class="el-icon-s-data"></i> 共找到 <b>{{ total }}</b> 条记录
174
- </p>
175
- <ul class="m-resource-list">
176
- <li v-for="(o, i) in authors" class="u-item" :key="i" :class="{ on: !!o.isSelected }" @click="selectAuthor(o, i)" ref="author">
177
- <span class="u-id">ID:{{ o.ID }}</span>
178
- <img class="u-pic" :title="'AuthorID:' + o.display_name" :src="userAvatar(o.user_avatar)" />
179
- <span class="u-primary">
180
- <span class="u-name">
181
- {{ o.display_name }}
182
- </span>
183
- <div class="u-remark">
184
- {{o.user_bio}}
185
- </div>
186
- </span>
187
- </li>
188
- </ul>
189
- <el-alert v-if="!authors.length && done" title="没有找到相关条目" type="info" show-icon></el-alert>
190
- </el-tab-pane>
191
- <!-- <el-tab-pane label="表情" name="emotions">
192
- <span slot="label" class="u-tab-label">
193
- <i class="el-icon-sugar"></i>
194
- <b>表情</b>
195
- </span>
196
- <p v-if="total && done" class="m-resource-count">
197
- <i class="el-icon-s-data"></i> 共找到 <b>{{ total }}</b> 条记录
198
- </p>
199
- <ul class="m-resource-iconlist">
200
- <li v-for="(o, i) in emotions" class="u-item" :key="i" :class="{ on: !!o.isSelected }" @click="selectEmotion(o)" ref="emotion">
201
- <img class="e-jx3-emotion" :src="userAvatar(o.url)" :alt="query" />
202
- </li>
203
- </ul>
204
- <el-alert v-if="!emotions.length && done" title="没有找到相关条目" type="info" show-icon></el-alert>
205
- </el-tab-pane> -->
206
167
  </el-tabs>
207
168
 
208
169
  <template v-if="multipage">
@@ -237,8 +198,7 @@
237
198
 
238
199
  <script>
239
200
  import { loadResource, loadStat, getIcons } from "../service/database";
240
- import { loadAuthors, loadEmotions } from "../service/cms";
241
- import { getUserInfo } from "../service/author";
201
+ import { loadEmotions } from "../service/cms";
242
202
  import { __ossRoot, __iconPath, __Root, __OriginRoot } from "@jx3box/jx3box-common/data/jx3box.json";
243
203
  import detach_types from "../assets/data/detach_type.json";
244
204
  import { iconLink, getLink, showAvatar } from "@jx3box/jx3box-common/js/utils";
@@ -372,24 +332,6 @@ export default {
372
332
  this.loading = false;
373
333
  }
374
334
 
375
- } else if (this.type === 'authors') {
376
- params = {
377
- ...params,
378
- name: query,
379
- }
380
- loadAuthors(params)
381
- .then((res) => {
382
- if (!append) this.authors = [];
383
- let list = this.transformData(res.data.data.list)
384
- this.authors = this.authors.concat(list);
385
- this.pages = res.data.data.pages;
386
- this.total = res.data.data.total;
387
- })
388
- .finally(() => {
389
- this.done = true;
390
- this.loading = false;
391
- });
392
-
393
335
  } else if (this.type === 'emotions') {
394
336
  this.per = 30;
395
337
  params = {
@@ -445,39 +387,10 @@ export default {
445
387
  changeType: function() {
446
388
  this.page = 1;
447
389
  this.getData();
448
- if (this.type === 'authors') {
449
- this.loadUserInfo();
450
- }
451
- },
452
- setAuthors: function() {
453
- try {
454
- let author = sessionStorage.getItem("atAuthor");
455
- if (author) {
456
- author = author.split(',') || [];
457
- author.push(this.selectedAuthor.ID);
458
- sessionStorage.setItem("atAuthor", JSON.stringify(author.join(',')));
459
- } else {
460
- sessionStorage.setItem("atAuthor", JSON.stringify(this.selectedAuthor.ID));
461
- }
462
- } catch (error) {
463
- console.log(error)
464
- }
465
390
  },
466
391
  insert: function() {
467
- if (this.type === 'authors') {
468
- if (this.userStatus == 0 && this.canInsertAuthor) {
469
- this.setAuthors();
470
- this.$emit("insert", this.html);
471
- this.dialogVisible = false;
472
- this.selectedAuthor = {};
473
- } else {
474
- this.$alert('您的等级不足或无权限(Lv2以上可用)', '消息');
475
- return;
476
- }
477
- } else {
478
- this.$emit("insert", this.html);
479
- this.dialogVisible = false;
480
- }
392
+ this.$emit("insert", this.html);
393
+ this.dialogVisible = false;
481
394
  },
482
395
  transformData: function(data) {
483
396
  data.forEach((item) => {
@@ -531,12 +444,6 @@ export default {
531
444
  o.isSelected = true
532
445
  this.html = `<a data-type="npc" class="e-jx3-npc w-jx3-element" data-mode="" data-id="${o.ID}" data-client="${this.client}" target="_blank" href="${this.getDbLink("npc", this.client, o.ID, '')}">${o.Name}]</a>`
533
446
  },
534
- selectAuthor: function (o){
535
- this.resetItems();
536
- this.selectedAuthor = o;
537
- o.isSelected = true;
538
- this.html = `<a data-type="author" class="e-jx3-author w-jx3-element" data-mode="" data-id="${o.ID}" target="_blank" href="/author/${o.ID}">@${o.display_name}</a>`
539
- },
540
447
  selectEmotion: function (o){
541
448
  this.resetItems();
542
449
  o.isSelected = true;
@@ -566,12 +473,6 @@ export default {
566
473
  userAvatar: function(url) {
567
474
  return showAvatar(url,'m');
568
475
  },
569
- loadUserInfo: function (){
570
- if (!this.uid) return;
571
- getUserInfo(this.uid).then(res => {
572
- this.userInfo = res
573
- })
574
- },
575
476
 
576
477
  // 杂项
577
478
  // ==============================
package/src/Tinymce.vue CHANGED
@@ -6,6 +6,7 @@
6
6
  <div class="c-editor-header">
7
7
  <Upload v-if="attachmentEnable" @insert="insertAttachments" />
8
8
  <Resource v-if="resourceEnable" @insert="insertResource" />
9
+ <BoxResource v-if="resourceEnable" @insert="insertResource" />
9
10
  </div>
10
11
  <Emotion class="c-editor-emotion" @selected="emotionSelected"></Emotion>
11
12
 
@@ -36,6 +37,7 @@
36
37
  import Editor from "@tinymce/tinymce-vue";
37
38
  import Upload from "./Upload";
38
39
  import Resource from "./Resource";
40
+ import BoxResource from "./BoxResource";
39
41
  import { __cms } from "@jx3box/jx3box-common/data/jx3box.json";
40
42
  import { __ossRoot } from "@jx3box/jx3box-common/data/jx3box.json";
41
43
  import Emotion from "@jx3box/jx3box-emotion/src/Emotion.vue"
@@ -76,10 +78,10 @@ export default {
76
78
  "link autolink",
77
79
  "hr lists advlist table codeinline codesample checklist foldtext latex",
78
80
  "image emoticons media videox macro qixue talent2",
79
- "code fullscreen wordcount powerpaste pagebreak printpage pz", // template anchor jx3icon autosave
81
+ "code fullscreen wordcount powerpaste pagebreak printpage pz", // template anchor jx3icon autosave
80
82
  ],
81
83
  toolbar: [
82
- "undo | formatselect | fontsizeselect | forecolor backcolor | bold italic underline strikethrough superscript subscript | link unlink | fullscreen code", //restoredraft
84
+ "undo | formatselect | fontsizeselect | forecolor backcolor | bold italic underline strikethrough superscript subscript | link unlink | fullscreen code", //restoredraft
83
85
  "removeformat | hr alignleft aligncenter alignright alignjustify indent outdent | bullist numlist checklist table blockquote foldtext codeinline codesample latex | emoticons image media videox | macro pz qixue talent2 pagebreak printpage", // template anchor jx3icon
84
86
  ],
85
87
  mobile: {
@@ -208,7 +210,8 @@ export default {
208
210
  Editor,
209
211
  Upload,
210
212
  Resource,
211
- Emotion
213
+ Emotion,
214
+ BoxResource
212
215
  },
213
216
  };
214
217
  </script>