# eric7.QScintilla.MarkupProviders.HtmlProvider

Module implementing the HTML markup provider.

### Global Attributes

None

### Classes

HtmlProvider | Class implementing the HTML markup provider.

### Functions

None

## HtmlProvider

Class implementing the HTML markup provider.

### Derived from

MarkupBase

### Class Attributes

None

### Class Methods

None

### Methods

HtmlProvider | Constructor
__insertMarkup | Private method to insert the specified markup.
__makeList | Private method to generate the desired list markup.
bold | Public method to generate bold text.
bulletedList | Public method to generate bulleted list text.
code | Public method to generate inline code text.
codeBlock | Public method to generate code block text.
hasBold | Public method to indicate the availability of bold markup.
hasBulletedList | Public method to indicate the availability of bulleted list markup.
hasCode | Public method to indicate the availability of inline code markup.
hasCodeBlock | Public method to indicate the availability of code block markup.
hasHyperlink | Public method to indicate the availability of hyperlink markup.
hasImage | Public method to indicate the availability of image markup.
hasItalic | Public method to indicate the availability of italic markup.
hasLine | Public method to indicate the availability of a horizontal line markup.
hasNumberedList | Public method to indicate the availability of numbered list markup.
hasQuote | Public method to indicate the availability of block quote markup.
hasStrikethrough | Public method to indicate the availability of strikethrough markup.
header | Public method to generate a header.
headerLevels | Public method to determine the available header levels.
hyperlink | Public method to generate hyperlink text.
image | Public method to generate image text.
italic | Public method to generate italic text.
kind | Public method to get the markup kind.
line | Public method to generate a horizontal line text.
numberedList | Public method to generate numbered list text.
quote | Public method to generate block quote text.
strikethrough | Public method to generate strikethrough text.

### Static Methods

None

#### HtmlProvider (Constructor)

HtmlProvider()

Constructor

#### HtmlProvider.__insertMarkup

__insertMarkup(markup, editor, addEol=False)

Private method to insert the specified markup.

If the editor has selected text, this text is enclosed by the given markup. If no text is selected, the markup is inserted at the cursor position and the cursor is positioned in between.

markup (str)
  markup string to be inserted
editor (Editor)
  reference to the editor to work on
addEol (bool)
  flag indicating to add an eol string after the tag

#### HtmlProvider.__makeList

__makeList(editor, listType)

Private method to generate the desired list markup.

editor (Editor)
  reference to the editor to work on
listType (str)
  type of the desired list (should be ul or ol)

#### HtmlProvider.bold

bold(editor)

Public method to generate bold text.

editor (Editor)
  reference to the editor to work on

#### HtmlProvider.bulletedList

bulletedList(editor)

Public method to generate bulleted list text.

editor (Editor)
  reference to the editor to work on

#### HtmlProvider.code

code(editor)

Public method to generate inline code text.

editor (Editor)
  reference to the editor to work on

#### HtmlProvider.codeBlock

codeBlock(editor)

Public method to generate code block text.

editor (Editor)
  reference to the editor to work on

#### HtmlProvider.hasBold

hasBold()

Public method to indicate the availability of bold markup.

Return:
  flag indicating the availability of bold markup

Return Type:
  bool

#### HtmlProvider.hasBulletedList

hasBulletedList()

Public method to indicate the availability of bulleted list markup.

Return:
  flag indicating the availability of bulleted list markup

Return Type:
  bool

#### HtmlProvider.hasCode

hasCode()

Public method to indicate the availability of inline code markup.

Return:
  flag indicating the availability of inline code markup

Return Type:
  bool

#### HtmlProvider.hasCodeBlock

hasCodeBlock()

Public method to indicate the availability of code block markup.

Return:
  flag indicating the availability of code block markup

Return Type:
  bool

#### HtmlProvider.hasHyperlink

hasHyperlink()

Public method to indicate the availability of hyperlink markup.

Return:
  flag indicating the availability of hyperlink markup

Return Type:
  bool

#### HtmlProvider.hasImage

hasImage()

Public method to indicate the availability of image markup.

Return:
  flag indicating the availability of image markup

Return Type:
  bool

#### HtmlProvider.hasItalic

hasItalic()

Public method to indicate the availability of italic markup.

Return:
  flag indicating the availability of italic markup

Return Type:
  bool

#### HtmlProvider.hasLine

hasLine()

Public method to indicate the availability of a horizontal line markup.

Return:
  flag indicating the availability of a horizontal line markup

Return Type:
  bool

#### HtmlProvider.hasNumberedList

hasNumberedList()

Public method to indicate the availability of numbered list markup.

Return:
  flag indicating the availability of numbered list markup

Return Type:
  bool

#### HtmlProvider.hasQuote

hasQuote()

Public method to indicate the availability of block quote markup.

Return:
  flag indicating the availability of block quote markup

Return Type:
  bool

#### HtmlProvider.hasStrikethrough

hasStrikethrough()

Public method to indicate the availability of strikethrough markup.

Return:
  flag indicating the availability of strikethrough markup

Return Type:
  bool

#### HtmlProvider.header

header(editor, level)

Public method to generate a header.

editor (Editor)
  reference to the editor to work on
level (int)
  header level

#### HtmlProvider.headerLevels

headerLevels()

Public method to determine the available header levels.

Return:
  supported header levels

Return Type:
  int

#### HtmlProvider.hyperlink

hyperlink(editor)

Public method to generate hyperlink text.

editor (Editor)
  reference to the editor to work on

#### HtmlProvider.image

image(editor)

Public method to generate image text.

editor (Editor)
  reference to the editor to work on

#### HtmlProvider.italic

italic(editor)

Public method to generate italic text.

editor (Editor)
  reference to the editor to work on

#### HtmlProvider.kind

kind()

Public method to get the markup kind.

Return:
  string with markup kind

Return Type:
  str

#### HtmlProvider.line

line(editor)

Public method to generate a horizontal line text.

editor (Editor)
  reference to the editor to work on

#### HtmlProvider.numberedList

numberedList(editor)

Public method to generate numbered list text.

editor (Editor)
  reference to the editor to work on

#### HtmlProvider.quote

quote(editor)

Public method to generate block quote text.

editor (Editor)
  reference to the editor to work on

#### HtmlProvider.strikethrough

strikethrough(editor)

Public method to generate strikethrough text.

editor (Editor)
  reference to the editor to work on

Up