|
1 <!DOCTYPE html> |
|
2 <html><head> |
|
3 <title>eric6.QScintilla.MarkupProviders.HtmlProvider</title> |
|
4 <meta charset="UTF-8"> |
|
5 <style> |
|
6 body { |
|
7 background: #EDECE6; |
|
8 margin: 0em 1em 10em 1em; |
|
9 color: black; |
|
10 } |
|
11 |
|
12 h1 { color: white; background: #85774A; } |
|
13 h2 { color: white; background: #85774A; } |
|
14 h3 { color: white; background: #9D936E; } |
|
15 h4 { color: white; background: #9D936E; } |
|
16 |
|
17 a { color: #BA6D36; } |
|
18 |
|
19 </style> |
|
20 </head> |
|
21 <body><a NAME="top" ID="top"></a> |
|
22 <h1>eric6.QScintilla.MarkupProviders.HtmlProvider</h1> |
|
23 <p> |
|
24 Module implementing the HTML markup provider. |
|
25 </p> |
|
26 <h3>Global Attributes</h3> |
|
27 <table> |
|
28 <tr><td>None</td></tr> |
|
29 </table> |
|
30 <h3>Classes</h3> |
|
31 <table> |
|
32 <tr> |
|
33 <td><a href="#HtmlProvider">HtmlProvider</a></td> |
|
34 <td>Class implementing the HTML markup provider.</td> |
|
35 </tr> |
|
36 </table> |
|
37 <h3>Functions</h3> |
|
38 <table> |
|
39 <tr><td>None</td></tr> |
|
40 </table> |
|
41 <hr /><hr /> |
|
42 <a NAME="HtmlProvider" ID="HtmlProvider"></a> |
|
43 <h2>HtmlProvider</h2> |
|
44 <p> |
|
45 Class implementing the HTML markup provider. |
|
46 </p> |
|
47 <h3>Derived from</h3> |
|
48 MarkupBase |
|
49 <h3>Class Attributes</h3> |
|
50 <table> |
|
51 <tr><td>None</td></tr> |
|
52 </table> |
|
53 <h3>Class Methods</h3> |
|
54 <table> |
|
55 <tr><td>None</td></tr> |
|
56 </table> |
|
57 <h3>Methods</h3> |
|
58 <table> |
|
59 <tr> |
|
60 <td><a href="#HtmlProvider.__init__">HtmlProvider</a></td> |
|
61 <td>Constructor</td> |
|
62 </tr><tr> |
|
63 <td><a href="#HtmlProvider.__insertMarkup">__insertMarkup</a></td> |
|
64 <td>Private method to insert the specified markup.</td> |
|
65 </tr><tr> |
|
66 <td><a href="#HtmlProvider.__makeList">__makeList</a></td> |
|
67 <td>Private method to generate the desired list markup.</td> |
|
68 </tr><tr> |
|
69 <td><a href="#HtmlProvider.bold">bold</a></td> |
|
70 <td>Public method to generate bold text.</td> |
|
71 </tr><tr> |
|
72 <td><a href="#HtmlProvider.bulletedList">bulletedList</a></td> |
|
73 <td>Public method to generate bulleted list text.</td> |
|
74 </tr><tr> |
|
75 <td><a href="#HtmlProvider.code">code</a></td> |
|
76 <td>Public method to generate inline code text.</td> |
|
77 </tr><tr> |
|
78 <td><a href="#HtmlProvider.codeBlock">codeBlock</a></td> |
|
79 <td>Public method to generate code block text.</td> |
|
80 </tr><tr> |
|
81 <td><a href="#HtmlProvider.hasBold">hasBold</a></td> |
|
82 <td>Public method to indicate the availability of bold markup.</td> |
|
83 </tr><tr> |
|
84 <td><a href="#HtmlProvider.hasBulletedList">hasBulletedList</a></td> |
|
85 <td>Public method to indicate the availability of bulleted list markup.</td> |
|
86 </tr><tr> |
|
87 <td><a href="#HtmlProvider.hasCode">hasCode</a></td> |
|
88 <td>Public method to indicate the availability of inline code markup.</td> |
|
89 </tr><tr> |
|
90 <td><a href="#HtmlProvider.hasCodeBlock">hasCodeBlock</a></td> |
|
91 <td>Public method to indicate the availability of code block markup.</td> |
|
92 </tr><tr> |
|
93 <td><a href="#HtmlProvider.hasHyperlink">hasHyperlink</a></td> |
|
94 <td>Public method to indicate the availability of hyperlink markup.</td> |
|
95 </tr><tr> |
|
96 <td><a href="#HtmlProvider.hasImage">hasImage</a></td> |
|
97 <td>Public method to indicate the availability of image markup.</td> |
|
98 </tr><tr> |
|
99 <td><a href="#HtmlProvider.hasItalic">hasItalic</a></td> |
|
100 <td>Public method to indicate the availability of italic markup.</td> |
|
101 </tr><tr> |
|
102 <td><a href="#HtmlProvider.hasLine">hasLine</a></td> |
|
103 <td>Public method to indicate the availability of a horizontal line markup.</td> |
|
104 </tr><tr> |
|
105 <td><a href="#HtmlProvider.hasNumberedList">hasNumberedList</a></td> |
|
106 <td>Public method to indicate the availability of numbered list markup.</td> |
|
107 </tr><tr> |
|
108 <td><a href="#HtmlProvider.hasQuote">hasQuote</a></td> |
|
109 <td>Public method to indicate the availability of block quote markup.</td> |
|
110 </tr><tr> |
|
111 <td><a href="#HtmlProvider.hasStrikethrough">hasStrikethrough</a></td> |
|
112 <td>Public method to indicate the availability of strikethrough markup.</td> |
|
113 </tr><tr> |
|
114 <td><a href="#HtmlProvider.header">header</a></td> |
|
115 <td>Public method to generate a header.</td> |
|
116 </tr><tr> |
|
117 <td><a href="#HtmlProvider.headerLevels">headerLevels</a></td> |
|
118 <td>Public method to determine the available header levels.</td> |
|
119 </tr><tr> |
|
120 <td><a href="#HtmlProvider.hyperlink">hyperlink</a></td> |
|
121 <td>Public method to generate hyperlink text.</td> |
|
122 </tr><tr> |
|
123 <td><a href="#HtmlProvider.image">image</a></td> |
|
124 <td>Public method to generate image text.</td> |
|
125 </tr><tr> |
|
126 <td><a href="#HtmlProvider.italic">italic</a></td> |
|
127 <td>Public method to generate italic text.</td> |
|
128 </tr><tr> |
|
129 <td><a href="#HtmlProvider.kind">kind</a></td> |
|
130 <td>Public method to get the markup kind.</td> |
|
131 </tr><tr> |
|
132 <td><a href="#HtmlProvider.line">line</a></td> |
|
133 <td>Public method to generate a horizontal line text.</td> |
|
134 </tr><tr> |
|
135 <td><a href="#HtmlProvider.numberedList">numberedList</a></td> |
|
136 <td>Public method to generate numbered list text.</td> |
|
137 </tr><tr> |
|
138 <td><a href="#HtmlProvider.quote">quote</a></td> |
|
139 <td>Public method to generate block quote text.</td> |
|
140 </tr><tr> |
|
141 <td><a href="#HtmlProvider.strikethrough">strikethrough</a></td> |
|
142 <td>Public method to generate strikethrough text.</td> |
|
143 </tr> |
|
144 </table> |
|
145 <h3>Static Methods</h3> |
|
146 <table> |
|
147 <tr><td>None</td></tr> |
|
148 </table> |
|
149 <a NAME="HtmlProvider.__init__" ID="HtmlProvider.__init__"></a> |
|
150 <h4>HtmlProvider (Constructor)</h4> |
|
151 <b>HtmlProvider</b>(<i></i>) |
|
152 <p> |
|
153 Constructor |
|
154 </p><a NAME="HtmlProvider.__insertMarkup" ID="HtmlProvider.__insertMarkup"></a> |
|
155 <h4>HtmlProvider.__insertMarkup</h4> |
|
156 <b>__insertMarkup</b>(<i>markup, editor, addEol=False</i>) |
|
157 <p> |
|
158 Private method to insert the specified markup. |
|
159 </p><p> |
|
160 If the editor has selected text, this text is enclosed by the given |
|
161 markup. If no text is selected, the markup is inserted at the cursor |
|
162 position and the cursor is positioned in between. |
|
163 </p><dl> |
|
164 <dt><i>markup</i> (str)</dt> |
|
165 <dd> |
|
166 markup string to be inserted |
|
167 </dd><dt><i>editor</i> (Editor)</dt> |
|
168 <dd> |
|
169 reference to the editor to work on |
|
170 </dd><dt><i>addEol</i> (bool)</dt> |
|
171 <dd> |
|
172 flag indicating to add an eol string after the tag |
|
173 </dd> |
|
174 </dl><a NAME="HtmlProvider.__makeList" ID="HtmlProvider.__makeList"></a> |
|
175 <h4>HtmlProvider.__makeList</h4> |
|
176 <b>__makeList</b>(<i>editor, listType</i>) |
|
177 <p> |
|
178 Private method to generate the desired list markup. |
|
179 </p><dl> |
|
180 <dt><i>editor</i> (Editor)</dt> |
|
181 <dd> |
|
182 reference to the editor to work on |
|
183 </dd><dt><i>listType</i> (str)</dt> |
|
184 <dd> |
|
185 type of the desired list (should be ul or ol) |
|
186 </dd> |
|
187 </dl><a NAME="HtmlProvider.bold" ID="HtmlProvider.bold"></a> |
|
188 <h4>HtmlProvider.bold</h4> |
|
189 <b>bold</b>(<i>editor</i>) |
|
190 <p> |
|
191 Public method to generate bold text. |
|
192 </p><dl> |
|
193 <dt><i>editor</i> (Editor)</dt> |
|
194 <dd> |
|
195 reference to the editor to work on |
|
196 </dd> |
|
197 </dl><a NAME="HtmlProvider.bulletedList" ID="HtmlProvider.bulletedList"></a> |
|
198 <h4>HtmlProvider.bulletedList</h4> |
|
199 <b>bulletedList</b>(<i>editor</i>) |
|
200 <p> |
|
201 Public method to generate bulleted list text. |
|
202 </p><dl> |
|
203 <dt><i>editor</i> (Editor)</dt> |
|
204 <dd> |
|
205 reference to the editor to work on |
|
206 </dd> |
|
207 </dl><a NAME="HtmlProvider.code" ID="HtmlProvider.code"></a> |
|
208 <h4>HtmlProvider.code</h4> |
|
209 <b>code</b>(<i>editor</i>) |
|
210 <p> |
|
211 Public method to generate inline code text. |
|
212 </p><dl> |
|
213 <dt><i>editor</i> (Editor)</dt> |
|
214 <dd> |
|
215 reference to the editor to work on |
|
216 </dd> |
|
217 </dl><a NAME="HtmlProvider.codeBlock" ID="HtmlProvider.codeBlock"></a> |
|
218 <h4>HtmlProvider.codeBlock</h4> |
|
219 <b>codeBlock</b>(<i>editor</i>) |
|
220 <p> |
|
221 Public method to generate code block text. |
|
222 </p><dl> |
|
223 <dt><i>editor</i> (Editor)</dt> |
|
224 <dd> |
|
225 reference to the editor to work on |
|
226 </dd> |
|
227 </dl><a NAME="HtmlProvider.hasBold" ID="HtmlProvider.hasBold"></a> |
|
228 <h4>HtmlProvider.hasBold</h4> |
|
229 <b>hasBold</b>(<i></i>) |
|
230 <p> |
|
231 Public method to indicate the availability of bold markup. |
|
232 </p><dl> |
|
233 <dt>Returns:</dt> |
|
234 <dd> |
|
235 flag indicating the availability of bold markup |
|
236 </dd> |
|
237 </dl><dl> |
|
238 <dt>Return Type:</dt> |
|
239 <dd> |
|
240 bool |
|
241 </dd> |
|
242 </dl><a NAME="HtmlProvider.hasBulletedList" ID="HtmlProvider.hasBulletedList"></a> |
|
243 <h4>HtmlProvider.hasBulletedList</h4> |
|
244 <b>hasBulletedList</b>(<i></i>) |
|
245 <p> |
|
246 Public method to indicate the availability of bulleted list markup. |
|
247 </p><dl> |
|
248 <dt>Returns:</dt> |
|
249 <dd> |
|
250 flag indicating the availability of bulleted list markup |
|
251 </dd> |
|
252 </dl><dl> |
|
253 <dt>Return Type:</dt> |
|
254 <dd> |
|
255 bool |
|
256 </dd> |
|
257 </dl><a NAME="HtmlProvider.hasCode" ID="HtmlProvider.hasCode"></a> |
|
258 <h4>HtmlProvider.hasCode</h4> |
|
259 <b>hasCode</b>(<i></i>) |
|
260 <p> |
|
261 Public method to indicate the availability of inline code markup. |
|
262 </p><dl> |
|
263 <dt>Returns:</dt> |
|
264 <dd> |
|
265 flag indicating the availability of inline code markup |
|
266 </dd> |
|
267 </dl><dl> |
|
268 <dt>Return Type:</dt> |
|
269 <dd> |
|
270 bool |
|
271 </dd> |
|
272 </dl><a NAME="HtmlProvider.hasCodeBlock" ID="HtmlProvider.hasCodeBlock"></a> |
|
273 <h4>HtmlProvider.hasCodeBlock</h4> |
|
274 <b>hasCodeBlock</b>(<i></i>) |
|
275 <p> |
|
276 Public method to indicate the availability of code block markup. |
|
277 </p><dl> |
|
278 <dt>Returns:</dt> |
|
279 <dd> |
|
280 flag indicating the availability of code block markup |
|
281 </dd> |
|
282 </dl><dl> |
|
283 <dt>Return Type:</dt> |
|
284 <dd> |
|
285 bool |
|
286 </dd> |
|
287 </dl><a NAME="HtmlProvider.hasHyperlink" ID="HtmlProvider.hasHyperlink"></a> |
|
288 <h4>HtmlProvider.hasHyperlink</h4> |
|
289 <b>hasHyperlink</b>(<i></i>) |
|
290 <p> |
|
291 Public method to indicate the availability of hyperlink markup. |
|
292 </p><dl> |
|
293 <dt>Returns:</dt> |
|
294 <dd> |
|
295 flag indicating the availability of hyperlink markup |
|
296 </dd> |
|
297 </dl><dl> |
|
298 <dt>Return Type:</dt> |
|
299 <dd> |
|
300 bool |
|
301 </dd> |
|
302 </dl><a NAME="HtmlProvider.hasImage" ID="HtmlProvider.hasImage"></a> |
|
303 <h4>HtmlProvider.hasImage</h4> |
|
304 <b>hasImage</b>(<i></i>) |
|
305 <p> |
|
306 Public method to indicate the availability of image markup. |
|
307 </p><dl> |
|
308 <dt>Returns:</dt> |
|
309 <dd> |
|
310 flag indicating the availability of image markup |
|
311 </dd> |
|
312 </dl><dl> |
|
313 <dt>Return Type:</dt> |
|
314 <dd> |
|
315 bool |
|
316 </dd> |
|
317 </dl><a NAME="HtmlProvider.hasItalic" ID="HtmlProvider.hasItalic"></a> |
|
318 <h4>HtmlProvider.hasItalic</h4> |
|
319 <b>hasItalic</b>(<i></i>) |
|
320 <p> |
|
321 Public method to indicate the availability of italic markup. |
|
322 </p><dl> |
|
323 <dt>Returns:</dt> |
|
324 <dd> |
|
325 flag indicating the availability of italic markup |
|
326 </dd> |
|
327 </dl><dl> |
|
328 <dt>Return Type:</dt> |
|
329 <dd> |
|
330 bool |
|
331 </dd> |
|
332 </dl><a NAME="HtmlProvider.hasLine" ID="HtmlProvider.hasLine"></a> |
|
333 <h4>HtmlProvider.hasLine</h4> |
|
334 <b>hasLine</b>(<i></i>) |
|
335 <p> |
|
336 Public method to indicate the availability of a horizontal line markup. |
|
337 </p><dl> |
|
338 <dt>Returns:</dt> |
|
339 <dd> |
|
340 flag indicating the availability of a horizontal line markup |
|
341 </dd> |
|
342 </dl><dl> |
|
343 <dt>Return Type:</dt> |
|
344 <dd> |
|
345 bool |
|
346 </dd> |
|
347 </dl><a NAME="HtmlProvider.hasNumberedList" ID="HtmlProvider.hasNumberedList"></a> |
|
348 <h4>HtmlProvider.hasNumberedList</h4> |
|
349 <b>hasNumberedList</b>(<i></i>) |
|
350 <p> |
|
351 Public method to indicate the availability of numbered list markup. |
|
352 </p><dl> |
|
353 <dt>Returns:</dt> |
|
354 <dd> |
|
355 flag indicating the availability of numbered list markup |
|
356 </dd> |
|
357 </dl><dl> |
|
358 <dt>Return Type:</dt> |
|
359 <dd> |
|
360 bool |
|
361 </dd> |
|
362 </dl><a NAME="HtmlProvider.hasQuote" ID="HtmlProvider.hasQuote"></a> |
|
363 <h4>HtmlProvider.hasQuote</h4> |
|
364 <b>hasQuote</b>(<i></i>) |
|
365 <p> |
|
366 Public method to indicate the availability of block quote markup. |
|
367 </p><dl> |
|
368 <dt>Returns:</dt> |
|
369 <dd> |
|
370 flag indicating the availability of block quote markup |
|
371 </dd> |
|
372 </dl><dl> |
|
373 <dt>Return Type:</dt> |
|
374 <dd> |
|
375 bool |
|
376 </dd> |
|
377 </dl><a NAME="HtmlProvider.hasStrikethrough" ID="HtmlProvider.hasStrikethrough"></a> |
|
378 <h4>HtmlProvider.hasStrikethrough</h4> |
|
379 <b>hasStrikethrough</b>(<i></i>) |
|
380 <p> |
|
381 Public method to indicate the availability of strikethrough markup. |
|
382 </p><dl> |
|
383 <dt>Returns:</dt> |
|
384 <dd> |
|
385 flag indicating the availability of strikethrough markup |
|
386 </dd> |
|
387 </dl><dl> |
|
388 <dt>Return Type:</dt> |
|
389 <dd> |
|
390 bool |
|
391 </dd> |
|
392 </dl><a NAME="HtmlProvider.header" ID="HtmlProvider.header"></a> |
|
393 <h4>HtmlProvider.header</h4> |
|
394 <b>header</b>(<i>editor, level</i>) |
|
395 <p> |
|
396 Public method to generate a header. |
|
397 </p><dl> |
|
398 <dt><i>editor</i> (Editor)</dt> |
|
399 <dd> |
|
400 reference to the editor to work on |
|
401 </dd><dt><i>level</i> (int)</dt> |
|
402 <dd> |
|
403 header level |
|
404 </dd> |
|
405 </dl><a NAME="HtmlProvider.headerLevels" ID="HtmlProvider.headerLevels"></a> |
|
406 <h4>HtmlProvider.headerLevels</h4> |
|
407 <b>headerLevels</b>(<i></i>) |
|
408 <p> |
|
409 Public method to determine the available header levels. |
|
410 </p><dl> |
|
411 <dt>Returns:</dt> |
|
412 <dd> |
|
413 supported header levels |
|
414 </dd> |
|
415 </dl><dl> |
|
416 <dt>Return Type:</dt> |
|
417 <dd> |
|
418 int |
|
419 </dd> |
|
420 </dl><a NAME="HtmlProvider.hyperlink" ID="HtmlProvider.hyperlink"></a> |
|
421 <h4>HtmlProvider.hyperlink</h4> |
|
422 <b>hyperlink</b>(<i>editor</i>) |
|
423 <p> |
|
424 Public method to generate hyperlink text. |
|
425 </p><dl> |
|
426 <dt><i>editor</i> (Editor)</dt> |
|
427 <dd> |
|
428 reference to the editor to work on |
|
429 </dd> |
|
430 </dl><a NAME="HtmlProvider.image" ID="HtmlProvider.image"></a> |
|
431 <h4>HtmlProvider.image</h4> |
|
432 <b>image</b>(<i>editor</i>) |
|
433 <p> |
|
434 Public method to generate image text. |
|
435 </p><dl> |
|
436 <dt><i>editor</i> (Editor)</dt> |
|
437 <dd> |
|
438 reference to the editor to work on |
|
439 </dd> |
|
440 </dl><a NAME="HtmlProvider.italic" ID="HtmlProvider.italic"></a> |
|
441 <h4>HtmlProvider.italic</h4> |
|
442 <b>italic</b>(<i>editor</i>) |
|
443 <p> |
|
444 Public method to generate italic text. |
|
445 </p><dl> |
|
446 <dt><i>editor</i> (Editor)</dt> |
|
447 <dd> |
|
448 reference to the editor to work on |
|
449 </dd> |
|
450 </dl><a NAME="HtmlProvider.kind" ID="HtmlProvider.kind"></a> |
|
451 <h4>HtmlProvider.kind</h4> |
|
452 <b>kind</b>(<i></i>) |
|
453 <p> |
|
454 Public method to get the markup kind. |
|
455 </p><dl> |
|
456 <dt>Returns:</dt> |
|
457 <dd> |
|
458 string with markup kind |
|
459 </dd> |
|
460 </dl><dl> |
|
461 <dt>Return Type:</dt> |
|
462 <dd> |
|
463 str |
|
464 </dd> |
|
465 </dl><a NAME="HtmlProvider.line" ID="HtmlProvider.line"></a> |
|
466 <h4>HtmlProvider.line</h4> |
|
467 <b>line</b>(<i>editor</i>) |
|
468 <p> |
|
469 Public method to generate a horizontal line text. |
|
470 </p><dl> |
|
471 <dt><i>editor</i> (Editor)</dt> |
|
472 <dd> |
|
473 reference to the editor to work on |
|
474 </dd> |
|
475 </dl><a NAME="HtmlProvider.numberedList" ID="HtmlProvider.numberedList"></a> |
|
476 <h4>HtmlProvider.numberedList</h4> |
|
477 <b>numberedList</b>(<i>editor</i>) |
|
478 <p> |
|
479 Public method to generate numbered list text. |
|
480 </p><dl> |
|
481 <dt><i>editor</i> (Editor)</dt> |
|
482 <dd> |
|
483 reference to the editor to work on |
|
484 </dd> |
|
485 </dl><a NAME="HtmlProvider.quote" ID="HtmlProvider.quote"></a> |
|
486 <h4>HtmlProvider.quote</h4> |
|
487 <b>quote</b>(<i>editor</i>) |
|
488 <p> |
|
489 Public method to generate block quote text. |
|
490 </p><dl> |
|
491 <dt><i>editor</i> (Editor)</dt> |
|
492 <dd> |
|
493 reference to the editor to work on |
|
494 </dd> |
|
495 </dl><a NAME="HtmlProvider.strikethrough" ID="HtmlProvider.strikethrough"></a> |
|
496 <h4>HtmlProvider.strikethrough</h4> |
|
497 <b>strikethrough</b>(<i>editor</i>) |
|
498 <p> |
|
499 Public method to generate strikethrough text. |
|
500 </p><dl> |
|
501 <dt><i>editor</i> (Editor)</dt> |
|
502 <dd> |
|
503 reference to the editor to work on |
|
504 </dd> |
|
505 </dl> |
|
506 <div align="right"><a href="#top">Up</a></div> |
|
507 <hr /> |
|
508 </body></html> |