@jx3box/jx3box-editor 2.2.45 → 2.2.47
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/assets/css/article.less +1 -0
- package/assets/css/tinymce/voice.less +331 -0
- package/assets/js/audio.js +249 -0
- package/package.json +1 -1
- package/public/css/article.css +316 -0
- package/public/tinymce.html +9 -7
- package/src/Article.vue +3 -0
- package/src/ArticleMarkdown.vue +3 -0
- package/src/Tinymce.vue +190 -137
- package/test-audio.html +121 -0
package/public/css/article.css
CHANGED
|
@@ -767,6 +767,7 @@
|
|
|
767
767
|
margin-top: 0;
|
|
768
768
|
margin-bottom: 0;
|
|
769
769
|
line-height: 1.1;
|
|
770
|
+
text-combine-upright: none !important;
|
|
770
771
|
}
|
|
771
772
|
.w-qixue-box .w-qixue-clist {
|
|
772
773
|
margin: 0;
|
|
@@ -1400,6 +1401,321 @@
|
|
|
1400
1401
|
padding: 2px 8px;
|
|
1401
1402
|
line-height: 21px;
|
|
1402
1403
|
}
|
|
1404
|
+
.e-audio {
|
|
1405
|
+
min-height: 24px;
|
|
1406
|
+
border-radius: 4px;
|
|
1407
|
+
font-size: 14px;
|
|
1408
|
+
width: 100%;
|
|
1409
|
+
box-sizing: border-box;
|
|
1410
|
+
background-color: #f1f8ff;
|
|
1411
|
+
border: 1px solid #c8e1ff;
|
|
1412
|
+
color: #62a9ff;
|
|
1413
|
+
line-height: 1.6 !important;
|
|
1414
|
+
padding: 10px;
|
|
1415
|
+
padding-right: 135px;
|
|
1416
|
+
font-family: Monaco, Consolas, "Lucida Console", "Courier New", serif;
|
|
1417
|
+
word-break: break-all;
|
|
1418
|
+
white-space: pre-wrap !important;
|
|
1419
|
+
overflow-wrap: break-word;
|
|
1420
|
+
position: relative;
|
|
1421
|
+
*zoom: 1;
|
|
1422
|
+
}
|
|
1423
|
+
.e-audio:after {
|
|
1424
|
+
content: "JX3BOX·AUDIO";
|
|
1425
|
+
position: absolute;
|
|
1426
|
+
right: 8px;
|
|
1427
|
+
top: 8px;
|
|
1428
|
+
background-color: #62a9ff;
|
|
1429
|
+
color: #fff;
|
|
1430
|
+
border-radius: 3px;
|
|
1431
|
+
padding: 2px 8px;
|
|
1432
|
+
line-height: 21px;
|
|
1433
|
+
}
|
|
1434
|
+
.w-audio-player {
|
|
1435
|
+
position: relative;
|
|
1436
|
+
*zoom: 1;
|
|
1437
|
+
border-radius: 24px;
|
|
1438
|
+
box-sizing: border-box;
|
|
1439
|
+
width: 376px;
|
|
1440
|
+
background: rgba(255, 255, 255, 0.1);
|
|
1441
|
+
transition: all 0.3s ease-in-out;
|
|
1442
|
+
padding: 24px;
|
|
1443
|
+
}
|
|
1444
|
+
.w-audio-player .m-item {
|
|
1445
|
+
position: relative;
|
|
1446
|
+
cursor: pointer;
|
|
1447
|
+
border-radius: 16px;
|
|
1448
|
+
overflow: hidden;
|
|
1449
|
+
*zoom: 1;
|
|
1450
|
+
margin-bottom: 24px;
|
|
1451
|
+
color: #fff;
|
|
1452
|
+
padding: 32px 36px;
|
|
1453
|
+
box-sizing: border-box;
|
|
1454
|
+
width: 100%;
|
|
1455
|
+
background: linear-gradient(180deg, #7676f0 0%, #9495e9 100%);
|
|
1456
|
+
}
|
|
1457
|
+
.w-audio-player .m-item a {
|
|
1458
|
+
color: #fff;
|
|
1459
|
+
text-decoration: none;
|
|
1460
|
+
}
|
|
1461
|
+
.w-audio-player .m-item a:hover {
|
|
1462
|
+
text-decoration: none;
|
|
1463
|
+
box-shadow: none;
|
|
1464
|
+
}
|
|
1465
|
+
.w-audio-player .m-item img {
|
|
1466
|
+
padding: 0;
|
|
1467
|
+
margin: 0;
|
|
1468
|
+
border: none;
|
|
1469
|
+
}
|
|
1470
|
+
.w-audio-player .m-item::before {
|
|
1471
|
+
content: "";
|
|
1472
|
+
position: absolute;
|
|
1473
|
+
left: 0;
|
|
1474
|
+
top: 0;
|
|
1475
|
+
opacity: 0;
|
|
1476
|
+
filter: alpha(opacity=0);
|
|
1477
|
+
width: 100%;
|
|
1478
|
+
height: 100%;
|
|
1479
|
+
transition: opacity 0.3s ease-in-out;
|
|
1480
|
+
background: linear-gradient(180deg, #f9c27f 0%, #9697ed 100%);
|
|
1481
|
+
}
|
|
1482
|
+
.w-audio-player .m-item .u-title {
|
|
1483
|
+
display: flex;
|
|
1484
|
+
position: relative;
|
|
1485
|
+
*zoom: 1;
|
|
1486
|
+
font-weight: bold;
|
|
1487
|
+
font-size: 24px;
|
|
1488
|
+
text-align: center;
|
|
1489
|
+
justify-content: center;
|
|
1490
|
+
align-items: center;
|
|
1491
|
+
max-width: 300px;
|
|
1492
|
+
box-sizing: border-box;
|
|
1493
|
+
font-family: "ALIMAMASHUHEITI";
|
|
1494
|
+
}
|
|
1495
|
+
.w-audio-player .m-item .u-title .clip {
|
|
1496
|
+
overflow: hidden;
|
|
1497
|
+
*zoom: 1;
|
|
1498
|
+
width: 100%;
|
|
1499
|
+
}
|
|
1500
|
+
.w-audio-player .m-item .u-title .marquee-wrapper {
|
|
1501
|
+
white-space: nowrap;
|
|
1502
|
+
position: relative;
|
|
1503
|
+
display: inline-block;
|
|
1504
|
+
transition: transform 0s linear;
|
|
1505
|
+
}
|
|
1506
|
+
.w-audio-player .m-item .u-title .marquee-wrapper.marquee-animate {
|
|
1507
|
+
animation: marquee linear infinite;
|
|
1508
|
+
animation-fill-mode: forwards;
|
|
1509
|
+
}
|
|
1510
|
+
.w-audio-player .m-item .u-title .marquee-text {
|
|
1511
|
+
display: inline-block;
|
|
1512
|
+
}
|
|
1513
|
+
.w-audio-player .m-item .u-title .marquee-text::after {
|
|
1514
|
+
content: "》";
|
|
1515
|
+
display: inline-block;
|
|
1516
|
+
}
|
|
1517
|
+
.w-audio-player .m-item .u-title .marquee-text::before {
|
|
1518
|
+
content: "《";
|
|
1519
|
+
display: inline-block;
|
|
1520
|
+
}
|
|
1521
|
+
.w-audio-player .m-item .u-title .marquee-text.copy {
|
|
1522
|
+
margin-left: 180px;
|
|
1523
|
+
display: none;
|
|
1524
|
+
}
|
|
1525
|
+
.w-audio-player .m-item .u-title .marquee-text.copy::after,
|
|
1526
|
+
.w-audio-player .m-item .u-title .marquee-text.copy::before {
|
|
1527
|
+
display: none;
|
|
1528
|
+
}
|
|
1529
|
+
.w-audio-player .m-item .u-title.marquee-active .marquee-text.copy {
|
|
1530
|
+
display: inline-block;
|
|
1531
|
+
}
|
|
1532
|
+
.w-audio-player .m-item .u-title.marquee-active .marquee-animate .marquee-text::after,
|
|
1533
|
+
.w-audio-player .m-item .u-title.marquee-active .marquee-animate .marquee-text::before {
|
|
1534
|
+
display: none;
|
|
1535
|
+
}
|
|
1536
|
+
.w-audio-player .m-item .u-title.marquee-active::after {
|
|
1537
|
+
content: "》";
|
|
1538
|
+
display: inline-block;
|
|
1539
|
+
position: absolute;
|
|
1540
|
+
right: -28px;
|
|
1541
|
+
top: 50%;
|
|
1542
|
+
transform: translateY(-50%);
|
|
1543
|
+
z-index: 1;
|
|
1544
|
+
}
|
|
1545
|
+
.w-audio-player .m-item .u-title.marquee-active::before {
|
|
1546
|
+
content: "《";
|
|
1547
|
+
display: inline-block;
|
|
1548
|
+
position: absolute;
|
|
1549
|
+
left: -28px;
|
|
1550
|
+
top: 50%;
|
|
1551
|
+
transform: translateY(-50%);
|
|
1552
|
+
z-index: 1;
|
|
1553
|
+
}
|
|
1554
|
+
.w-audio-player .m-item .u-author {
|
|
1555
|
+
text-align: center;
|
|
1556
|
+
font-size: 14px;
|
|
1557
|
+
opacity: 0.75;
|
|
1558
|
+
filter: alpha(opacity=75);
|
|
1559
|
+
margin-top: 5px;
|
|
1560
|
+
}
|
|
1561
|
+
.w-audio-player .m-item .m-record {
|
|
1562
|
+
position: relative;
|
|
1563
|
+
*zoom: 1;
|
|
1564
|
+
padding: 42px 0 3px 0;
|
|
1565
|
+
}
|
|
1566
|
+
.w-audio-player .m-item .m-record .u-needle {
|
|
1567
|
+
position: absolute;
|
|
1568
|
+
left: 50%;
|
|
1569
|
+
top: 0;
|
|
1570
|
+
width: 120px;
|
|
1571
|
+
height: 72px;
|
|
1572
|
+
margin-left: -10px;
|
|
1573
|
+
user-select: none;
|
|
1574
|
+
pointer-events: none;
|
|
1575
|
+
transition: transform 0.3s ease-out, top 0.3s ease-out, margin 0.3s ease-out;
|
|
1576
|
+
transform-origin: 0% 0%;
|
|
1577
|
+
transform: rotate(0deg);
|
|
1578
|
+
}
|
|
1579
|
+
.w-audio-player .m-item .m-record .u-needle.isPlaying {
|
|
1580
|
+
top: -3px;
|
|
1581
|
+
margin: 0;
|
|
1582
|
+
transform-origin: 0% 0%;
|
|
1583
|
+
transform: rotate(30deg);
|
|
1584
|
+
display: inline-block;
|
|
1585
|
+
}
|
|
1586
|
+
.w-audio-player .m-item .m-record .u-record {
|
|
1587
|
+
display: block;
|
|
1588
|
+
width: 182px;
|
|
1589
|
+
height: 182px;
|
|
1590
|
+
margin-left: auto;
|
|
1591
|
+
margin-right: auto;
|
|
1592
|
+
user-select: none;
|
|
1593
|
+
padding: 28px;
|
|
1594
|
+
box-sizing: border-box;
|
|
1595
|
+
background: url("https://cdn.jx3box.com/design/event/jx3cxk/web/item/record.svg") no-repeat center center;
|
|
1596
|
+
background-size: 100% 100%;
|
|
1597
|
+
}
|
|
1598
|
+
.w-audio-player .m-item .m-record .u-avatar {
|
|
1599
|
+
border-radius: 50%;
|
|
1600
|
+
width: 100%;
|
|
1601
|
+
height: 100%;
|
|
1602
|
+
object-fit: cover;
|
|
1603
|
+
transition: transform 0.6s ease-out;
|
|
1604
|
+
}
|
|
1605
|
+
.w-audio-player .m-item .m-record .u-avatar.isRotate {
|
|
1606
|
+
animation: rotate 6s linear infinite;
|
|
1607
|
+
}
|
|
1608
|
+
.w-audio-player .m-item .m-record .u-avatar.isRotate.isPaused {
|
|
1609
|
+
animation-play-state: paused;
|
|
1610
|
+
}
|
|
1611
|
+
.w-audio-player .m-item .m-progress {
|
|
1612
|
+
position: relative;
|
|
1613
|
+
*zoom: 1;
|
|
1614
|
+
margin: 16px 0;
|
|
1615
|
+
}
|
|
1616
|
+
.w-audio-player .m-item .m-progress .u-progress-bar {
|
|
1617
|
+
position: relative;
|
|
1618
|
+
*zoom: 1;
|
|
1619
|
+
height: 3px;
|
|
1620
|
+
background: rgba(65, 61, 82, 0.3);
|
|
1621
|
+
border-radius: 3px;
|
|
1622
|
+
cursor: pointer;
|
|
1623
|
+
overflow: visible;
|
|
1624
|
+
}
|
|
1625
|
+
.w-audio-player .m-item .m-progress .u-progress-bar .u-progress-fill {
|
|
1626
|
+
position: absolute;
|
|
1627
|
+
height: 100%;
|
|
1628
|
+
background: #fff;
|
|
1629
|
+
border-radius: 3px;
|
|
1630
|
+
width: 0%;
|
|
1631
|
+
transition: width 0.1s linear;
|
|
1632
|
+
}
|
|
1633
|
+
.w-audio-player .m-item .m-progress .u-progress-bar .u-progress-handle {
|
|
1634
|
+
position: absolute;
|
|
1635
|
+
top: 50%;
|
|
1636
|
+
left: 0%;
|
|
1637
|
+
width: 12px;
|
|
1638
|
+
height: 12px;
|
|
1639
|
+
background: #fff;
|
|
1640
|
+
border: 2px solid rgba(65, 61, 82, 0.3);
|
|
1641
|
+
border-radius: 50%;
|
|
1642
|
+
transform: translate(-50%, -50%);
|
|
1643
|
+
cursor: pointer;
|
|
1644
|
+
transition: left 0.1s linear;
|
|
1645
|
+
}
|
|
1646
|
+
.w-audio-player .m-item .m-play {
|
|
1647
|
+
position: relative;
|
|
1648
|
+
*zoom: 1;
|
|
1649
|
+
display: flex;
|
|
1650
|
+
padding-top: 10px;
|
|
1651
|
+
flex-wrap: wrap;
|
|
1652
|
+
justify-content: space-between;
|
|
1653
|
+
align-items: center;
|
|
1654
|
+
}
|
|
1655
|
+
.w-audio-player .m-item .m-play .u-play-button {
|
|
1656
|
+
display: flex;
|
|
1657
|
+
justify-content: space-between;
|
|
1658
|
+
width: 70%;
|
|
1659
|
+
box-sizing: border-box;
|
|
1660
|
+
margin: 0 15% 20px 15%;
|
|
1661
|
+
align-items: center;
|
|
1662
|
+
}
|
|
1663
|
+
.w-audio-player .m-item .m-play .u-icon {
|
|
1664
|
+
width: 24px;
|
|
1665
|
+
height: 24px;
|
|
1666
|
+
}
|
|
1667
|
+
.w-audio-player .m-item .m-play .u-play {
|
|
1668
|
+
width: 64px;
|
|
1669
|
+
height: 64px;
|
|
1670
|
+
}
|
|
1671
|
+
.w-audio-player .m-item .m-play .u-like {
|
|
1672
|
+
opacity: 0.75;
|
|
1673
|
+
filter: alpha(opacity=75);
|
|
1674
|
+
display: flex;
|
|
1675
|
+
align-items: center;
|
|
1676
|
+
gap: 5px;
|
|
1677
|
+
}
|
|
1678
|
+
.w-audio-player .m-item .m-play .u-like .u-icon {
|
|
1679
|
+
width: 20px;
|
|
1680
|
+
height: 20px;
|
|
1681
|
+
}
|
|
1682
|
+
.w-audio-player .m-item .m-play .u-link {
|
|
1683
|
+
opacity: 0.75;
|
|
1684
|
+
filter: alpha(opacity=75);
|
|
1685
|
+
color: #fff;
|
|
1686
|
+
}
|
|
1687
|
+
.w-audio-player.play .m-item {
|
|
1688
|
+
background: linear-gradient(180deg, #55c79f 0%, #9697ed 100%);
|
|
1689
|
+
}
|
|
1690
|
+
.w-audio-player:hover {
|
|
1691
|
+
background: rgba(255, 255, 255, 0.15);
|
|
1692
|
+
}
|
|
1693
|
+
.w-audio-player:hover .m-item::before {
|
|
1694
|
+
opacity: 1;
|
|
1695
|
+
filter: alpha(opacity=100);
|
|
1696
|
+
}
|
|
1697
|
+
@keyframes rotate {
|
|
1698
|
+
from {
|
|
1699
|
+
transform: rotate(0deg);
|
|
1700
|
+
}
|
|
1701
|
+
to {
|
|
1702
|
+
transform: rotate(360deg);
|
|
1703
|
+
}
|
|
1704
|
+
}
|
|
1705
|
+
@keyframes marquee {
|
|
1706
|
+
0% {
|
|
1707
|
+
transform: translateX(0);
|
|
1708
|
+
}
|
|
1709
|
+
100% {
|
|
1710
|
+
transform: translateX(-100%);
|
|
1711
|
+
}
|
|
1712
|
+
}
|
|
1713
|
+
.c-article-tinymce .e-audio {
|
|
1714
|
+
display: none;
|
|
1715
|
+
}
|
|
1716
|
+
.c-article-editor .e-audio {
|
|
1717
|
+
display: block;
|
|
1718
|
+
}
|
|
1403
1719
|
.c-article-directory h1,
|
|
1404
1720
|
.c-article-directory h2,
|
|
1405
1721
|
.c-article-directory h3,
|
package/public/tinymce.html
CHANGED
|
@@ -3,29 +3,31 @@
|
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="utf-8" />
|
|
5
5
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
|
|
6
|
-
<meta name="viewport" content="width=device-width,initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
|
|
6
|
+
<meta name="viewport" content="width=device-width,initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
|
|
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>
|
|
11
11
|
window.RX_TINYMCE_ROOT = "https://cdn.jx3box.com/static/tinymce";
|
|
12
|
+
// window.RX_TINYMCE_ROOT = "http://localhost:3000";
|
|
12
13
|
</script>
|
|
13
14
|
<script src="https://cdn.jx3box.com/static/tinymce/tinymce.min.js?v=1.9.0"></script>
|
|
14
15
|
<!-- TODO: -->
|
|
15
|
-
<!-- <script src="http://localhost:3000/tinymce.min.js"></script> -->
|
|
16
|
+
<!-- <script src="http://localhost:3000/tinymce.min.js?v=1.9.0"></script> -->
|
|
16
17
|
</head>
|
|
17
18
|
<body>
|
|
18
19
|
<div id="app"></div>
|
|
19
|
-
<div id="c-ie-tips" style="display:none;background-color: #fef0f0;color: #f56c6c;padding:10px;font-weight:bold;text-align:center;width:60%;margin:200px auto
|
|
20
|
+
<div id="c-ie-tips" style="display: none; background-color: #fef0f0; color: #f56c6c; padding: 10px; font-weight: bold; text-align: center; width: 60%; margin: 200px auto">
|
|
21
|
+
<p>你的浏览器版本太低,可能无法正常使用本站,建议下载<a href="https://www.google.cn/intl/zh-CN/chrome/" target="_blank">Chrome</a>或其它极速浏览器</p>
|
|
22
|
+
<p>www.jx3box.com</p>
|
|
23
|
+
</div>
|
|
20
24
|
<script>
|
|
21
25
|
let ua = window.navigator.userAgent.toLocaleLowerCase();
|
|
22
26
|
let isIE = ua.indexOf("trident") > 0 || ua.indexOf("msie") > 0;
|
|
23
27
|
if (isIE) document.getElementById("c-ie-tips").style.display = "block";
|
|
24
28
|
</script>
|
|
25
|
-
<div style="display:none
|
|
26
|
-
<script type="text/javascript"
|
|
27
|
-
src="https://s9.cnzz.com/z_stat.php?id=1277938200&web_id=1277938200">
|
|
28
|
-
</script>
|
|
29
|
+
<div style="display: none">
|
|
30
|
+
<script type="text/javascript" src="https://s9.cnzz.com/z_stat.php?id=1277938200&web_id=1277938200"></script>
|
|
29
31
|
</div>
|
|
30
32
|
</body>
|
|
31
33
|
</html>
|
package/src/Article.vue
CHANGED
|
@@ -66,6 +66,7 @@ import renderCode from "../assets/js/code";
|
|
|
66
66
|
import renderImgPreview from "../assets/js/renderImgPreview";
|
|
67
67
|
import renderPzIframe from "../assets/js/pz_iframe";
|
|
68
68
|
import renderCombo from "../assets/js/combo";
|
|
69
|
+
import renderAudio from "../assets/js/audio";
|
|
69
70
|
|
|
70
71
|
// 剑三
|
|
71
72
|
import Item from "./Item";
|
|
@@ -215,6 +216,8 @@ export default {
|
|
|
215
216
|
renderPzIframe();
|
|
216
217
|
// 连招
|
|
217
218
|
renderCombo();
|
|
219
|
+
// 音频
|
|
220
|
+
renderAudio();
|
|
218
221
|
// 物品
|
|
219
222
|
renderJx3Element(this);
|
|
220
223
|
},
|
package/src/ArticleMarkdown.vue
CHANGED
|
@@ -38,6 +38,7 @@ import Skill from "./Skill";
|
|
|
38
38
|
import Npc from "./Npc";
|
|
39
39
|
import renderJx3Element from "../assets/js/jx3_element";
|
|
40
40
|
import renderImgPreview from "../assets/js/renderImgPreview";
|
|
41
|
+
import renderAudio from "../assets/js/audio";
|
|
41
42
|
|
|
42
43
|
import {xssOptions} from '../assets/data/markdown_whitelist.json'
|
|
43
44
|
|
|
@@ -116,6 +117,8 @@ export default {
|
|
|
116
117
|
renderImgPreview(this);
|
|
117
118
|
// 语法高亮
|
|
118
119
|
renderCode(`code[class=^'lang-']`)
|
|
120
|
+
// 音频
|
|
121
|
+
renderAudio();
|
|
119
122
|
// 物品
|
|
120
123
|
renderJx3Element(this);
|
|
121
124
|
},
|