Qt Creator IDE markdown plugin, for both editing and previewing the file in html.
Features:
- Syntax highlighting in editor
- Html preview
- Code highlighting in preview
- Theme aware preview and editor
- Bidirectional vertical sroll synchronization between editor and preview
- For Linux, MacOs and Windows you can download the plugin from releases.
- Since QtCreator is not packaged with Qt6WebEngine,Qt6WebChannel and Qt6Positioning, you need to install following dependencies from qt installation to qtcreator (qtcreator that MarkdownEditView will be installed!) directory. This process will be automatized later by the plugin.
- Qt6.2.2 must be installed with Qt6WebEngine, Qt6WebChannel and Qt6Positioning dependency (we will copy the dependencies from here).
- For linux:
- copy
<Qt Installation Path>
/6.2.3/gcc_64/lib/libQt6WebChannel.so* to<Ct Creator Ins Path>
/lib/Qt/lib - copy
<Qt Installation Path>
/6.2.3/gcc_64/lib/libQt6WebEngineCore.so* to<Ct Creator Ins Path>
/lib/Qt/lib - copy
<Qt Installation Path>
/6.2.3/gcc_64/lib/libQt6WebEngineWidgets.so* to<Ct Creator Ins Path>
/lib/Qt/lib - copy
<Qt Installation Path>
/6.2.3/gcc_64/lib/libQt6Positioning.so* to<Ct Creator Ins Path>
/lib/Qt/lib - copy
<Qt Installation Path>
/6.2.3/gcc_64/libexec to<Ct Creator Ins Path>
/lib/Qt/ - copy
<Qt Installation Path>
/6.2.3/gcc_64/resources to<Ct Creator Ins Path>
/lib/Qt/ - copy
<Qt Installation Path>
/6.2.3/gcc_64/translations to<Ct Creator Ins Path>
/lib/Qt/
- copy
Not: Actually for resource, libexec and translations folders only the related files should be copied. But just now, copy all files. I will update later.
- For macos:
- This is easier than linux. All resource and configuratin files are kept together.
- copy
<Qt Installation Path
>/6.2.3/macos/lib/QtWebChannel.framework to<Qt Creator.app
>/Contents/Frameworks/ - copy
<Qt Installation Path
>/6.2.3/macos/lib/QtWebEngineCore.framework to<Qt Creator.app
>/Contents/Frameworks/ - copy
<Qt Installation Path
>/6.2.3/macos/lib/QtWebEngineWidgets.framework to<Qt Creator.app
>/Contents/Frameworks/ - copy
<Qt Installation Path
>/6.2.3/macos/lib/QtPositioning.framework to<Qt Creator.app
>/Contents/Frameworks/
- For windows:
- copy
<Qt Installation Path
>\6.2.3\msvc2019_64\bin\Qt6WebChannel.dll to<Ct Creator Ins Path>
\bin - copy
<Qt Installation Path
>\6.2.3\msvc2019_64\bin\Qt6WebEngineCore.dll to<Ct Creator Ins Path>
\bin - copy
<Qt Installation Path
>\6.2.3\msvc2019_64\bin\Qt6WebEngineWidgets.dll to<Ct Creator Ins Path>
\bin - copy
<Qt Installation Path>
\6.2.3\msvc2019_64\translations to<Ct Creator Ins Path>
\bin - copy
<Qt Installation Path>
\6.2.3\msvc2019_64\resources to<Ct Creator Ins Path>
\bin - copy
<Qt Installation Path>
\6.2.3\msvc2019_64\bin\QtWebEngineProcess.exe to<Ct Creator Ins Path>
\bin - copy
<Qt Installation Path>
\6.2.3\msvc2019_64\bin\qtwebengine_convert_dict.exe to<Ct Creator Ins Path>
\bin
- copy
Not: Actually for resource and translations folders only the related files should be copied. But just now, copy all files. I will update later.
- Install Qt 6.2.3 with Qt6WebEngine and Qt6WebChannel (for to build qtcreator Qt6Positioning and Qt5 Compatibility also needed).
- Follow command below:
For Linux:
first, get qt-crator and build it:
- git clone https://github.com/qt-creator/qt-creator.git
- cd ./qt-creator
- git checkout v7.0.0
- mkdir qtcreator_build
- cd ./qtcreator_build
- cmake -DCMAKE_BUILD_TYPE=Debug -G Ninja "-DCMAKE_PREFIX_PATH=/home/erdinc09/Qt/6.2.3/gcc_64" ..
- cmake --build .
then, get MarkdownEditView and build it:
- git clone --recursive -j8 https://github.com/erdinc09/MarkdownEditView.git
- cd ./MarkdownEditView
- mkdir build
- cd ./build
- cmake "-DCMAKE_PREFIX_PATH=/home/erdinc09/git/qt-creator/qtcreator_build;/home/erdinc09/Qt/6.2.3/gcc_64" -DCMAKE_BUILD_TYPE=RelWithDebInfo -GNinja ..
- cmake --build .
For Mac:
first, get qt-crator and build it:
- git clone https://github.com/qt-creator/qt-creator.git
- cd ./qt-creator
- git checkout v7.0.0
- mkdir qtcreator_build
- cd ./qtcreator_build
- cmake -DCMAKE_BUILD_TYPE=Debug -G Ninja "-DCMAKE_PREFIX_PATH=/Users/erdinc09/Qt/6.2.3/macos;/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain" ..
- cmake --build .
then, get MarkdownEditView and build it:
- git clone --recursive -j8 https://github.com/erdinc09/MarkdownEditView.git
- cd ./MarkdownEditView
- mkdir build
- cd ./build
- cmake "-DCMAKE_PREFIX_PATH=/Users/erdinc09/git/qt-creator/qtcreator_build;/Users/erdinc09/Qt/6.2.3/macos" -DCMAKE_BUILD_TYPE=RelWithDebInfo -GNinja ..
- cmake --build .
Note that directory delimeter is same for in all platforms! ";"
Run a compatible Qt Creator with the additional command line argument
-pluginpath <path_to_plugin>
where <path_to_plugin>
is the path to the resulting plugin library in the build directory
(<plugin_build>/lib/qtcreator/plugins
on Windows and Linux,
<plugin_build>/Qt Creator.app/Contents/PlugIns
on macOS).
You might want to add -temporarycleansettings
(or -tcs
) to ensure that the opened Qt Creator
instance cannot mess with your user-global Qt Creator settings.
When building and running the plugin from Qt Creator, you can use
-pluginpath "%{buildDir}/lib/qtcreator/plugins" -tcs
on Windows and Linux, or
-pluginpath "%{buildDir}/Qt Creator.app/Contents/PlugIns" -tcs
for the Command line arguments
field in the run settings
- For markdown to html conversion, marked js library fork is used (adapted).
- For CSS in preview, markdown-css is used.
- For code highlighting in preview highlightjs is used (10.5).
- For SyntaxHighligter in editor, qmarkdowntextedit syntaxhighlighter is used (adapted).