Skip to content

Commit 94c4a00

Browse files
authored
Bugfix: RTE TinyMCE data-type sorts configuration field order (#2279)
TinyMCE data-type adds weight to config
1 parent aedca0d commit 94c4a00

File tree

2 files changed

+16
-6
lines changed

2 files changed

+16
-6
lines changed

src/packages/tiny-mce/property-editors/tiny-mce/Umbraco.RichText.ts

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,26 @@ export const manifest: ManifestPropertyEditorSchema = {
88
defaultPropertyEditorUiAlias: 'Umb.PropertyEditorUi.TinyMCE',
99
settings: {
1010
properties: [
11+
{
12+
alias: 'blocks',
13+
label: 'Available Blocks',
14+
description: 'Define the available blocks.',
15+
propertyEditorUiAlias: 'Umb.PropertyEditorUi.BlockRteTypeConfiguration',
16+
weight: 80,
17+
},
1118
{
1219
alias: 'mediaParentId',
1320
label: 'Image Upload Folder',
1421
description: 'Choose the upload location of pasted images',
1522
propertyEditorUiAlias: 'Umb.PropertyEditorUi.MediaEntityPicker',
1623
config: [{ alias: 'validationLimit', value: { min: 0, max: 1 } }],
24+
weight: 90,
1725
},
1826
{
1927
alias: 'ignoreUserStartNodes',
2028
label: 'Ignore User Start Nodes',
2129
propertyEditorUiAlias: 'Umb.PropertyEditorUi.Toggle',
22-
},
23-
{
24-
alias: 'blocks',
25-
label: 'Available Blocks',
26-
description: 'Define the available blocks.',
27-
propertyEditorUiAlias: 'Umb.PropertyEditorUi.BlockRteTypeConfiguration',
30+
weight: 100,
2831
},
2932
],
3033
},

src/packages/tiny-mce/property-editors/tiny-mce/manifests.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ const manifest: ManifestPropertyEditorUi = {
2222
label: 'Toolbar',
2323
description: 'Pick the toolbar options that should be available when editing',
2424
propertyEditorUiAlias: 'Umb.PropertyEditorUI.TinyMCE.ToolbarConfiguration',
25+
weight: 10,
2526
config: [
2627
{
2728
alias: 'toolbar',
@@ -68,36 +69,42 @@ const manifest: ManifestPropertyEditorUi = {
6869
label: 'Stylesheets',
6970
description: 'Pick the stylesheets whose editor styles should be available when editing',
7071
propertyEditorUiAlias: 'Umb.PropertyEditorUI.TinyMCE.StylesheetsConfiguration',
72+
weight: 20,
7173
},
7274
{
7375
alias: 'dimensions',
7476
label: 'Dimensions',
7577
description: 'Set the editor dimensions',
7678
propertyEditorUiAlias: 'Umb.PropertyEditorUI.TinyMCE.DimensionsConfiguration',
79+
weight: 30,
7780
},
7881
{
7982
alias: 'maxImageSize',
8083
label: 'Maximum size for inserted images',
8184
description: 'Maximum width or height - enter 0 to disable resizing',
8285
propertyEditorUiAlias: 'Umb.PropertyEditorUI.TinyMCE.MaxImageSizeConfiguration',
86+
weight: 40,
8387
},
8488
{
8589
alias: 'mode',
8690
label: 'Mode',
8791
description: 'Select the mode for the editor',
8892
propertyEditorUiAlias: 'Umb.PropertyEditorUi.RadioButtonList',
8993
config: [{ alias: 'items', value: ['Classic', 'Inline'] }],
94+
weight: 50,
9095
},
9196
{
9297
alias: 'overlaySize',
9398
label: 'Overlay Size',
9499
description: 'Select the width of the overlay (link picker)',
95100
propertyEditorUiAlias: 'Umb.PropertyEditorUi.OverlaySize',
101+
weight: 81,
96102
},
97103
{
98104
alias: 'hideLabel',
99105
label: 'Hide Label',
100106
propertyEditorUiAlias: 'Umb.PropertyEditorUi.Toggle',
107+
weight: 82,
101108
},
102109
],
103110
defaultData: [

0 commit comments

Comments
 (0)