@wizishop/wizi-block 4.2.34-beta → 4.2.37-beta
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/bundles/wizishop-wizi-block.umd.js +25 -20
- package/bundles/wizishop-wizi-block.umd.js.map +1 -1
- package/bundles/wizishop-wizi-block.umd.min.js +1 -1
- package/bundles/wizishop-wizi-block.umd.min.js.map +1 -1
- package/esm2015/lib/shared/components/editorjs/tools/inline/tool-type/inline-style-tool.component.js +10 -8
- package/esm2015/lib/shared/components/editorjs/tools/paragraph/tool-type/text-edition.component.js +13 -13
- package/fesm2015/wizishop-wizi-block.js +21 -19
- package/fesm2015/wizishop-wizi-block.js.map +1 -1
- package/package.json +1 -1
- package/wizi-block.scss +491 -491
|
@@ -23,9 +23,6 @@ import { NgScrollbarModule } from 'ngx-scrollbar';
|
|
|
23
23
|
import { __awaiter } from 'tslib';
|
|
24
24
|
import EditorJS from '@editorjs/editorjs';
|
|
25
25
|
import iro from '@jaames/iro';
|
|
26
|
-
import { basicSetup, EditorView } from 'codemirror';
|
|
27
|
-
import { EditorState } from '@codemirror/state';
|
|
28
|
-
import { html } from '@codemirror/lang-html';
|
|
29
26
|
import { MonacoEditorModule } from 'ngx-monaco-editor';
|
|
30
27
|
import { tileLayer, latLng, marker, icon } from 'leaflet';
|
|
31
28
|
import { LeafletModule } from '@asymmetrik/ngx-leaflet';
|
|
@@ -19160,14 +19157,16 @@ class InlineStyleTool extends EditorJSTool {
|
|
|
19160
19157
|
}
|
|
19161
19158
|
identicalAttributes(currentElement, nextElement) {
|
|
19162
19159
|
let currentElementAttributes = currentElement.getAttributeNames();
|
|
19163
|
-
currentElementAttributes
|
|
19164
|
-
|
|
19165
|
-
if (
|
|
19166
|
-
nextElement.getAttribute(attribute)
|
|
19167
|
-
|
|
19160
|
+
if (currentElementAttributes) {
|
|
19161
|
+
currentElementAttributes.forEach((attribute) => {
|
|
19162
|
+
if (attribute !== 'style') {
|
|
19163
|
+
if (!nextElement.getAttribute(attribute) ||
|
|
19164
|
+
nextElement.getAttribute(attribute) !== currentElement.getAttribute(attribute)) {
|
|
19165
|
+
return false;
|
|
19166
|
+
}
|
|
19168
19167
|
}
|
|
19169
|
-
}
|
|
19170
|
-
}
|
|
19168
|
+
});
|
|
19169
|
+
}
|
|
19171
19170
|
return true;
|
|
19172
19171
|
}
|
|
19173
19172
|
identicalInlineStyle(currentElement, nextElement) {
|
|
@@ -22212,6 +22211,9 @@ class textSizeTool extends InlineTextTool {
|
|
|
22212
22211
|
}
|
|
22213
22212
|
textSizeTool.title = 'Text Size';
|
|
22214
22213
|
|
|
22214
|
+
// import { EditorView, basicSetup } from 'codemirror';
|
|
22215
|
+
// import { EditorState } from '@codemirror/state';
|
|
22216
|
+
// import { html } from '@codemirror/lang-html';
|
|
22215
22217
|
class TextEditionTool extends ParagraphStyleTool {
|
|
22216
22218
|
constructor() {
|
|
22217
22219
|
super(...arguments);
|
|
@@ -22281,15 +22283,15 @@ class TextEditionTool extends ParagraphStyleTool {
|
|
|
22281
22283
|
modal.appendChild(buttonContainer);
|
|
22282
22284
|
container.appendChild(modal);
|
|
22283
22285
|
document.body.appendChild(container);
|
|
22284
|
-
let state = EditorState.create({
|
|
22285
|
-
|
|
22286
|
-
|
|
22287
|
-
});
|
|
22288
|
-
let view = new EditorView({
|
|
22289
|
-
|
|
22290
|
-
|
|
22291
|
-
});
|
|
22292
|
-
saveButton.addEventListener('click', () => saveCodeEditModal(view.state.doc.toString()), true);
|
|
22286
|
+
// let state = EditorState.create({
|
|
22287
|
+
// doc: content,
|
|
22288
|
+
// extensions: [basicSetup, html()],
|
|
22289
|
+
// });
|
|
22290
|
+
// let view = new EditorView({
|
|
22291
|
+
// state: state,
|
|
22292
|
+
// parent: editorContainer,
|
|
22293
|
+
// });
|
|
22294
|
+
// saveButton.addEventListener('click', () => saveCodeEditModal(view.state.doc.toString()), true);
|
|
22293
22295
|
buttonContainer.appendChild(saveButton);
|
|
22294
22296
|
}
|
|
22295
22297
|
getSavedEditorContent(name) {
|