Roo/bootstrap/form/HtmlEditorToolbar/Context.js
authorAlan <alan@roojs.com>
Fri, 10 Feb 2023 06:52:22 +0000 (14:52 +0800)
committerAlan <alan@roojs.com>
Fri, 10 Feb 2023 06:52:22 +0000 (14:52 +0800)
Roo/bootstrap/form/HtmlEditorToolbar/Context.js

index e9238c9..90ca126 100644 (file)
@@ -448,10 +448,10 @@ Roo.extend(Roo.bootstrap.form.HtmlEditorToolbar.Context, Roo.bootstrap.nav.Simpl
         // update attributes
         if (this.selectedNode.hasAttribute('data-block') ) {
             var block = Roo.htmleditor.Block.factory(this.selectedNode);
-            this.tb.fields.each(function(e) {
-                e.setValue(block[e.name]);
+            this.active_group.forEach(function(e) {
+                e.setValue(this.selectedNode.getAttribute(block[e.name]));
+            }, this);
                 
-            });
             return;
             
         }