def _insertBlock(self, cursor=None, block_type=TextBlock.TYPE_CODE_CONTINUED, content=""): if cursor is None: cursor = self._currentCursor b = TextBlock(cursor, create_new=True, typ=block_type) if len(content): b.appendText(content) return b
def _appendBlock(self, block_type, content="", html=False): b = TextBlock(self._endCursor, create_new=True, typ=block_type) if len(content) > 0: if html: b.appendHtml(content) else: b.appendText(content) return b