306 Public method to generate image text. |
306 Public method to generate image text. |
307 |
307 |
308 @param editor reference to the editor to work on |
308 @param editor reference to the editor to work on |
309 @type Editor |
309 @type Editor |
310 """ |
310 """ |
311 from .ImageMarkupDialog import ImageMarkupDialog |
311 from .ImageMarkupDialog import ImageMarkupDialog, ImageMarkupMode |
312 |
312 |
313 if editor is None: |
313 if editor is None: |
314 return |
314 return |
315 |
315 |
316 dlg = ImageMarkupDialog(ImageMarkupDialog.HtmlMode) |
316 dlg = ImageMarkupDialog(ImageMarkupMode.Html) |
317 if dlg.exec() == QDialog.DialogCode.Accepted: |
317 if dlg.exec() == QDialog.DialogCode.Accepted: |
318 address, altText, title, originalSize, width, height = dlg.getData() |
318 address, altText, title, originalSize, width, height = dlg.getData() |
319 |
319 |
320 markup = '<img src="{0}"'.format(address) |
320 markup = '<img src="{0}"'.format(address) |
321 if altText: |
321 if altText: |