Skip to content

toggleComment

toggleComment(editor, isBlock?): boolean

Defined in: extensions/commands/commands.ts:230

Command that toggles the comment around the current selection unless the editor is readOnly. Comment syntax is determined using the current Language. It will use the getComments() method if present and the comments property otherwise.

PrismEditor

Editor to execute the command on.

boolean

Whether or not to toggle the comment using block syntax.

boolean