202 Public method to generate hyperlink text. |
202 Public method to generate hyperlink text. |
203 |
203 |
204 @param editor reference to the editor to work on |
204 @param editor reference to the editor to work on |
205 @type Editor |
205 @type Editor |
206 """ |
206 """ |
207 if editor is None: |
|
208 return |
|
209 |
|
210 from .HyperlinkMarkupDialog import HyperlinkMarkupDialog |
207 from .HyperlinkMarkupDialog import HyperlinkMarkupDialog |
|
208 |
|
209 if editor is None: |
|
210 return |
211 |
211 |
212 dlg = HyperlinkMarkupDialog(False, True) |
212 dlg = HyperlinkMarkupDialog(False, True) |
213 if dlg.exec() == QDialog.DialogCode.Accepted: |
213 if dlg.exec() == QDialog.DialogCode.Accepted: |
214 text, target, title = dlg.getData() |
214 text, target, title = dlg.getData() |
215 |
215 |
294 Public method to generate image text. |
294 Public method to generate image text. |
295 |
295 |
296 @param editor reference to the editor to work on |
296 @param editor reference to the editor to work on |
297 @type Editor |
297 @type Editor |
298 """ |
298 """ |
299 if editor is None: |
|
300 return |
|
301 |
|
302 from .ImageMarkupDialog import ImageMarkupDialog |
299 from .ImageMarkupDialog import ImageMarkupDialog |
|
300 |
|
301 if editor is None: |
|
302 return |
303 |
303 |
304 dlg = ImageMarkupDialog(ImageMarkupDialog.MarkDownMode) |
304 dlg = ImageMarkupDialog(ImageMarkupDialog.MarkDownMode) |
305 if dlg.exec() == QDialog.DialogCode.Accepted: |
305 if dlg.exec() == QDialog.DialogCode.Accepted: |
306 address, altText, title, originalSize, width, height = dlg.getData() |
306 address, altText, title, originalSize, width, height = dlg.getData() |
307 |
307 |