madflow / flow-netbeans-markdown

Markdown file support for the NetBeans IDE
MIT License
279 stars 40 forks source link

Preview should set background colour #90

Closed jerry1970 closed 7 years ago

jerry1970 commented 9 years ago

I have a dark Netbeans theme installed and the preview now has black letters on a dark blue background. Since it's just a preview and the text colour is set as a default colour I wouldn't mind having the background set to white, which seems to be the default for most browsers.

Cheers

madflow commented 9 years ago

First of all: You can set the preview background-color Options->Miscellaneous->Markdown->HTML Export with CSS.

When I test this with a dark theme - the preview backgound is white. But - there has been a separate issue: #59 - this is probably related.

jerry1970 commented 9 years ago

Hey cool, I completely missed that option!

But it does not work for me. Whatever I set in that HTML Export field, the preview remains the same, even after closing and restarting NB. I even tested with some hard coded text inside the body tag, but it doesn't show.

Anything else I have to check / uncheck / set?

stengerh commented 9 years ago

Which version of NetBeans and the plugin do you use? Is the "Use JavaFX to display preview in editor" option enabled in the plugin's options (Options > Miscellaneous > Markdown > Miscellaneous)? The Swing based preview does not use the user-configurable HTML template because support for HTML and CSS in Swing is very limited.

jerry1970 commented 9 years ago

Netbeans: the title bar says Dev 1, the About screen says "Development Version" and "IDE Dev (Build 1)", the shortcut has "Build 201502020002" as description.

Plugin: upgraded from 2.1 tot 2.2 but no changes there.

I've tried it with "JavaFX" both switched off and on. Again, no changes. I'll keep this switched on from now.

Could it be some conflict with another plugin? Something else that might help pinpointing the source of the problem: I'm also seeing only 140 available plugins while at work (should test the MD plugin there, I run the official NB 8.0.2 release on Xubuntu) I see over 210 plugins. Like I am missing a repository or it's filtering out plugins based on the NB version. Maybe I should get the latest development release of NB?

stengerh commented 9 years ago

Which version of the JRE/JDK do you use? The JavaFX based preview only works on 8 and 7u45 or later if I remember correctly. Also you will need the Oracle JRE/JDK on Linux. OpenJDK versions before OpenJDK 9 do not contain the JavaFX runtime libraries.

stengerh commented 9 years ago

By the way the easiest way to check whether JavaFX is available is the check the web browser option in the Netbeans options (Options > General). "Embedded WebKit Browser" is listed as an option only if JavaFX is available.

jerry1970 commented 9 years ago

This is the info from the About dialog:

Product Version: NetBeans IDE Dev (Build 1)
Java: 1.7.0_51; Java HotSpot(TM) 64-Bit Server VM 24.51-b03
Runtime: Java(TM) SE Runtime Environment 1.7.0_51-b13
System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb)
User directory: C:\Users\kooten\AppData\Roaming\NetBeans\dev
Cache directory: C:\Users\kooten\AppData\Local\NetBeans\Cache\dev

The Embedded WebKit Browser option is available in Options > General, so I suppose JavaFX is available. Weird version numbering for Java, though. And the CP1251 and en_US should not be there, I tried to change those... :/

jerry1970 commented 9 years ago

Just installed the latest development release:

Product Version: NetBeans IDE Dev (Build nbms-and-javadoc-2781-on-20150311)
Java: 1.8.0_45; Java HotSpot(TM) 64-Bit Server VM 25.45-b02
Runtime: Java(TM) SE Runtime Environment 1.8.0_45-b14
System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb)
User directory: C:\Users\kooten\AppData\Roaming\NetBeans\dev
Cache directory: C:\Users\kooten\AppData\Local\NetBeans\Cache\dev

And it works! Not sure if with the newer version I also got a later version of JavaFX, whether it was never installed properly, or whether it was the change you rolled back, but the template is now used. Also, no more scrolling to the bottom of the preview page.

Cheers, guys.