@jx3box/jx3box-editor 1.6.3 → 1.6.5

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jx3box/jx3box-editor",
3
- "version": "1.6.3",
3
+ "version": "1.6.5",
4
4
  "description": "JX3BOX Article & Editor",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -304,7 +304,7 @@ export default {
304
304
  selectEmotion: function (o){
305
305
  this.resetItems();
306
306
  o.isSelected = true;
307
- this.html = `<a data-type="emotion" class="e-jx3-emotion w-jx3-element" data-id="${o.id}" target="_blank" href="/emotion/${o.id}"><img class="e-jx3-emotion-img" data-type="emotion" data-id="${o.id}" style="width:80px;" src="${o.url}" alt="${o.id}"/></a>`
307
+ this.html = `<a data-type="emotion" class="e-jx3-emotion w-jx3-element" data-id="${o.id}" target="_blank" href="/emotion/${o.id}"><img class="e-jx3-emotion-img" data-type="emotion" data-id="${o.id}" style="width:180px;" src="${o.url}" alt="${o.id}"/></a>`
308
308
  },
309
309
  resetItems: function() {
310
310
  let data = this[this.type];
package/src/Tinymce.vue CHANGED
@@ -39,7 +39,7 @@ import Upload from "./Upload";
39
39
  import Resource from "./Resource";
40
40
  import BoxResource from "./BoxResource";
41
41
  import { __cms } from "@jx3box/jx3box-common/data/jx3box.json";
42
- import { __ossRoot } from "@jx3box/jx3box-common/data/jx3box.json";
42
+ import { __ossRoot, __imgPath } from "@jx3box/jx3box-common/data/jx3box.json";
43
43
  import Emotion from "@jx3box/jx3box-emotion/src/Emotion.vue"
44
44
  import hljs_languages from "../assets/js/item/hljs_languages.js"
45
45
  const API_Root = process.env.NODE_ENV === "production" ? __cms : "/";
@@ -199,7 +199,8 @@ export default {
199
199
  insertResource: function(data) {
200
200
  tinyMCE.editors["tinymce"].insertContent(data);
201
201
  },
202
- emotionSelected: function(src) {
202
+ emotionSelected: function(emotion) {
203
+ const src = `${__imgPath}emotion/output/${emotion.filename}`
203
204
  const IMAGE = `<img class="t-emotion" src="${src}" alt="${src}" />`
204
205
  tinyMCE.editors["tinymce"].insertContent(IMAGE)
205
206
  },