예제 #1
0
 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
예제 #2
0
 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