markupeditor 0.9.10 → 0.9.11
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/dist/markup-editor.js +11 -5
- package/package.json +1 -1
package/dist/markup-editor.js
CHANGED
|
@@ -14767,6 +14767,7 @@ let baseNodes = OrderedMap.from({
|
|
|
14767
14767
|
div: {
|
|
14768
14768
|
content: "block*",
|
|
14769
14769
|
group: "block",
|
|
14770
|
+
isolating: true, // Prevent operations like lift from going outside of a div
|
|
14770
14771
|
selectable: false,
|
|
14771
14772
|
attrs: {
|
|
14772
14773
|
id: {default: null},
|
|
@@ -14841,9 +14842,14 @@ let baseNodes = OrderedMap.from({
|
|
|
14841
14842
|
}
|
|
14842
14843
|
}
|
|
14843
14844
|
}],
|
|
14844
|
-
toDOM(node) {
|
|
14845
|
-
let {id, cssClass} = node.attrs;
|
|
14846
|
-
|
|
14845
|
+
toDOM(node) {
|
|
14846
|
+
let {id, cssClass, label} = node.attrs;
|
|
14847
|
+
const button = document.createElement("button");
|
|
14848
|
+
if (id) button.setAttribute("id", id);
|
|
14849
|
+
if (cssClass) button.setAttribute("class", cssClass);
|
|
14850
|
+
button.setAttribute("type", "button");
|
|
14851
|
+
if (label) button.innerHTML = label;
|
|
14852
|
+
return button;
|
|
14847
14853
|
}
|
|
14848
14854
|
}
|
|
14849
14855
|
|
|
@@ -17069,7 +17075,7 @@ function _buttonGroupDiv(buttonGroupJSON) {
|
|
|
17069
17075
|
buttonGroupDiv.setAttribute('editable', "false"); // Hardcode
|
|
17070
17076
|
buttonGroup.buttons.forEach( buttonAttributes => {
|
|
17071
17077
|
let button = document.createElement('button');
|
|
17072
|
-
button.
|
|
17078
|
+
button.innerHTML = buttonAttributes.label;
|
|
17073
17079
|
button.setAttribute('label', buttonAttributes.label);
|
|
17074
17080
|
button.setAttribute('type', 'button');
|
|
17075
17081
|
button.setAttribute('id', buttonAttributes.id);
|
|
@@ -17126,7 +17132,7 @@ function addButton(id, parentId, cssClass, label) {
|
|
|
17126
17132
|
button.setAttribute('parentId', parentId);
|
|
17127
17133
|
button.setAttribute('class', cssClass);
|
|
17128
17134
|
button.setAttribute('type', 'button');
|
|
17129
|
-
button.
|
|
17135
|
+
button.innerHTML = label;
|
|
17130
17136
|
const buttonSlice = _sliceFromElement(button);
|
|
17131
17137
|
const buttonNode = buttonNodeType.create({id, parentId, cssClass, label}, buttonSlice.content);
|
|
17132
17138
|
const transaction = view.state.tr;
|