# Developer Control Over Drag and Drop Editor HTML Output

**URL:** <https://community.hubspot.com/t/developer-control-over-drag-and-drop-editor-html-output/69008>\
**Category:** HubSpot Ideas\
**Tags:** design-manager, content\
**Created:** [November 10, 2022, 1:37pm UTC](https://community.hubspot.com/t/developer-control-over-drag-and-drop-editor-html-output/69008 "2022-11-10T13:37:39Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![John](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/john/32/43512_2.png) [@John](https://community.hubspot.com/u/John)\
**Post date:** [November 10, 2022, 1:37pm UTC](https://community.hubspot.com/t/developer-control-over-drag-and-drop-editor-html-output/69008/1 "2022-11-10T13:37:39Z")

</div>

What if theme settings/json allowed devs to manipulate (and simplify) the drag n drop markup? It would allow us to cut down on the HTML bloat that comes with the current Bootstrap 2 layout.css

**theme.json**

```c-mrkdwn__pre
"legacy_dnd": false,"sections": {
 "default_tag": "section",
 "classes": "my-section"
},
"rows": {
 "default_tag": "div",
 "classes": "row"
},
"columns": {
 "default_tag": "div",
 "class_prefix": "col-",
 "extra_classes": "foo"
}

```

and the dnd output markup:

```c-mrkdwn__pre
<section class="my-section" data-hs-section="8675309">
 <div class="row" data-hs-dnd-row="1" data-hs-dnd-level="1">
 <div class="col-4 foo"></div>
 <div class="col-8 foo"></div>
 </div>
</section>

```

and all hs markup would be in data attributes.

**nested rows would look like:**

```c-mrkdwn__pre
<section class="my-section" data-hs-section="8675309">
 <div class="row" data-hs-dnd-row="1" data-hs-dnd-level="1">
 <div class="col-4 foo"></div>
 <div class="col-8 foo">
 <div class="row" data-hs-dnd-row="1" data-hs-dnd-level="2">
 <div class="col-6 foo"></div>
 <div class="col-6 foo"></div>
 </div>
 <div class="row" data-hs-dnd-row="2" data-hs-dnd-level="2">
 <div class="col-12 foo"></div>
 </div>
 </div>
 </div>
</section>

```

This would be a ton of work for HubSpot engineers – but it would future proof the dnd editor and prevent bloating the DOM with 3x the amount of nodes needed.

---

<div class="post-metadata">

**Author:** ![ellimccale](https://avatars.discourse-cdn.com/v4/letter/e/c77e96/32.png) [@ellimccale](https://community.hubspot.com/u/ellimccale)\
**Post date:** [January 20, 2023, 4:16am UTC](https://community.hubspot.com/t/developer-control-over-drag-and-drop-editor-html-output/69008/2 "2023-01-20T04:16:10Z")

</div>

This functionality would be handy. And if it’s not feasible for theme developers to customize output, the current HTML bloat should at least be reduced. So, so many unnecessary

\<div\>

s and, worse, the

\<span\>

s wrapping heading elements ( **not valid HTML** ). 😩

---

<div class="post-metadata">

**Author:** ![amcintosh](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/amcintosh/32/32338_2.png) [@amcintosh](https://community.hubspot.com/u/amcintosh)\
**Post date:** [January 26, 2023, 8:59pm UTC](https://community.hubspot.com/t/developer-control-over-drag-and-drop-editor-html-output/69008/3 "2023-01-26T20:59:17Z")

</div>

I’d love to tack this onto this - it would be great to be able to see the Custom classes in the DND pane -

[https://community.hubspot.com/t5/HubSpot-Ideas/Display-Custom-Classes-Added-to-a-Section-in-Developer-Mode/idi-p/682907](https://community.hubspot.com/t5/HubSpot-Ideas/Display-Custom-Classes-Added-to-a-Section-in-Developer-Mode/idi-p/682907)

---

<div class="post-metadata">

**Author:** ![Jaydub](https://avatars.discourse-cdn.com/v4/letter/j/e9bcb4/32.png) [@Jaydub](https://community.hubspot.com/u/Jaydub)\
**Post date:** [November 1, 2023, 6:59pm UTC](https://community.hubspot.com/t/developer-control-over-drag-and-drop-editor-html-output/69008/4 "2023-11-01T18:59:57Z")

</div>

+100 to this. Would sugguest that classes be an array of values, but other than that, would love to see this done.

---

<div class="post-metadata">

**Author:** ![educarneiro](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/educarneiro/32/18311_2.png) [@educarneiro](https://community.hubspot.com/u/educarneiro)\
**Post date:** [March 19, 2024, 6:53pm UTC](https://community.hubspot.com/t/developer-control-over-drag-and-drop-editor-html-output/69008/5 "2024-03-19T18:53:47Z")

</div>

The bloat issue is real and it’s still there. It makes drag-and-drop with built-n modules almost unusable if you want to avoid bloated code.

---

<div class="post-metadata">

**Author:** ![Biancau](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/biancau/32/75519_2.png) [@Biancau](https://community.hubspot.com/u/Biancau)\
**Post date:** [February 3, 2025, 7:05am UTC](https://community.hubspot.com/t/developer-control-over-drag-and-drop-editor-html-output/69008/6 "2025-02-03T07:05:58Z")

</div>

Additionally, I would love for the option to turn off section styles and have the only controller for margins, paddings and background colors to be those i choose (either from modules or to be able to set select choices instead of free-hand choices)
