@jx3box/jx3box-vue3-ui 1.0.3 → 1.0.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-vue3-ui",
3
- "version": "1.0.3",
3
+ "version": "1.0.5",
4
4
  "description": "JX3BOX Vue3 UI",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -28,7 +28,7 @@
28
28
  "@element-plus/icons-vue": "^2.1.0",
29
29
  "@jx3box/jx3box-common": "^8.7.1",
30
30
  "@jx3box/jx3box-data": "^3.8.2",
31
- "@jx3box/jx3box-emotion": "^1.2.10",
31
+ "@jx3box/jx3box-emotion": "^1.2.11",
32
32
  "@jx3box/jx3box-macro": "^1.0.1",
33
33
  "@jx3box/jx3box-talent": "^1.3.3",
34
34
  "@jx3box/reporter": "^0.0.4",
@@ -34,8 +34,8 @@ import Upload from "./Upload.vue";
34
34
  import Resource from "./Resource.vue";
35
35
  import BoxResource from "./BoxResource.vue";
36
36
  import JX3BOX from "@jx3box/jx3box-common/data/jx3box.json";
37
- import Emotion from "@jx3box/jx3box-emotion/src/Emotion2.vue"
38
- import hljs_languages from "../../assets/js/item/hljs_languages.js"
37
+ import Emotion from "@jx3box/jx3box-emotion/src/Emotion2.vue";
38
+ import hljs_languages from "../../assets/js/item/hljs_languages.js";
39
39
  const { __cms, __imgPath } = JX3BOX;
40
40
  const API_Root = process.env.NODE_ENV === "production" ? __cms : "/";
41
41
  const API = API_Root + "api/cms/upload/tinymce";
@@ -177,10 +177,13 @@ export default {
177
177
  insertResource: function (data) {
178
178
  tinyMCE.editors["tinymce"].insertContent(data);
179
179
  },
180
- emotionSelected: function(emotion) {
181
- const src = `${__imgPath}emotion/output/${emotion.filename}`
182
- const IMAGE = `<img class="t-emotion" src="${src}" alt="${src}" />`
183
- tinyMCE.editors["tinymce"].insertContent(IMAGE)
180
+ emotionSelected: function (emotion) {
181
+ let src = emotion.filename;
182
+ if (!emotion.filename.startsWith("http")) {
183
+ src = `${__imgPath}emotion/output/${emotion.filename}`;
184
+ }
185
+ const IMAGE = `<img class="t-emotion" src="${src}" alt="${src}" />`;
186
+ tinyMCE.editors["tinymce"].insertContent(IMAGE);
184
187
  },
185
188
  },
186
189
  mounted: function () {},