@jx3box/jx3box-editor 2.2.11 → 2.2.12
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 +1 -1
- package/public/tinymce.html +2 -2
- package/src/Resource.vue +6 -2
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://cdn.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/Resource.vue
CHANGED
|
@@ -304,6 +304,10 @@ export default {
|
|
|
304
304
|
},
|
|
305
305
|
},
|
|
306
306
|
methods: {
|
|
307
|
+
nl2br: function(str) {
|
|
308
|
+
// 替换\n \\\n 为 <br>
|
|
309
|
+
return str.replace(/\\n/g, "<br>").replace(/\n/g, "<br>");
|
|
310
|
+
},
|
|
307
311
|
getData: function(page = 1, append = false) {
|
|
308
312
|
if (!this.query) return;
|
|
309
313
|
|
|
@@ -424,7 +428,7 @@ export default {
|
|
|
424
428
|
o.Level
|
|
425
429
|
)}" data-client="${this.client}" data-id="${o.BuffID}" data-level="${o.Level}">[${o.Name}]</a>`;
|
|
426
430
|
} else {
|
|
427
|
-
this.html = `<pre data-type="buff" data-id="${o.BuffID}" class="e-jx3-resource">${this.$refs[this.type][i]["innerHTML"]}</pre>`;
|
|
431
|
+
this.html = `<pre data-type="buff" data-id="${o.BuffID}" class="e-jx3-resource">${this.nl2br(this.$refs[this.type][i]["innerHTML"])}</pre>`;
|
|
428
432
|
}
|
|
429
433
|
},
|
|
430
434
|
selectSkill: function(o, i) {
|
|
@@ -435,7 +439,7 @@ export default {
|
|
|
435
439
|
o.SkillID
|
|
436
440
|
}" data-level="${o.Level}">[${o.Name}]</a>`;
|
|
437
441
|
} else {
|
|
438
|
-
this.html = `<pre data-type="skill" data-id="${o.SkillID}" class="e-jx3-resource">${this.$refs[this.type][i]["innerHTML"]}</pre>`;
|
|
442
|
+
this.html = `<pre data-type="skill" data-id="${o.SkillID}" class="e-jx3-resource">${this.nl2br(this.$refs[this.type][i]["innerHTML"])}</pre>`;
|
|
439
443
|
}
|
|
440
444
|
},
|
|
441
445
|
selectItem: function(o, i) {
|