Summary: | Kate preview plugin doesn't render Markdown with kmarkdownwebview plugin installed | ||
---|---|---|---|
Product: | [Frameworks and Libraries] kmarkdownwebview | Reporter: | John S. <jman012345> |
Component: | kpart | Assignee: | Friedrich W. H. Kossebau <kossebau> |
Status: | RESOLVED WORKSFORME | ||
Severity: | normal | CC: | christoph, joanmaspons, justin.zobel, lassi.vaatamoinen, pseudo-account, rogerlga |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Neon | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: |
Kate on Neon doesn't show preview for .md file
VS Code plugin works correctly, Okular with kmarkdownwebview has issues |
Description
John S.
2019-07-21 22:49:19 UTC
Hi. Just to make sure, you are not running into bug 384971, bug 384972 or 384973? Does using the Okular plugin (which has a markdown import plugin and thus also can be used here) work instead? I just tested and I'm unable to get the Okular plugin to work either. However, this is not the initial blank document that hasn't been saved (bug 384971) and I'm not attempting to change the MIME type of an existing document to Markdown (bug 384972). The workarounds for bug 384973 don't work for me either. Potentially in newer versions this could also be influenced by the Mode currently used (cmp. https://cgit.kde.org/kate.git/tree/addons/preview/previewwidget.cpp#n169 ) So test if changing the Tools>Mode to Markup > Markdown fixes things. Otherwise no idea, no longer a maintainer of that plugin (surprised to have been subscribed). Just tried that, still no luck. Is there a way to get debug output from the preview plugin? I see what looks like debug text in the source you linked but if I launch Kate from a terminal window I don't get any debug output. (In reply to jman012345 from comment #4) > Just tried that, still no luck. Is there a way to get debug output from the > preview plugin? I see what looks like debug text in the source you linked > but if I launch Kate from a terminal window I don't get any debug output. You can control the debug level via the qt logging system. In this case the identifier to use is a (badly unnamespaced) "ktexteditorpreviewplugin". export QT_LOGGING_RULES="ktexteditorpreviewplugin.debug=true" should set the respective env var to change the level for that logging category. (more background at https://doc.qt.io/qt-5/qloggingcategory.html) Alright, I've figured out what the problem is, and it's a variant/duplicate of bug 384973. As it turns out, even if you open a Markdown document, close it, and reopen it, to Kate (or the preview plugin) that's no different than opening a Markdown document from Kate just having been opened. The workaround is either to open one document, then open your Markdown document with the first one still open, then close the first document; or to type a few letters into the initial untitled document, then open your desired Markdown document, then close the untitled document. John I've just tested on kate from git master and when opening kate from scratch and then opening a .md file I get a preview instantly. Can you please test and confirm if this bug is still occurring, thanks. Dear Bug Submitter, This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information as soon as possible and set the bug status as REPORTED. Due to regular bug tracker maintenance, if the bug is still in NEEDSINFO status with no change in 30 days the bug will be closed as RESOLVED > WORKSFORME due to lack of needed information. For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging If you have already provided the requested information, please mark the bug as REPORTED so that the KDE team knows that the bug is ready to be confirmed. Thank you for helping us make KDE software even better for everyone! This bug has been in NEEDSINFO status with no change for at least 30 days. The bug is now closed as RESOLVED > WORKSFORME due to lack of needed information. For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging Thank you for helping us make KDE software even better for everyone! Created attachment 140693 [details]
Kate on Neon doesn't show preview for .md file
STEPS TO REPRODUCE
1. Install Kate and kmarkdownwebview
2. Open Kate by console command and open any non-empty .md file
3. Try to open preview
OBSERVED RESULT
1. Empty space instead of preview
2. Errors in console log:
Qt WebEngine seems to be initialized from a plugin. Please set Qt::AA_ShareOpenGLContexts using QCoreApplication::setAttribute before constructing QGuiApplication.
WebEngineContext used before QtWebEngine::initialize() or OpenGL context creation failed.
EXPECTED RESULT
Kate shows preview
SOFTWARE/OS VERSIONS
Operating System: KDE neon 5.22
KDE Plasma Version: 5.22.4
KDE Frameworks Version: 5.84.0
Qt Version: 5.15.3
Kernel Version: 5.11.0-25-generic (64-bit)
Graphics Platform: X11
Processors: 6 × AMD Ryzen 5 4500U with Radeon Graphics
Memory: 5.7 ГиБ of RAM
Graphics Processor: AMD RENOIR
ADDITIONAL INFORMATION
Okular also has the same problems
kmarkdownwebview 0.5.6-0xneon+20.04+focal+release+build7
Created attachment 140694 [details]
VS Code plugin works correctly, Okular with kmarkdownwebview has issues
The second screenshot for comparison: VS Code has specific Preview plugin which works correctly.
Okular with kmarkdownwebview has issues.
AFAIR, Okular without kmarkdownwebview shows plain text.
Uninstalling kmarkdownwebview and installing markdownpart solves the problems in Neon and I don't find any regression in kate nor okular I confirm exactly the same behavior and error messages as in Andrey's Comment 10 above. Ok, jmaspons' suggestion in Comment 12, along with the instructions below, solved the problem. "To use the MarkdownPart KParts plugin in a KParts-using applications, often you will need to configure that globally in the Plasma System Settings, and there in the "File Associations" page. Select the MIME type "text/markdown" and in the "Embedding" tab in the "Service Preference Order" group make sure "Markdown View (markdownpart)" is on top of the list." markdownpart works for me, the other one I can't comment on. Just tried this and after installing 'kmarkdownwebview' the Document Preview plugin works. Kate Version 23.08.2 KMarkdownWebViewPart Version 0.5.6 |