src/eric7/QScintilla/MarkupProviders/MarkdownProvider.py

branch
eric7
changeset 11006
a671918232f3
parent 10692
9becf9ca115c
child 11090
f5f5f5803935
equal deleted inserted replaced
11005:b918c6c2736b 11006:a671918232f3
207 from .HyperlinkMarkupDialog import HyperlinkMarkupDialog 207 from .HyperlinkMarkupDialog import HyperlinkMarkupDialog
208 208
209 if editor is None: 209 if editor is None:
210 return 210 return
211 211
212 dlg = HyperlinkMarkupDialog(False, True) 212 dlg = HyperlinkMarkupDialog(False, True, parent=editor)
213 if dlg.exec() == QDialog.DialogCode.Accepted: 213 if dlg.exec() == QDialog.DialogCode.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:
299 from .ImageMarkupDialog import ImageMarkupDialog, ImageMarkupMode 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(ImageMarkupMode.MarkDown) 304 dlg = ImageMarkupDialog(ImageMarkupMode.MarkDown, parent=editor)
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 = '![{0}]({1} "{2}")'.format(altText, address, title) 309 markup = '![{0}]({1} "{2}")'.format(altText, address, title)

eric ide

mercurial