NS_IMETHODIMP
InsertLineBreakCommand::DoCommand(const char* aCommandName,
                                  nsISupports* aCommandRefCon)
{
  nsCOMPtr<nsIPlaintextEditor> editor = do_QueryInterface(aCommandRefCon);
  if (NS_WARN_IF(!editor)) {
    return NS_ERROR_NOT_IMPLEMENTED;
  }

  TextEditor* textEditor = static_cast<TextEditor*>(editor.get());

  return textEditor->TypedText(EmptyString(), TextEditor::eTypedBR);
}