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 from .ImageMarkupDialog import ImageMarkupDialog |
299 from .ImageMarkupDialog import ImageMarkupDialog, ImageMarkupMode |
300 |
300 |
301 if editor is None: |
301 if editor is None: |
302 return |
302 return |
303 |
303 |
304 dlg = ImageMarkupDialog(ImageMarkupDialog.MarkDownMode) |
304 dlg = ImageMarkupDialog(ImageMarkupMode.MarkDown) |
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 |
308 if title: |
308 if title: |
309 markup = ''.format(altText, address, title) |
309 markup = ''.format(altText, address, title) |