File tree Expand file tree Collapse file tree 1 file changed +16
-7
lines changed
Expand file tree Collapse file tree 1 file changed +16
-7
lines changed Original file line number Diff line number Diff line change 142142 id : "toc" ,
143143 label : "Table of Contents" ,
144144 pattern : / ^ { { <\s * t o c \s * > } } / ,
145- fromBlock : function ( match ) {
146- return {
147- authors : match
148- } ;
149- } ,
150145 toBlock : function ( obj ) {
151146 return `{{< toc >}}` ;
152147 } ,
153148 toPreview : function ( obj ) {
154- return '<b>TABLE OF CONTENTS WILL BE HERE</b>' ;
149+ return '<hr>< b>TABLE OF CONTENTS WILL BE HERE</b><hr >' ;
155150 } ,
156151} ) ;
157152// podcast_player
186181 return '<audio controls src="/podcast/episodes/' + obj . direct + '"></audio>' ;
187182 } ,
188183} ) ;
184+
189185// Youtube
190186CMS . registerEditorComponent ( {
191187 id : "youtube" ,
210206 } ,
211207} ) ;
212208
209+ // Children
210+ CMS . registerEditorComponent ( {
211+ id : "children" ,
212+ label : "Children" ,
213+ pattern : / ^ { { <\s * c h i l d r e n \s * > } } / ,
214+ toBlock : function ( ) {
215+ return `{{< children >}}` ;
216+ } ,
217+ toPreview : function ( ) {
218+ return '<hr><b>Child pages are displayed here</b><hr>' ;
219+ } ,
220+ } ) ;
221+
213222// Device boxes
214223CMS . registerEditorComponent ( {
215224 id : 'flexbox' ,
@@ -367,7 +376,7 @@ <h4 style="margin:0 0 4px;font-size:1em;">${b.title}</h4>
367376 {
368377 name : "body" ,
369378 label : "Content" ,
370- widget : "text " ,
379+ widget : "markdown " ,
371380 default : "" ,
372381 } ,
373382 ] ,
You can’t perform that action at this time.
0 commit comments