Missing upcast class for uswds_grid

Created on 2 May 2025, 8 days ago

Problem/Motivation

From version 3.1.2 to 3.1.3, the class uswds_grid is removed from the upcast for uswds_grid in editing.js. This is causing other embedded content elements that are wrapped in <div> tags to be upcast as grid.

Steps to reproduce

Add a non-grid embedded content element (for instance, uswds accordion). In the source view, add a <div> tag wrapping the embedded content piece. <div><embedded-content data-plugin-config="{&quot;process_items&quot;:[{&quot;heading&quot;:&quot;test&quot;,&quot;body&quot;:{&quot;value&quot;:&quot;\u003Cp\u003Etest\u003C\/p\u003E&quot;,&quot;format&quot;:&quot;full_html&quot;},&quot;remove_item&quot;:&quot;Remove item&quot;}],&quot;add_item&quot;:&quot;Add item&quot;}" data-plugin-id="uswds_process_list" data-button-id="uswds_process_list">&nbsp;</embedded-content></div> When switching back to the non-source view, the content will disappear and the html changes to

<div class="undefined ck-widget" contenteditable="false">
</div>

Proposed resolution

Add back the classes piece to the upcast for uswds_grid present in 3.1.2, the issue resolves.

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

3.1

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024