204 if editor is None: |
204 if editor is None: |
205 return |
205 return |
206 |
206 |
207 from .HyperlinkMarkupDialog import HyperlinkMarkupDialog |
207 from .HyperlinkMarkupDialog import HyperlinkMarkupDialog |
208 dlg = HyperlinkMarkupDialog(False, True, noTitle=True) |
208 dlg = HyperlinkMarkupDialog(False, True, noTitle=True) |
209 if dlg.exec() == QDialog.Accepted: |
209 if dlg.exec() == QDialog.DialogCode.Accepted: |
210 text, target, _ = dlg.getData() |
210 text, target, _ = dlg.getData() |
211 |
211 |
212 link1 = "`{0}`_".format(text) |
212 link1 = "`{0}`_".format(text) |
213 link2 = ".. _`{0}`:".format(text) |
213 link2 = ".. _`{0}`:".format(text) |
214 if target: |
214 if target: |
320 if editor is None: |
320 if editor is None: |
321 return |
321 return |
322 |
322 |
323 from .ImageMarkupDialog import ImageMarkupDialog |
323 from .ImageMarkupDialog import ImageMarkupDialog |
324 dlg = ImageMarkupDialog(ImageMarkupDialog.RestMode) |
324 dlg = ImageMarkupDialog(ImageMarkupDialog.RestMode) |
325 if dlg.exec() == QDialog.Accepted: |
325 if dlg.exec() == QDialog.DialogCode.Accepted: |
326 address, altText, title, originalSize, width, height = ( |
326 address, altText, title, originalSize, width, height = ( |
327 dlg.getData() |
327 dlg.getData() |
328 ) |
328 ) |
329 |
329 |
330 lineSeparator = editor.getLineSeparator() |
330 lineSeparator = editor.getLineSeparator() |