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

index ef589c2..e9238c9 100644 (file)
@@ -446,8 +446,8 @@ Roo.extend(Roo.bootstrap.form.HtmlEditorToolbar.Context, Roo.bootstrap.nav.Simpl
         this.active_group = this.button_groups[tn];
         
         // update attributes
-        if (block && this.tb.fields) {
-             
+        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]);