Roo/htmleditor/BlockFigure.js
authorAlan <alan@roojs.com>
Tue, 15 Mar 2022 07:19:54 +0000 (15:19 +0800)
committerAlan <alan@roojs.com>
Tue, 15 Mar 2022 07:19:54 +0000 (15:19 +0800)
Roo/htmleditor/BlockFigure.js

index 73b336c..a26f488 100644 (file)
@@ -234,7 +234,11 @@ Roo.extend(Roo.htmleditor.BlockFigure, Roo.htmleditor.Block, {
                 pressed : false,
                 enableToggle : true,
                 setValue : function(v) {
-                    this.toggle(v == 'block' ? false : true);
+                    // this trigger toggle.
+                    
+                    var b  = block();
+                    this.setText(b.caption_display == 'block' ? "Hide Caption" : "Show Caption");
+                    this.setPressed(b.caption_display == 'block' ? false: true);
                 },
                 listeners : {
                     toggle: function (btn, state)