diff --git a/src-web/components/core/Editor/twig/templateTags.ts b/src-web/components/core/Editor/twig/templateTags.ts index a24fa624..bad0a43e 100644 --- a/src-web/components/core/Editor/twig/templateTags.ts +++ b/src-web/components/core/Editor/twig/templateTags.ts @@ -165,6 +165,10 @@ function templateTags( }, }); } + + // Widgets must be sorted start to end + widgets.sort((a, b) => a.from - b.from); + return Decoration.set(widgets); }