47 @return flag indicating the availability of strikethrough markup |
56 @return flag indicating the availability of strikethrough markup |
48 @rtype bool |
57 @rtype bool |
49 """ |
58 """ |
50 return True |
59 return True |
51 |
60 |
|
61 def headerLevels(self): |
|
62 """ |
|
63 Public method to determine the available header levels. |
|
64 |
|
65 @return supported header levels |
|
66 @rtype int |
|
67 """ |
|
68 return 6 |
|
69 |
52 def bold(self, editor): |
70 def bold(self, editor): |
53 """ |
71 """ |
54 Public method to generate bold text. |
72 Public method to generate bold text. |
55 |
73 |
56 @param editor reference to the editor to work on |
74 @param editor reference to the editor to work on |
74 @param editor reference to the editor to work on |
92 @param editor reference to the editor to work on |
75 @type Editor |
93 @type Editor |
76 """ |
94 """ |
77 self.__insertMarkup("del", editor) |
95 self.__insertMarkup("del", editor) |
78 |
96 |
|
97 def header(self, editor, level): |
|
98 """ |
|
99 Public method to generate a header. |
|
100 |
|
101 @param editor reference to the editor to work on |
|
102 @type Editor |
|
103 @param level header level |
|
104 @type int |
|
105 """ |
|
106 if level <= 6: |
|
107 self.__insertMarkup("h{0}".format(level), editor) |
|
108 |
79 def __insertMarkup(self, markup, editor): |
109 def __insertMarkup(self, markup, editor): |
80 """ |
110 """ |
81 Private method to insert the specified markup. |
111 Private method to insert the specified markup. |
82 |
112 |
83 If the editor has selected text, this text is enclosed by the given |
113 If the editor has selected text, this text is enclosed by the given |