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