@elementor/editor-controls 3.35.0-449 → 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.mjs CHANGED
@@ -6286,7 +6286,7 @@ var InlineEditorToolbar = ({ editor, elementId }) => {
6286
6286
  var ITALIC_KEYBOARD_SHORTCUT = "i";
6287
6287
  var BOLD_KEYBOARD_SHORTCUT = "b";
6288
6288
  var UNDERLINE_KEYBOARD_SHORTCUT = "u";
6289
- var INITIAL_STYLE = "margin:0;padding:0;";
6289
+ var INLINE_EDITOR_RESET_CLASS = "elementor-inline-editor-reset";
6290
6290
  var useOnUpdate = (callback, dependencies) => {
6291
6291
  const hasMounted = useRef26(false);
6292
6292
  useEffect12(() => {
@@ -6373,6 +6373,7 @@ var InlineEditor = forwardRef10(
6373
6373
  const newValue = updatedEditor.getHTML();
6374
6374
  setValue(isEmpty(newValue) ? null : newValue);
6375
6375
  };
6376
+ const classes = `${INLINE_EDITOR_RESET_CLASS} ${elementClasses}`;
6376
6377
  const editor = useEditor({
6377
6378
  extensions: [
6378
6379
  Document.extend({
@@ -6381,20 +6382,16 @@ var InlineEditor = forwardRef10(
6381
6382
  Paragraph.extend({
6382
6383
  renderHTML({ HTMLAttributes }) {
6383
6384
  const tag = expectedTag ?? "p";
6384
- return [tag, { ...HTMLAttributes, style: INITIAL_STYLE, class: elementClasses }, 0];
6385
+ return [tag, { ...HTMLAttributes, class: classes }, 0];
6385
6386
  }
6386
6387
  }),
6387
6388
  Heading.extend({
6388
6389
  renderHTML({ node, HTMLAttributes }) {
6389
6390
  if (expectedTag) {
6390
- return [
6391
- expectedTag,
6392
- { ...HTMLAttributes, style: INITIAL_STYLE, class: elementClasses },
6393
- 0
6394
- ];
6391
+ return [expectedTag, { ...HTMLAttributes, class: classes }, 0];
6395
6392
  }
6396
6393
  const level = this.options.levels.includes(node.attrs.level) ? node.attrs.level : this.options.levels[0];
6397
- return [`h${level}`, { ...HTMLAttributes, style: INITIAL_STYLE, class: elementClasses }, 0];
6394
+ return [`h${level}`, { ...HTMLAttributes, class: classes }, 0];
6398
6395
  }
6399
6396
  }).configure({
6400
6397
  levels: [1, 2, 3, 4, 5, 6]
@@ -6507,6 +6504,10 @@ var InlineEditingControl = createControl(
6507
6504
  fontSize: "12px",
6508
6505
  "& a": {
6509
6506
  color: "inherit"
6507
+ },
6508
+ "& .elementor-inline-editor-reset": {
6509
+ margin: 0,
6510
+ padding: 0
6510
6511
  }
6511
6512
  },
6512
6513
  ".strip-styles *": {