MDEZ++
- 12 Devlogs
- 41 Total hours
MDEZ++ is a lightweight Markdown editor written in C++ while using the Qt Graphical Framework.
MDEZ++ is a lightweight Markdown editor written in C++ while using the Qt Graphical Framework.
I wholeheartedly believe that this will be the last devlog for MDEZ++! Also, I did finally get Version v0.15.0 up and running on Flathub! It’s available on the Flathub website. Keep in mind, that’s not the only download method (it’s also supported for Windows and Web by WASM). Speaking of Windows, I had the grand idea to test the Windows download with Wine, and there was a big issue. I accidentally didn’t link the proper files to the Windows .exe file for it to work. I made the proper changes, manually triggered the GitHub Actions workflow, then downloaded the Artifact and attached it to Version v0.15.0! I honestly have no clue how long that error was there for! It’s a good thing I caught it now!
I also tried to create a YouTube showcase video for MDEZ++, and the screen recording was perfect, but it uploaded really pixely for some reason. But, I do also have one I can grab I made some time ago on Reddit. You can see it here.
The final thing I did in this time was really go deep down and restructure the README. I thought about what a real user would want to see first, and especially that they wouldn’t want to scroll down through a ginormous keyboard shortcuts and menu tree section before the actual important stuff.
I just had 6 and a half, decently productive hours for MDEZ++! Stardance is violently running to its end, and I am also violently running to make sure my project is all good before then! I remember when everyone thought it was going to end a month ago, but it didn’t! It was such a relief! But this time, it’s definitely the real end.
The most important (or obvious) change to MDEZ++ is that whenever a user opens a link to a file that’s inside a document, it will open it up in a new tab, instead of trying to load it in the same tab’s render, which is essentially just a very bad error, disguised as a silly feature that helps no one. That was a +177 lines, -64 lines commit! Most of the lines were in the header file for the MainWindow class, which includes a subclass of QTextBrowser named MdezDocBrowser. The first thing I had to do was update the class so it has access to the main window, so it can call important functions involved in opening tabs. I then made an override of doSetSource(), which was very, very complex. Most of it was handling errors, which is necessary considering the wide range of dynamic variables that impact a Markdown editor. I also made a one line change to the code file for the Tab class to give the subclass a way to access the instance of the MainWindow class!
I am right now battling Flathub (codewise, not argumentatively; who would battle an open-source app store?). While I have the first release up on Flathub, I am encountering some silly issues when trying to get up version v0.15.0 (technically released on GitHub Releases yesterday). And, right now, I am in the middle of a one-hour timeout for too many build requests. Most of the issues were pretty small, stupid things on my part: not updating the SHA256 hash of the tar.gz archive, or accidentally adding translation tags to images for the Flathub front page when they aren’t supposed to have them unless it’s different from the main language of the application (personally, I found the documentation on that ambiguous, but I should’ve noticed when the translation tags in the examples indicated German!) I definitely didn’t read it well enough.
I can not believe what has happened to MDEZ++ in these last almost 10 hours of development time! The first, arguably most major addition, is that MDEZ++ has been added to Flathub, the Linux App Store for Flatpak apps! A Flatpak is a file format that allows you to run applications with universal compatibility between different Linux distributions, extreme security, rootless installation, space-efficient runtimes, and without endless dependencies. It isn’t like PyPI (the Python central repository of projects, installable with pip), in the sense that every Flatpak application must be actually reviewed and accepted by human volunteers. Since I just got it added yesterday, don’t fret if it says the checks are failing! The two things it failed were business color schemes (for the Flathub website) and the summary length, neither of which impact the user in any way. You can view the Flathub listing here.
An edit menu has also been added to MDEZ++! In this edit menu, users who are rusty on Markdown syntax are able to access actions that fill in Markdown syntax for them. If text is highlighted, it will apply the syntax to that text. Whereas, if no text is highlighted, it will apply blank Markdown syntax and move the cursor to the appropriate position for them to be able to instantaneously begin typing.
And font point size settings have been added for the editor and renderer. It’s not much of a big thing, but it is definitely a big thing to troubleshoot right now. I am currently in the process of making MDEZ++ support multiple tabs, making it a TDI (Tabbed Document Interface), rather than an SDI (Single Document Interface). Everything is going well so far, aside from the fact that the font point size setting is magically just not working for the rendering pane. I checked, and it doesn’t have to do with an iteration of the tabs. Each and every tab is still having the code run to change the font size, and it is correctly finding the correct widget to run the code on—the same code that worked before. But it somehow just isn’t working. This is going to be a manhunt.
I also made a Linux setup script (installer)! You can just run the following command on ANY Linux terminal to install Flathub (or compile it on your own, then install it).
bash <(curl -s https://raw.githubusercontent.com/tyleruploads/mdez/refs/heads/main/setup.sh)
But users can also, sadly, uninstall MDEZ++ with the setup script. That’s not something I like to talk about a lot, even though I coded it.
Many big changes have recently been added to MDEZ++. Firstly, fun facts have been added. They are shown to the user right after the program is initialized, and they may also be triggered from the Help menu. Secondly, a Format menu has been added, which allows users who do not know Markdown syntax to still benefit from a Markdown editor (and eventually learn Markdown if they stare at the syntax for long enough). Support for images with src’s as a link has also been added by making a subclass of the QTextBrowser Class, named MdezDocBrowser. A settings menu has also been added. The settings menu contains the interval between each autosave (a newly added feature!), line ending format (CRLF vs. LF), editor line wrapping mode, and whether fun facts should be shown on app initialization. Code snippet blocks have had their background color changed, so you can differentiate them from the white background of the MdezDocBrowser (a subclass of QTextBrowser). Finally, some errors were resolved in the WebAssembly (WASM) export.
I just made some major changes to MDEZ++ The most major change is obviously the additions of a settings menu. While making this settings menu, I also implemented autosave and end-of-line character replacement. The options in the settings menu are the amount of seconds between each autosave, the end of line character type, if line wrapping should be used in the editor, and if fun facts should be shown after application initialization. These settings automatically save between application instances with the help of Qt’s QSettings class.
I also added the fun facts mentioned in the settings menu. The fun facts are related to MDEZ++, and can be shown to the user right after application initialization or through the new button in the Help menu.
Finally, I made some changes to polish the functionality in the WASM export.
I can not believe how many features I have added in these six hours! These have been the six most productive hours in my entire life!
First of all, MDEZ++ got an icon! I made it in Inkscape! It features “M+” with a little down arrow to the right of the plus sign as a nod to the original Markdown logo.
WebAssembly (WASM) support has been added! Now, you can try out MDEZ++ at https://tyleruploads.github.io/mdez/! Now, the actions workflow definitely takes longer to run. But it is definitely worth it!
This has to be the biggest change here! MDEZ++ now supports every single text-based file format!! This means you could edit normal text files, edit code, write JSON, etc in MDEZ++! It also supports HTML now, which is rendered just like Markdown. This took a lot of code to achieve, because I wouldn’t want to try to render something that can’t be rendered! And the edge cases for this are infinite.
I changed the version of Ubuntu used to compile the AppImage from the latest version to version 22.04. You might ask why that is so important. That one change made my project elgible to be at on the appimage.github.io repository! It is a crowd-sourced directory of available, tested AppImages with data that 3rd-party app stores and software centers can use. Given a URL to an AppImage, it inspects the AppImage and puts it into a community-maintained catalog.
I made certain status messages be shown in the status bar at the bottom, including confirmations that the current document has been saved. This makes it so the user doesn’t need to be worried when they click the save button, because they see it was actually savedsaved! I also made it show more errors to the user, so they know what actually goes wrong! For example, instead of just silently returning the open file function whenever they upload a file in an incorrect format, it shows them why the file can’t be uploaded!
The split-pane layout now is resizable! I have tried to do this in the past, but faced ridiculous styling issues that made me not pursue it earlier! It made there be a bunch of completely ridiculous padding around the entire application!
Fun facts have also been added to MDEZ++! They are shown whenever you open the app. You can also manually trigger the fun facts by clicking their associated action in the help menu.
I just added some nice features to MDEZ++! These are very important features for a Markdown editor.
The first feature, which is very obvious to any user, is the added ability to print the current document. If you are wondering, this is obviously to a physical printer. Not a 3D Printer. (I just had to make sure that distinction was made).
The second feature, which is also obvious to any user, is the ability to export the current document to an HTML file, instead of just a Markdown file. I really don’t need to explain this much.
The third feature is easier said than done. Previously, blockquotes had no special coloring. This is just because of the way Qt rendered the Markdown to HTML. I in no means have any experience in any sort of regexing. Here is the code I had to add to make this work.
QString mdText = editor->toPlainText();
QTextDocument tempDoc;
tempDoc.setMarkdown(mdText);
QString rawHtml = tempDoc.toHtml();
QRegularExpression qtBlockquoteRegex("<p style=\" margin-top:[^;]+; margin-bottom:[^;]+; margin-left:40px; margin-right:40px; [^\"]*\">(.*?)</p>");
QString tableReplacement =
"<table width=\"100%\" cellpadding=\"8\" style=\"margin: 6px 0px;\">"
"<tr><td bgcolor=\"#f0f0f0\" style=\"border-left: 4px solid #007acc;\">"
"<span style=\"color: #555555;\">\\1</span>"
"</td></tr>"
"</table>";
rawHtml.replace(qtBlockquoteRegex, tableReplacement);
I just made some important changes to MDEZ++! The first of these changes is the most obvious for the user. I created a new status bar at the bottom of the screen! In the bar, it shows the version number, word count, and file path!
The next change is that I updated the README file for better SEO. I thought to make this change after I tested searching for my project, and saw it dominates its name in Brave, but loses to a football player named María Méndez Fernández on Google.
The final, smallest change, is that I put the README for MDEZ++ on its own GitHub pages site with Jekyll. I I just felt like it. It could also improve search indexing.
I just added an all-new Help bar to MDEZ++, a lightweight Markdown editor written in C++ with the Qt framework. In the Help bar, the following sections are present:
I just added complete file opening and saving capabilities to MDEZ++! This actually wasn’t that hard of an addition, but it now turns MDEZ++ into a true Markdown editor (if you forget it doesn’t have a logo other than the automatically generated W logo by Qt).
I just made the GitHub Actions workflow for MDEZ++! The workflow does 3 things that seem very simple. Here they are:
The complexity of debugging this was further exacerbated by one mistake I kept making. I was amending to commits instead of making new ones during the most intense phase of debugging, and I was unaware that amending to commits does NOT update the code for GitHub Actions!
My actions workflow is literally 105 lines long! 105 is not a mistype and is truly the length of the workflow. You can check it out here.
I have like 50 tabs open of the Qt Documentation and am planning some exciting additions to the project!
This is my first devlog for MDEZ++! MDEZ++ is a lightweight Markdown editor written in C++, while using the Qt Graphical Framework.
This project has already thrown me right back into C++ again, like I was some time ago. Some features I plan to add in the future include saving to and opening files, GitHub GFM Markdown support (right now it is slightly more basic in terms of styling), and much more.