Keep a copy of the source before experimenting. A useful test is a short notice with one extra attribute, rather than an entire legacy document whose losses are difficult to spot.
Test the exact piece of markup you need
Suppose an application needs this record identifier to survive editing:
<p data-record="notice-17">Collect the visitor badges at reception.</p>
Use a development copy of the editor and record its installed version and plugins. Enter the fragment through its available source editing control, return to visual editing, then inspect the source again. Check the paragraph text and data-record separately.
Finally, inspect the data your application saves. A source field that still shows the attribute before you leave source mode does not establish that it survives conversion into the editor model or submission to the server.
Add narrow support for an actual requirement
Dedicated features handle familiar document structures. General HTML Support can retain additional elements, attributes, classes, and styles when you configure explicit rules. It does not supply a complete editing interface for every structure you permit. General HTML Support
For an existing setup that already loads GeneralHtmlSupport, this illustrative configuration permits the named attribute on paragraphs:
htmlSupport: {
allow: [
{ name: 'p', attributes: [ 'data-record' ] }
]
}
Merge it into the configuration for your installed editor. It is not a complete initialization, and it does not validate whether an identifier belongs to the current record. Your application must define that rule if it relies on the attribute.
Repeat the small round-trip check after the configuration change. Inspect any server-side transformation too. A retained editor value can still be altered by the application's save or publication path.
Distinguish a content change from serialization
Source editing can normalize equivalent markup. Compare the properties you need, such as the link destination, heading level, and record identifier, instead of requiring byte-for-byte equality for every tag.
If your requirement is to embed a raw external fragment as one widget, HTML embed is a separate workflow. If you need a page-shaped editor and persistence, see the document editor guide.
Check collaboration before enabling the control
Source editing has documented interactions with collaboration, comments, and tracked changes. In particular, remote edits made while someone is in source mode can be overwritten when that person returns. Do not turn on compatibility overrides simply to suppress an initialization error.
Give the integration owner the feature combination and a reproducible copy of the affected document. Decide how source changes will be made and reviewed before exposing them to concurrent authors.
For the badge notice, finish by saving and reopening the record, verifying the text and identifier, and checking the reader's rendered result. Keep the copied source until all three agree.