Roo/htmleditor/BlockFigure.js
authorleon <leon@roojs.com>
Fri, 22 Sep 2023 07:26:53 +0000 (15:26 +0800)
committerleon <leon@roojs.com>
Fri, 22 Sep 2023 07:26:53 +0000 (15:26 +0800)
Roo/htmleditor/BlockFigure.js

index d4b3e9a..dc2ac06 100644 (file)
@@ -254,6 +254,41 @@ Roo.extend(Roo.htmleditor.BlockFigure, Roo.htmleditor.Block, {
                     }
                 },
                 xns : rooui.Toolbar
+            },
+
+            {
+                xtype : 'ComboBox',
+                allowBlank : false,
+                displayField : 'val',
+                editable : true,
+                listWidth : 100,
+                triggerAction : 'all',
+                typeAhead : true,
+                valueField : 'val',
+                width : 70,
+                name : 'caption_align',
+                listeners : {
+                    select : function (combo, r, index)
+                    {
+                        toolbar.editorcore.selectNode(toolbar.tb.selectedNode);
+                        var b = block();
+                        b.align = r.get('val');
+                        b.updateElement();
+                        syncValue();
+                        toolbar.editorcore.onEditorEvent();
+                    }
+                },
+                xns : rooui.form,
+                store : {
+                    xtype : 'SimpleStore',
+                    data : [
+                        ['left'],
+                        ['right'],
+                        ['center']
+                    ],
+                    fields : [ 'val'],
+                    xns : Roo.data
+                }
             }
         ];