File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed
src/bundle/Resources/public/js/CKEditor/custom-tags/block-custom-tag Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -148,13 +148,27 @@ class IbexaCustomTagUI extends Plugin {
148148 hideAttributes ( ) {
149149 this . balloon . remove ( this . attributesView ) ;
150150 this . editor . editing . view . focus ( ) ;
151+ this . reinitAttributesView ( ) ;
151152 }
152153
153154 showForm ( ) {
154155 const modelElement = this . editor . model . document . selection . getSelectedElement ( ) ;
155156 const values = modelElement . getAttribute ( 'values' ) ;
157+ const parsedValues = Object . entries ( values ) . reduce ( ( output , [ key , value ] ) => {
158+ if ( this . config . attributes [ key ] ?. type === 'boolean' ) {
159+ return {
160+ ...output ,
161+ [ key ] : value === 'true' ,
162+ } ;
163+ }
164+
165+ return {
166+ ...output ,
167+ [ key ] : value ,
168+ } ;
169+ } , { } ) ;
156170
157- this . formView . setValues ( values ) ;
171+ this . formView . setValues ( parsedValues ) ;
158172
159173 this . balloon . add ( {
160174 view : this . formView ,
You can’t perform that action at this time.
0 commit comments