@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/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elementor/editor-controls",
|
|
3
3
|
"description": "This package contains the controls model and utils for the Elementor editor",
|
|
4
|
-
"version": "3.35.0-
|
|
4
|
+
"version": "3.35.0-451",
|
|
5
5
|
"private": false,
|
|
6
6
|
"author": "Elementor Team",
|
|
7
7
|
"homepage": "https://elementor.com/",
|
|
@@ -40,22 +40,22 @@
|
|
|
40
40
|
"dev": "tsup --config=../../tsup.dev.ts"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@elementor/editor-current-user": "3.35.0-
|
|
44
|
-
"@elementor/editor-elements": "3.35.0-
|
|
45
|
-
"@elementor/editor-props": "3.35.0-
|
|
46
|
-
"@elementor/editor-responsive": "3.35.0-
|
|
47
|
-
"@elementor/editor-ui": "3.35.0-
|
|
48
|
-
"@elementor/editor-v1-adapters": "3.35.0-
|
|
49
|
-
"@elementor/env": "3.35.0-
|
|
50
|
-
"@elementor/http-client": "3.35.0-
|
|
43
|
+
"@elementor/editor-current-user": "3.35.0-451",
|
|
44
|
+
"@elementor/editor-elements": "3.35.0-451",
|
|
45
|
+
"@elementor/editor-props": "3.35.0-451",
|
|
46
|
+
"@elementor/editor-responsive": "3.35.0-451",
|
|
47
|
+
"@elementor/editor-ui": "3.35.0-451",
|
|
48
|
+
"@elementor/editor-v1-adapters": "3.35.0-451",
|
|
49
|
+
"@elementor/env": "3.35.0-451",
|
|
50
|
+
"@elementor/http-client": "3.35.0-451",
|
|
51
51
|
"@elementor/icons": "^1.63.0",
|
|
52
|
-
"@elementor/locations": "3.35.0-
|
|
53
|
-
"@elementor/mixpanel": "3.35.0-
|
|
54
|
-
"@elementor/query": "3.35.0-
|
|
55
|
-
"@elementor/session": "3.35.0-
|
|
52
|
+
"@elementor/locations": "3.35.0-451",
|
|
53
|
+
"@elementor/mixpanel": "3.35.0-451",
|
|
54
|
+
"@elementor/query": "3.35.0-451",
|
|
55
|
+
"@elementor/session": "3.35.0-451",
|
|
56
56
|
"@elementor/ui": "1.36.17",
|
|
57
|
-
"@elementor/utils": "3.35.0-
|
|
58
|
-
"@elementor/wp-media": "3.35.0-
|
|
57
|
+
"@elementor/utils": "3.35.0-451",
|
|
58
|
+
"@elementor/wp-media": "3.35.0-451",
|
|
59
59
|
"@wordpress/i18n": "^5.13.0",
|
|
60
60
|
"@monaco-editor/react": "^4.7.0",
|
|
61
61
|
"dayjs": "^1.11.18",
|
|
@@ -47,7 +47,7 @@ type InlineEditorProps = {
|
|
|
47
47
|
elementId?: ElementID;
|
|
48
48
|
};
|
|
49
49
|
|
|
50
|
-
const
|
|
50
|
+
const INLINE_EDITOR_RESET_CLASS = 'elementor-inline-editor-reset';
|
|
51
51
|
|
|
52
52
|
const useOnUpdate = ( callback: () => void, dependencies: DependencyList ): void => {
|
|
53
53
|
const hasMounted = useRef( false );
|
|
@@ -181,6 +181,8 @@ export const InlineEditor = forwardRef(
|
|
|
181
181
|
setValue( isEmpty( newValue ) ? null : newValue );
|
|
182
182
|
};
|
|
183
183
|
|
|
184
|
+
const classes = `${ INLINE_EDITOR_RESET_CLASS } ${ elementClasses }`;
|
|
185
|
+
|
|
184
186
|
const editor = useEditor( {
|
|
185
187
|
extensions: [
|
|
186
188
|
Document.extend( {
|
|
@@ -189,24 +191,20 @@ export const InlineEditor = forwardRef(
|
|
|
189
191
|
Paragraph.extend( {
|
|
190
192
|
renderHTML( { HTMLAttributes } ) {
|
|
191
193
|
const tag = expectedTag ?? 'p';
|
|
192
|
-
return [ tag, { ...HTMLAttributes,
|
|
194
|
+
return [ tag, { ...HTMLAttributes, class: classes }, 0 ];
|
|
193
195
|
},
|
|
194
196
|
} ),
|
|
195
197
|
Heading.extend( {
|
|
196
198
|
renderHTML( { node, HTMLAttributes } ) {
|
|
197
199
|
if ( expectedTag ) {
|
|
198
|
-
return [
|
|
199
|
-
expectedTag,
|
|
200
|
-
{ ...HTMLAttributes, style: INITIAL_STYLE, class: elementClasses },
|
|
201
|
-
0,
|
|
202
|
-
];
|
|
200
|
+
return [ expectedTag, { ...HTMLAttributes, class: classes }, 0 ];
|
|
203
201
|
}
|
|
204
202
|
|
|
205
203
|
const level = this.options.levels.includes( node.attrs.level )
|
|
206
204
|
? node.attrs.level
|
|
207
205
|
: this.options.levels[ 0 ];
|
|
208
206
|
|
|
209
|
-
return [ `h${ level }`, { ...HTMLAttributes,
|
|
207
|
+
return [ `h${ level }`, { ...HTMLAttributes, class: classes }, 0 ];
|
|
210
208
|
},
|
|
211
209
|
} ).configure( {
|
|
212
210
|
levels: [ 1, 2, 3, 4, 5, 6 ],
|