@@ -23,7 +23,7 @@ public function getFunctions(): array
2323 new TwigFunction ('getGridClass ' , [$ this , 'getGridClass ' ]),
2424 new TwigFunction ('generateHtmlBasedOnProperty ' , [$ this , 'generateHtmlBasedOnProperty ' ], ['is_safe ' => ['html ' ]]),
2525 new TwigFunction ('htmlAttr ' , [$ this , 'htmlAttr ' ], ['is_safe ' => ['html ' ]]),
26- new TwigFunction ('renderProseMirrorContent ' , [$ this , 'renderProseMirrorContent ' ], ['is_safe ' => ['html ' ]])
26+ new TwigFunction ('renderBlockEditorField ' , [$ this , 'renderBlockEditorField ' ], ['is_safe ' => ['html ' ]])
2727 ];
2828 }
2929
@@ -77,24 +77,24 @@ public function getContainersData(array $containers, array $containerRef): array
7777 return $ containerData ;
7878 }
7979
80- public function renderProseMirrorContent ($ content ): string
80+ public function renderBlockEditorField ($ content ): string
8181 {
8282 if (empty ($ content ) || !isset ($ content ['content ' ])) {
8383 return '' ;
8484 }
8585
8686 $ html = '' ;
8787 foreach ($ content ['content ' ] as $ block ) {
88- $ html .= $ this ->renderProseMirrorBlock ($ block );
88+ $ html .= $ this ->renderBlockEditorBlock ($ block );
8989 }
9090
9191 return $ html ;
9292 }
9393
94- private function renderProseMirrorBlock (array $ block ): string
94+ private function renderBlockEditorBlock (array $ block ): string
9595 {
9696 $ type = $ block ['type ' ] ?? '' ;
97- $ template = 'dotcms/prosemirror / ' . $ type . '.twig ' ;
97+ $ template = 'dotcms/block-editor-field / ' . $ type . '.twig ' ;
9898
9999 if ($ this ->twig ->getLoader ()->exists ($ template )) {
100100 return $ this ->twig ->render ($ template , ['block ' => $ block ]);
@@ -131,7 +131,7 @@ private function renderBulletList(array $block): string
131131 $ items = '' ;
132132 if (isset ($ block ['content ' ])) {
133133 foreach ($ block ['content ' ] as $ item ) {
134- $ items .= $ this ->renderProseMirrorBlock ($ item );
134+ $ items .= $ this ->renderBlockEditorBlock ($ item );
135135 }
136136 }
137137 return $ items ? "<ul> {$ items }</ul> " : '' ;
@@ -142,7 +142,7 @@ private function renderListItem(array $block): string
142142 $ content = '' ;
143143 if (isset ($ block ['content ' ])) {
144144 foreach ($ block ['content ' ] as $ item ) {
145- $ content .= $ this ->renderProseMirrorBlock ($ item );
145+ $ content .= $ this ->renderBlockEditorBlock ($ item );
146146 }
147147 }
148148 return $ content ? "<li> {$ content }</li> " : '' ;
0 commit comments