src/eric7/UI/Previewers/PreviewerHTML.py

branch
eric7
changeset 9473
3f23dbf37dbe
parent 9447
662075aa9361
child 9482
a2bc06a54d9d
equal deleted inserted replaced
9472:5798ee4a8807 9473:3f23dbf37dbe
5 5
6 """ 6 """
7 Module implementing a previewer widget for HTML, Markdown and ReST files. 7 Module implementing a previewer widget for HTML, Markdown and ReST files.
8 """ 8 """
9 9
10 import contextlib
11 import io
10 import os 12 import os
11 import threading
12 import re 13 import re
13 import shutil 14 import shutil
15 import sys
14 import tempfile 16 import tempfile
15 import sys 17 import threading
16 import io 18
17 import contextlib 19 from PyQt6.QtCore import Qt, QThread, QUrl, pyqtSignal, pyqtSlot
18
19 from PyQt6.QtCore import pyqtSlot, pyqtSignal, Qt, QUrl, QThread
20 from PyQt6.QtGui import QCursor, QGuiApplication 20 from PyQt6.QtGui import QCursor, QGuiApplication
21 from PyQt6.QtWidgets import ( 21 from PyQt6.QtWidgets import (
22 QWidget, 22 QCheckBox,
23 QVBoxLayout, 23 QGridLayout,
24 QLabel, 24 QLabel,
25 QCheckBox, 25 QPushButton,
26 QSizePolicy, 26 QSizePolicy,
27 QToolTip, 27 QToolTip,
28 QGridLayout, 28 QVBoxLayout,
29 QPushButton, 29 QWidget,
30 ) 30 )
31 31
32 from eric7 import Preferences, Utilities
32 from eric7.EricWidgets.EricApplication import ericApp 33 from eric7.EricWidgets.EricApplication import ericApp
33
34 from eric7 import Preferences, Utilities
35 34
36 35
37 class PreviewerHTML(QWidget): 36 class PreviewerHTML(QWidget):
38 """ 37 """
39 Class implementing a previewer widget for HTML, Markdown and ReST files. 38 Class implementing a previewer widget for HTML, Markdown and ReST files.
761 """ 'pip install Markdown' or see """ 760 """ 'pip install Markdown' or see """
762 """<a href="http://pythonhosted.org/Markdown/install.html">""" 761 """<a href="http://pythonhosted.org/Markdown/install.html">"""
763 """installation instructions.</a></p>""" 762 """installation instructions.</a></p>"""
764 ) 763 )
765 764
766 from . import PreviewerHTMLStyles 765 from . import MarkdownExtensions, PreviewerHTMLStyles
767 from . import MarkdownExtensions
768 766
769 extensions = [] 767 extensions = []
770 768
771 mermaidNeeded = False 769 mermaidNeeded = False
772 if Preferences.getEditor( 770 if Preferences.getEditor(

eric ide

mercurial