@elementor/editor-controls 3.35.0-450 → 3.35.0-451
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/index.js
CHANGED
|
@@ -6271,7 +6271,7 @@ var InlineEditorToolbar = ({ editor, elementId }) => {
|
|
|
6271
6271
|
var ITALIC_KEYBOARD_SHORTCUT = "i";
|
|
6272
6272
|
var BOLD_KEYBOARD_SHORTCUT = "b";
|
|
6273
6273
|
var UNDERLINE_KEYBOARD_SHORTCUT = "u";
|
|
6274
|
-
var
|
|
6274
|
+
var INLINE_EDITOR_RESET_CLASS = "elementor-inline-editor-reset";
|
|
6275
6275
|
var useOnUpdate = (callback, dependencies) => {
|
|
6276
6276
|
const hasMounted = (0, import_react56.useRef)(false);
|
|
6277
6277
|
(0, import_react56.useEffect)(() => {
|
|
@@ -6358,6 +6358,7 @@ var InlineEditor = (0, import_react56.forwardRef)(
|
|
|
6358
6358
|
const newValue = updatedEditor.getHTML();
|
|
6359
6359
|
setValue(isEmpty(newValue) ? null : newValue);
|
|
6360
6360
|
};
|
|
6361
|
+
const classes = `${INLINE_EDITOR_RESET_CLASS} ${elementClasses}`;
|
|
6361
6362
|
const editor = (0, import_react57.useEditor)({
|
|
6362
6363
|
extensions: [
|
|
6363
6364
|
import_extension_document.default.extend({
|
|
@@ -6366,20 +6367,16 @@ var InlineEditor = (0, import_react56.forwardRef)(
|
|
|
6366
6367
|
import_extension_paragraph.default.extend({
|
|
6367
6368
|
renderHTML({ HTMLAttributes }) {
|
|
6368
6369
|
const tag = expectedTag ?? "p";
|
|
6369
|
-
return [tag, { ...HTMLAttributes,
|
|
6370
|
+
return [tag, { ...HTMLAttributes, class: classes }, 0];
|
|
6370
6371
|
}
|
|
6371
6372
|
}),
|
|
6372
6373
|
import_extension_heading.default.extend({
|
|
6373
6374
|
renderHTML({ node, HTMLAttributes }) {
|
|
6374
6375
|
if (expectedTag) {
|
|
6375
|
-
return [
|
|
6376
|
-
expectedTag,
|
|
6377
|
-
{ ...HTMLAttributes, style: INITIAL_STYLE, class: elementClasses },
|
|
6378
|
-
0
|
|
6379
|
-
];
|
|
6376
|
+
return [expectedTag, { ...HTMLAttributes, class: classes }, 0];
|
|
6380
6377
|
}
|
|
6381
6378
|
const level = this.options.levels.includes(node.attrs.level) ? node.attrs.level : this.options.levels[0];
|
|
6382
|
-
return [`h${level}`, { ...HTMLAttributes,
|
|
6379
|
+
return [`h${level}`, { ...HTMLAttributes, class: classes }, 0];
|
|
6383
6380
|
}
|
|
6384
6381
|
}).configure({
|
|
6385
6382
|
levels: [1, 2, 3, 4, 5, 6]
|
|
@@ -6492,6 +6489,10 @@ var InlineEditingControl = createControl(
|
|
|
6492
6489
|
fontSize: "12px",
|
|
6493
6490
|
"& a": {
|
|
6494
6491
|
color: "inherit"
|
|
6492
|
+
},
|
|
6493
|
+
"& .elementor-inline-editor-reset": {
|
|
6494
|
+
margin: 0,
|
|
6495
|
+
padding: 0
|
|
6495
6496
|
}
|
|
6496
6497
|
},
|
|
6497
6498
|
".strip-styles *": {
|