'Types content into the html component and presses Cancel to abort.
Arguments:
content (str): The content to be used.
raw (bool): If true, edits in \'raw HTML\' mode.'

def set_content_and_cancel(self, content, raw=False):

    if raw:
        self.set_raw_content(content)
    else:
        self.set_content(content)
    self.cancel()
