I searched the web/stackoverflow for hours and could not find a solution...
I am using eclipse for C (2023-12) and have a few markdown files in my code that are meant to document the code components. The intent is to simply have the files as part of the code, no parsing or editing of markdown text during runtime of my code is intended. In the preview tab of the editor the headings are all the same size, which makes navigating/reading the document very cumbersome. So I am looking for a way to change the appearance of the content of the preview tab.
What I found so far is that - contrary to eclipse docu - there is no preferences tab "appearance" under the "wikitext" preference item. In my workspace log I see errors of the type:
!MESSAGE Conflicting handlers for org.eclipse.ui.edit.findNext: {ActionHandler(org.eclipse.ui.texteditor.FindNextAction@324f600a)} vs {ActionHandler(org.eclipse.ui.texteditor.FindNextAction@324f600a)} in: PartImpl (org.eclipse.e4.ui.compatibility.editor) removeOnHide org.eclipse.mylyn.wikitext.ui.editor.markupEditorContext
Does that error relate to the non-existance of that "appearance" prefeences tab? Where else would I be able to change the preview appearance in the markdown editor? Thanks a lot for any pointers! Cheers
example markdown code (both headings display as same size, which is huge to start with):
# Custom Board Configuration
bla bla bla...
## Board peripherals
- Buttons
- SD Card
Edit: yes, I meant the "preview" tab. code sampel provideded, too.
It seems that only the font sizes used in the WikiText editor in the Markdown Source tab can be configured in the preferences General > Editors > Text Editors > WikiText.
In contrast, the font sizes used in the Preview tab seem to be hard-coded in the org.eclipse.mylyn.wikitext.ui
plugin in the file org/eclipse/mylyn/internal/wikitext/ui/viewer/default.css
: in line 138 the font size for h1
... h4
is set to font-size: 1.75em;
.
As workaround/hack you can replace in your Eclipse installation in plugins/org.eclipse.mylyn.wikitext.ui_*.jar
the file org/eclipse/mylyn/internal/wikitext/ui/viewer/default.css
with your version.
Please consider to do a pull request with a better default.css
. It would also be nice to have a preference to customize it. The default values for the Markdown Source tab can be found here.