RichText
Class to manipulate the rich texts content
:return: [description] :rtype: [type]
blocks: listeditor_version: strversion: intInitialize self. See help(type(self)) for accurate signature.
gws_core.impl.rich_text.rich_text_types.RichTextDTO | Noneint | NoneAdd a code block to the rich text content
strstr - ''RichTextBlockAdd a figure to the rich text content
RichTextBlockFigurestr | NoneRichTextBlockAdd a file to the rich text content
RichTextBlockFilestr | NoneRichTextBlockAdd a view to a rich text content. This view is not associated with a resource
RichTextBlockViewFilestr | NoneRichTextBlockAdd a math formula to the rich text content
strstr | NoneRichTextBlockAdd a header to the rich text content
strRichTextBlockHeaderLevelRichTextBlockAdd a hint to the rich text content
strLiteral - infoRichTextBlockAdd an HTML block to the rich text content
strRichTextBlockAdd an iframe to the rich text content
strintRichTextBlockAdd a list to the rich text content
RichTextBlockListRichTextBlockAdd a view to a rich text content used in note. This requires the note to call the view
RichTextBlockNoteResourceViewstr | NoneRichTextBlockAdd a paragraph to the rich text content
strRichTextBlockAdd a quote to the rich text content
strstr | NoneRichTextBlockRichTextBlockResourceViewstr | NoneRichTextBlockAdd a table to the rich text content
RichTextBlockTableRichTextBlockAdd a timestamp to the rich text content
RichTextBlockTimestampstr | NoneRichTextBlockAdd a video to the rich text content
strstr | NoneRichTextBlockAppend a block to the rich text content
RichTextBlockintRichTextDelete the parameter in the rich text content text
strCompare this rich text (old) with another rich text (new) and return the differences.
Blocks are matched by their id. If a block's id exists in both but the type changed, it is treated as deleted + added (not modified).
RichTextRichTextDiffstrsetGet the block at the given index
intRichTextBlockGet the block by its id
strgws_core.impl.rich_text.rich_text_types.RichTextBlock | NoneGet the block index by its id
strintlistGet the blocks of the given type
gws_core.impl.rich_text.block.rich_text_block.RichTextBlockTypeStandard | strlistlistlistlistlistCheck if the rich text contains a resource view with the given view_config_id
strboolInsert a block after the block with the given id
strRichTextBlockInsert an element in the rich text content at the given index
intRichTextBlockInsert multiple blocks after the block with the given id. Blocks are inserted in order so they appear in the same order as the list.
strlistboolMove a block to after another block. If after_block_id is None, move to the beginning.
strstr | NoneRemove an element from the rich text content
intRichTextBlockRemove a block by its id
strReplace a block at the given index
intRichTextBlockReplace a block by its id
strRichTextBlockMethod to remove the resource view from the rich text content and replace it when parameters. Useful when creating a template (because templates can't have resource views)
Serialize the object into a json object. For SerializableRField, this method is called when the resource is saved.
dictReplace the parameter in the rich text content text
strstrbool - FalseConvert the rich text to a DTO.
bool - FalseRichTextDTOdictstrConvert the rich text content to markdown
bool - FalsestrCreate a block
strRichTextBlockDataBaseRichTextBlocksummary
strstrRichTextBlockCreate a paragraph block
strstrRichTextBlockHeaderLevelRichTextBlockCreate a list block
strRichTextBlockListRichTextBlockCreate a paragraph block
strstrRichTextBlocklistRichTextDTOCreate a timestamp block
strRichTextBlockTimestampRichTextBlockDeserialize the object from a json object. For SerializableRField, this method is called when the RField is loaded.
dictRichTextdictRichTextstrRichTextCheck if the given data is a valid rich text json
dictbool