A museum caption contains a measurement that should stay together, 24 cm, followed by a longer description. After text is pasted from another document, the whole caption refuses to wrap in a narrow label. Both an intentional nonbreaking space between the number and unit and unwanted nonbreaking spaces throughout the description can look like ordinary blanks while editing.
Show the characters in the intended editor
For an application that already loads TinyMCE and has a matching textarea:
tinymce.init({
selector: '#museum-caption',
plugins: 'visualchars',
toolbar: 'undo redo | visualchars',
visualchars_default_state: true
});
Merge these entries into the application's existing plugin and toolbar lists. Keep its other controls and persistence settings. The visualchars button toggles visibility; the plugin also supplies a View-menu item where that menu configuration includes it.
For a separate application button, target the named initialized editor:
const captionEditor = tinymce.get('museum-caption');
if (!captionEditor) throw new Error('Caption editor is not ready');
captionEditor.execCommand('mceVisualChars');
This command toggles the state each time. Call it for an explicit author action, rather than repeatedly during rendering or save updates. Use the default-state option when the desired behavior is simply to start with the markers visible.
Compare an intentional join with an accidental run
The following source illustrates the difference:
<p>Height: 24 cm. Carved oak with a repaired base.</p>
<p>Height: 24 cm. Carved oak with a repaired base.</p>
The first paragraph joins the measurement but leaves normal word boundaries in the description. The second joins almost the entire sentence. At a narrow reader width, the latter can produce a line that cannot break where the author expects.
Turn on the invisible-character display and inspect the selected passage. Replace only the unwanted joins through the editor's normal editing controls, preserving the number-unit pair if that is the label's requirement. Do not run a document-wide replacement that turns every nonbreaking space into an ordinary one. Other captions may intentionally keep a specimen reference or a measurement together.
The HTML entities guide explains what represents. A serialized document may contain the named entity or the actual Unicode character. Do not search only for the literal six-character string and conclude the document contains none.
Choose a different inspection tool for a different symptom
Visual Characters helps expose supported invisible characters. It is not a complete Unicode inspector, and a missing marker does not prove every character in pasted text is ordinary ASCII.
If the problem is a large vertical gap, first inspect paragraph structure with TinyMCE Visual Blocks. Empty paragraphs and paragraph margins need a different correction from spaces that bind words together. If the text contains normal spaces but still will not wrap, inspect the reader's white-space rules and container sizing.
Keep those checks separate. Removing nonbreaking spaces will not repair a reader stylesheet that explicitly uses white-space: nowrap.
Check the saved caption without relying on editing markers
Save through the application's usual content path, then reopen the caption in its reader view. Confirm the corrected description wraps at the intended label width and the 24 cm measurement stays together. Inspect the actual saved content if the reader still shows the old behavior; changing a toolbar state is not a document edit.
Finally, reopen the saved document in the editor and toggle the markers again. The remaining joins should have a reason in the caption itself. Keep the review focused on that short passage so a spacing correction does not silently rewrite the museum's other labels.