Skip to content

Commit 427706f

Browse files
committed
Added table head/footer components to show proper icons in navigator when selecting table cells.
1 parent 490a4db commit 427706f

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

libs/builder/components-html.js

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ Vvveb.Components.extend("_base", "html/image", {
211211
return node;
212212
},
213213
init: function (node) {
214-
let value = node.parentNode.tagName.toLowerCase() == "a"
214+
let value = node.parentNode.tagName.toLowerCase() == "a";
215215
this.setGroup(value);
216216
return value;
217217
}
@@ -1011,6 +1011,7 @@ Vvveb.Components.extend("_base", "html/form", {
10111011

10121012
Vvveb.Components.extend("_base", "html/tablerow", {
10131013
nodes: ["tr"],
1014+
image: "icons/table.svg",
10141015
name: "Table Row",
10151016
html: "<tr><td>Cell 1</td><td>Cell 2</td><td>Cell 3</td></tr>",
10161017
properties: [{
@@ -1041,18 +1042,35 @@ Vvveb.Components.extend("_base", "html/tablerow", {
10411042
});
10421043
Vvveb.Components.extend("_base", "html/tablecell", {
10431044
nodes: ["td"],
1045+
image: "icons/table.svg",
10441046
name: "Table Cell",
10451047
html: "<td>Cell</td>"
10461048
});
10471049

10481050
Vvveb.Components.extend("_base", "html/tableheadercell", {
10491051
nodes: ["th"],
1052+
image: "icons/table.svg",
10501053
name: "Table Header Cell",
10511054
html: "<th>Head</th>"
10521055
});
10531056

1057+
Vvveb.Components.extend("_base", "html/tablebody", {
1058+
nodes: ["tbody"],
1059+
image: "icons/table.svg",
1060+
name: "Table Body",
1061+
html: "<tbody>Table body</tbody>"
1062+
});
1063+
1064+
Vvveb.Components.extend("_base", "html/tablefooter", {
1065+
nodes: ["tfooter"],
1066+
image: "icons/table.svg",
1067+
name: "Table Footer",
1068+
html: "<tfooter>Table footer</tfooter>"
1069+
});
1070+
10541071
Vvveb.Components.extend("_base", "html/tablehead", {
10551072
nodes: ["thead"],
1073+
image: "icons/table.svg",
10561074
name: "Table Head",
10571075
html: "<thead><tr><th>Head 1</th><th>Head 2</th><th>Head 3</th></tr></thead>",
10581076
properties: [{

0 commit comments

Comments
 (0)