38 @return flag indicating the availability of bold markup |
38 @return flag indicating the availability of bold markup |
39 @rtype bool |
39 @rtype bool |
40 """ |
40 """ |
41 return True |
41 return True |
42 |
42 |
|
43 def bold(self, editor): |
|
44 """ |
|
45 Public method to generate bold text. |
|
46 |
|
47 @param editor reference to the editor to work on |
|
48 @type Editor |
|
49 """ |
|
50 self.__insertMarkup("b", editor) |
|
51 |
43 def hasItalic(self): |
52 def hasItalic(self): |
44 """ |
53 """ |
45 Public method to indicate the availability of italic markup. |
54 Public method to indicate the availability of italic markup. |
46 |
55 |
47 @return flag indicating the availability of italic markup |
56 @return flag indicating the availability of italic markup |
48 @rtype bool |
57 @rtype bool |
49 """ |
58 """ |
50 return True |
59 return True |
|
60 |
|
61 def italic(self, editor): |
|
62 """ |
|
63 Public method to generate italic text. |
|
64 |
|
65 @param editor reference to the editor to work on |
|
66 @type Editor |
|
67 """ |
|
68 self.__insertMarkup("i", editor) |
51 |
69 |
52 def hasStrikethrough(self): |
70 def hasStrikethrough(self): |
53 """ |
71 """ |
54 Public method to indicate the availability of strikethrough markup. |
72 Public method to indicate the availability of strikethrough markup. |
55 |
73 |
56 @return flag indicating the availability of strikethrough markup |
74 @return flag indicating the availability of strikethrough markup |
57 @rtype bool |
75 @rtype bool |
58 """ |
76 """ |
59 return True |
77 return True |
60 |
78 |
|
79 def strikethrough(self, editor): |
|
80 """ |
|
81 Public method to generate strikethrough text. |
|
82 |
|
83 @param editor reference to the editor to work on |
|
84 @type Editor |
|
85 """ |
|
86 self.__insertMarkup("del", editor) |
|
87 |
61 def headerLevels(self): |
88 def headerLevels(self): |
62 """ |
89 """ |
63 Public method to determine the available header levels. |
90 Public method to determine the available header levels. |
64 |
91 |
65 @return supported header levels |
92 @return supported header levels |
66 @rtype int |
93 @rtype int |
67 """ |
94 """ |
68 return 6 |
95 return 6 |
69 |
|
70 def bold(self, editor): |
|
71 """ |
|
72 Public method to generate bold text. |
|
73 |
|
74 @param editor reference to the editor to work on |
|
75 @type Editor |
|
76 """ |
|
77 self.__insertMarkup("b", editor) |
|
78 |
|
79 def italic(self, editor): |
|
80 """ |
|
81 Public method to generate italic text. |
|
82 |
|
83 @param editor reference to the editor to work on |
|
84 @type Editor |
|
85 """ |
|
86 self.__insertMarkup("i", editor) |
|
87 |
|
88 def strikethrough(self, editor): |
|
89 """ |
|
90 Public method to generate strikethrough text. |
|
91 |
|
92 @param editor reference to the editor to work on |
|
93 @type Editor |
|
94 """ |
|
95 self.__insertMarkup("del", editor) |
|
96 |
96 |
97 def header(self, editor, level): |
97 def header(self, editor, level): |
98 """ |
98 """ |
99 Public method to generate a header. |
99 Public method to generate a header. |
100 |
100 |
103 @param level header level |
103 @param level header level |
104 @type int |
104 @type int |
105 """ |
105 """ |
106 if level <= 6: |
106 if level <= 6: |
107 self.__insertMarkup("h{0}".format(level), editor) |
107 self.__insertMarkup("h{0}".format(level), editor) |
|
108 |
|
109 def hasCode(self): |
|
110 """ |
|
111 Public method to indicate the availability of inline code markup. |
|
112 |
|
113 @return flag indicating the availability of inline code markup |
|
114 @rtype bool |
|
115 """ |
|
116 return True |
|
117 |
|
118 def code(self, editor): |
|
119 """ |
|
120 Public method to generate inline code text. |
|
121 |
|
122 @param editor reference to the editor to work on |
|
123 @type Editor |
|
124 """ |
|
125 self.__insertMarkup("code", editor) |
108 |
126 |
109 def __insertMarkup(self, markup, editor): |
127 def __insertMarkup(self, markup, editor): |
110 """ |
128 """ |
111 Private method to insert the specified markup. |
129 Private method to insert the specified markup. |
112 |
130 |