Input cleanup

clean.comments#

Type: boolean

Default: false

Removes HTML comments when loading content.

const app = Redactor('#entry', {
  clean: {
    comments: true
  }
});

clean.enter#

Type: boolean

Default: true

Cleans block markup after Enter creates a new block (removes attributes and style).

const app = Redactor('#entry', {
  clean: {
    enter: false
  }
});

clean.enterInline#

Type: boolean

Default: false

When true clears inline HTML inside a block after Enter.

const app = Redactor('#entry', {
  clean: {
    enterInline: true
  }
});

clean.keepEmptyBlockBr#

Type: boolean

Default: false

Controls empty blocks that contain only <br>.

When false (default), paragraphizer removes <p><br></p> on load and export strips a lone <br> from empty blocks.

When true, those <br> markers are kept on input and output.

const app = Redactor('#entry', {
  keepEmptyBlockBr: true
});