@innovastudio/contentbuilder 1.2.2 → 1.2.3
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
|
@@ -14007,10 +14007,20 @@ class HtmlUtil {
|
|
|
14007
14007
|
}
|
|
14008
14008
|
|
|
14009
14009
|
viewHtmlExternal() {
|
|
14010
|
-
const source = document.querySelector('textarea[data-source-active]');
|
|
14011
14010
|
const util = this.builder.util;
|
|
14012
14011
|
const builderStuff = this.builder.builderStuff;
|
|
14013
14012
|
const viewhtmlexternal = builderStuff.querySelector('.viewhtmlexternal');
|
|
14013
|
+
util.showModal(viewhtmlexternal, true, null, false);
|
|
14014
|
+
let codeEditor = viewhtmlexternal.querySelector('.input-code-editor');
|
|
14015
|
+
codeEditor.style.opacity = 0.01;
|
|
14016
|
+
|
|
14017
|
+
this._viewHtmlExternal();
|
|
14018
|
+
}
|
|
14019
|
+
|
|
14020
|
+
_viewHtmlExternal() {
|
|
14021
|
+
const source = document.querySelector('textarea[data-source-active]');
|
|
14022
|
+
const builderStuff = this.builder.builderStuff;
|
|
14023
|
+
const viewhtmlexternal = builderStuff.querySelector('.viewhtmlexternal');
|
|
14014
14024
|
let codeEditor = viewhtmlexternal.querySelector('.input-code-editor');
|
|
14015
14025
|
|
|
14016
14026
|
if (!codeEditor.querySelector('.monaco-editor')) {
|
|
@@ -14041,15 +14051,15 @@ class HtmlUtil {
|
|
|
14041
14051
|
});
|
|
14042
14052
|
});
|
|
14043
14053
|
setTimeout(() => {
|
|
14044
|
-
this.
|
|
14054
|
+
this._viewHtmlExternal();
|
|
14045
14055
|
}, 100);
|
|
14046
14056
|
return;
|
|
14047
|
-
}
|
|
14057
|
+
} // code editor
|
|
14048
14058
|
|
|
14049
|
-
util.showModal(viewhtmlexternal, true, null, false); // code editor
|
|
14050
14059
|
|
|
14051
14060
|
const model = this.builder.monaco.editor.createModel(source.value, 'html');
|
|
14052
14061
|
this.builder.codeEditorExternal.setModel(model);
|
|
14062
|
+
codeEditor.style.opacity = '';
|
|
14053
14063
|
}
|
|
14054
14064
|
|
|
14055
14065
|
view(mode, area) {
|
|
@@ -14057,6 +14067,24 @@ class HtmlUtil {
|
|
|
14057
14067
|
const builderStuff = this.builder.builderStuff;
|
|
14058
14068
|
let viewhtml;
|
|
14059
14069
|
|
|
14070
|
+
if (this.builder.opts.htmlSyntaxHighlighting) {
|
|
14071
|
+
viewhtml = builderStuff.querySelector('.viewhtmlmonaco');
|
|
14072
|
+
} else {
|
|
14073
|
+
viewhtml = builderStuff.querySelector('.viewhtml');
|
|
14074
|
+
}
|
|
14075
|
+
|
|
14076
|
+
util.showModal(viewhtml, true);
|
|
14077
|
+
let codeEditor = viewhtml.querySelector('.input-code-editor');
|
|
14078
|
+
codeEditor.style.opacity = 0.01;
|
|
14079
|
+
|
|
14080
|
+
this._view(mode, area);
|
|
14081
|
+
}
|
|
14082
|
+
|
|
14083
|
+
_view(mode, area) {
|
|
14084
|
+
const util = this.builder.util;
|
|
14085
|
+
const builderStuff = this.builder.builderStuff;
|
|
14086
|
+
let viewhtml;
|
|
14087
|
+
|
|
14060
14088
|
if (this.builder.opts.htmlSyntaxHighlighting) {
|
|
14061
14089
|
viewhtml = builderStuff.querySelector('.viewhtmlmonaco');
|
|
14062
14090
|
let codeEditor = viewhtml.querySelector('.input-code-editor');
|
|
@@ -14089,7 +14117,7 @@ class HtmlUtil {
|
|
|
14089
14117
|
});
|
|
14090
14118
|
});
|
|
14091
14119
|
setTimeout(() => {
|
|
14092
|
-
this.
|
|
14120
|
+
this._view(mode, area);
|
|
14093
14121
|
}, 100);
|
|
14094
14122
|
return;
|
|
14095
14123
|
}
|
|
@@ -14097,8 +14125,7 @@ class HtmlUtil {
|
|
|
14097
14125
|
viewhtml = builderStuff.querySelector('.viewhtml');
|
|
14098
14126
|
}
|
|
14099
14127
|
|
|
14100
|
-
let textarea = viewhtml.querySelector('textarea');
|
|
14101
|
-
util.showModal(viewhtml, true);
|
|
14128
|
+
let textarea = viewhtml.querySelector('textarea'); // util.showModal(viewhtml, true);
|
|
14102
14129
|
|
|
14103
14130
|
if (mode === 'cell') {
|
|
14104
14131
|
// old: 3550
|
|
@@ -14113,9 +14140,19 @@ class HtmlUtil {
|
|
|
14113
14140
|
|
|
14114
14141
|
if (mode === 'row') {
|
|
14115
14142
|
// old: 15534
|
|
14116
|
-
const cell = util.cellSelected();
|
|
14117
|
-
if
|
|
14118
|
-
const row = cell.parentNode;
|
|
14143
|
+
// const cell = util.cellSelected();
|
|
14144
|
+
// if(!cell) return;
|
|
14145
|
+
// const row = cell.parentNode;
|
|
14146
|
+
let row;
|
|
14147
|
+
let cell = util.cellSelected();
|
|
14148
|
+
|
|
14149
|
+
if (cell) {
|
|
14150
|
+
row = cell.parentNode;
|
|
14151
|
+
} else {
|
|
14152
|
+
row = util.rowSelected();
|
|
14153
|
+
}
|
|
14154
|
+
|
|
14155
|
+
if (!row) return;
|
|
14119
14156
|
let textarea = viewhtml.querySelector('textarea');
|
|
14120
14157
|
this.builder.cleanHtmlFormatting = true;
|
|
14121
14158
|
textarea.value = this.readHtml(row, true); // for view=true
|
|
@@ -14178,6 +14215,8 @@ class HtmlUtil {
|
|
|
14178
14215
|
rowMore.style.display = '';
|
|
14179
14216
|
this.builder.codeEditorMode = mode;
|
|
14180
14217
|
this.builder.codeEditorArea = area;
|
|
14218
|
+
let codeEditor = viewhtml.querySelector('.input-code-editor');
|
|
14219
|
+
codeEditor.style.opacity = '';
|
|
14181
14220
|
}
|
|
14182
14221
|
|
|
14183
14222
|
fromViewToActual(html) {
|