Preserve HTML Comments

Release 2.13.0 and above.

Used to preserve comments when loading HTML or when copying and pasting.

However, comments used in copy/paste (<!-- StartFragment -->, <!-- EndFragment -->) are not preserved.

How to Configure

Setting remainComment in editor.buildOption.html to true preserves HTML comments. (default: false)

// synapeditor.config.js
{
    'editor.buildOption.html': {
        'remainComment': true
    }
}
Source view editingPreview result
Source view editingPreview result