formattingtags

Provide HTML Tag management and Formatting Tag access class

class openlp.core.lib.formattingtags.FormattingTags[source]

Bases: object

Static Class for HTML Tags to be access around the code the list is managed by the Options Tab.

static add_html_tags(tags)[source]

Add a list of tags to the list.

Parameters:tags

The list with tags to add. Each tag has to be a dict and should have the following keys:

  • desc
    The formatting tag’s description, e. g. Red
  • start tag
    The start tag, e. g. {r}
  • end tag
    The end tag, e. g. {/r}
  • start html
    The start html tag. For instance <span style="-webkit-text-fill-color:red">
  • end html
    The end html tag. For example </span>
  • protected
    A boolean stating whether this is a build-in tag or not. Should be True in most cases.
  • temporary
    A temporary tag will not be saved, but is also considered when displaying text containing the tag. It has to be a boolean.
static get_html_tags()[source]

Provide access to the html_expands list.

html_expands = []
static load_tags()[source]

Load the Tags from store so can be used in the system or used to update the display.

static remove_html_tag(tag_id)[source]

Removes an individual html_expands tag.

static save_html_tags(new_tags)[source]

Saves all formatting tags except protected ones

new_tags
The tags to be saved..