--- a/QScintilla/MarkupProviders/HtmlProvider.py Mon Jan 02 12:49:28 2017 +0100 +++ b/QScintilla/MarkupProviders/HtmlProvider.py Mon Jan 02 20:13:40 2017 +0100 @@ -22,6 +22,15 @@ """ super(HtmlProvider, self).__init__() + def kind(self): + """ + Public method to get the markup kind. + + @return string with markup kind + @rtype str + """ + return "html" + def hasBold(self): """ Public method to indicate the availability of bold markup. @@ -49,6 +58,15 @@ """ return True + def headerLevels(self): + """ + Public method to determine the available header levels. + + @return supported header levels + @rtype int + """ + return 6 + def bold(self, editor): """ Public method to generate bold text. @@ -76,6 +94,18 @@ """ self.__insertMarkup("del", editor) + def header(self, editor, level): + """ + Public method to generate a header. + + @param editor reference to the editor to work on + @type Editor + @param level header level + @type int + """ + if level <= 6: + self.__insertMarkup("h{0}".format(level), editor) + def __insertMarkup(self, markup, editor): """ Private method to insert the specified markup.