208 if editor is None: |
208 if editor is None: |
209 return |
209 return |
210 |
210 |
211 from .HyperlinkMarkupDialog import HyperlinkMarkupDialog |
211 from .HyperlinkMarkupDialog import HyperlinkMarkupDialog |
212 dlg = HyperlinkMarkupDialog(False, True) |
212 dlg = HyperlinkMarkupDialog(False, True) |
213 if dlg.exec_() == QDialog.Accepted: |
213 if dlg.exec() == QDialog.Accepted: |
214 text, target, title = dlg.getData() |
214 text, target, title = dlg.getData() |
215 |
215 |
216 link = "[{0}]".format(text) |
216 link = "[{0}]".format(text) |
217 if target and title: |
217 if target and title: |
218 link = '{0}({1} "{2}")'.format(link, target, title) |
218 link = '{0}({1} "{2}")'.format(link, target, title) |
299 if editor is None: |
299 if editor is None: |
300 return |
300 return |
301 |
301 |
302 from .ImageMarkupDialog import ImageMarkupDialog |
302 from .ImageMarkupDialog import ImageMarkupDialog |
303 dlg = ImageMarkupDialog(ImageMarkupDialog.MarkDownMode) |
303 dlg = ImageMarkupDialog(ImageMarkupDialog.MarkDownMode) |
304 if dlg.exec_() == QDialog.Accepted: |
304 if dlg.exec() == QDialog.Accepted: |
305 address, altText, title, originalSize, width, height = ( |
305 address, altText, title, originalSize, width, height = ( |
306 dlg.getData() |
306 dlg.getData() |
307 ) |
307 ) |
308 |
308 |
309 if title: |
309 if title: |