@innovastudio/contentbuilder 1.3.23 → 1.3.24
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
|
@@ -70555,7 +70555,7 @@ class Rte {
|
|
|
70555
70555
|
|
|
70556
70556
|
if (count < 3) {
|
|
70557
70557
|
//not used
|
|
70558
|
-
|
|
70558
|
+
let attr = links[i].getAttribute('data-protect');
|
|
70559
70559
|
|
|
70560
70560
|
if (!attr) {
|
|
70561
70561
|
links[i].setAttribute('data-rel', '_del');
|
|
@@ -70704,10 +70704,10 @@ class Rte {
|
|
|
70704
70704
|
|
|
70705
70705
|
let cssUrl = '';
|
|
70706
70706
|
|
|
70707
|
-
if (this.builder.
|
|
70707
|
+
if (this.builder.fontPath) {
|
|
70708
70708
|
const cssFileName = fontfamily.split(',')[0].toLowerCase().replace(/\s/g, '-') + '.css';
|
|
70709
|
-
cssUrl = this.builder.
|
|
70710
|
-
dom.appendHtml(element, `<link href="${cssUrl}" rel="stylesheet" property="stylesheet" type="text/css">`);
|
|
70709
|
+
cssUrl = this.builder.fontPath + cssFileName;
|
|
70710
|
+
dom.appendHtml(element, `<link data-name="fontfamily" href="${cssUrl}" rel="stylesheet" property="stylesheet" type="text/css">`);
|
|
70711
70711
|
} else {
|
|
70712
70712
|
dom.appendHtml(element, '<link href="//fonts.googleapis.com/css?family=' + fontname + d + o + '" rel="stylesheet" property="stylesheet" type="text/css">');
|
|
70713
70713
|
}
|
|
@@ -70781,7 +70781,7 @@ class Rte {
|
|
|
70781
70781
|
|
|
70782
70782
|
if (!used) {
|
|
70783
70783
|
//not used
|
|
70784
|
-
|
|
70784
|
+
let attr = links[i].getAttribute('data-protect');
|
|
70785
70785
|
|
|
70786
70786
|
if (!attr) {
|
|
70787
70787
|
links[i].setAttribute('data-rel', '_del');
|
|
@@ -70789,12 +70789,30 @@ class Rte {
|
|
|
70789
70789
|
} // var count = tmp.split(fontname).length;
|
|
70790
70790
|
// if(count<3){
|
|
70791
70791
|
// //not used
|
|
70792
|
-
//
|
|
70792
|
+
// let attr = links[i].getAttribute('data-protect');
|
|
70793
70793
|
// if (!attr) {
|
|
70794
70794
|
// links[i].setAttribute('data-rel','_del');
|
|
70795
70795
|
// }
|
|
70796
70796
|
// }
|
|
70797
70797
|
|
|
70798
|
+
} else if (links[i].getAttribute('data-name') === 'fontfamily') {
|
|
70799
|
+
let used = false;
|
|
70800
|
+
fonts.forEach(item => {
|
|
70801
|
+
const cssFileName = item.split(',')[0].replace(/"/g, '').replace(/\s/g, '').toLowerCase() + '.css';
|
|
70802
|
+
|
|
70803
|
+
if (sSrc.toLowerCase().indexOf('/' + cssFileName) === -1) ; else {
|
|
70804
|
+
used = true;
|
|
70805
|
+
}
|
|
70806
|
+
});
|
|
70807
|
+
|
|
70808
|
+
if (!used) {
|
|
70809
|
+
//not used
|
|
70810
|
+
let attr = links[i].getAttribute('data-protect');
|
|
70811
|
+
|
|
70812
|
+
if (!attr) {
|
|
70813
|
+
links[i].setAttribute('data-rel', '_del');
|
|
70814
|
+
}
|
|
70815
|
+
}
|
|
70798
70816
|
}
|
|
70799
70817
|
}
|
|
70800
70818
|
|
|
@@ -73899,7 +73917,7 @@ class ContentBuilder {
|
|
|
73899
73917
|
// Used for the location of ionicons/ (see rte.js 2788) & scripts/ (see plugins/preview/plugin.js 237)
|
|
73900
73918
|
fontAssetPath: 'assets/fonts/',
|
|
73901
73919
|
// Option for self-hosted fonts:
|
|
73902
|
-
//
|
|
73920
|
+
// fontPath: 'assets/googlefonts/', // If set, will be used
|
|
73903
73921
|
snippetData: 'assets/minimalist-blocks/snippetlist.html',
|
|
73904
73922
|
// Deprecated
|
|
73905
73923
|
snippetUrl: 'assets/minimalist-blocks/content.js',
|