Skip to content

Commit e74ffac

Browse files
committed
Add support to show images in markdown preview. Set missing base to
use relative paths for loading images
1 parent 4797bd4 commit e74ffac

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

ide/markdown/src/org/netbeans/modules/markdown/MarkdownViewerElement.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,7 @@ public void updateView() {
243243
HTMLEditorKit kit = (HTMLEditorKit) viewer.getEditorKit();
244244

245245
HTMLDocument doc = (HTMLDocument) viewer.getDocument();
246+
doc.setBase(dataObject.getPrimaryFile().getParent().toURL());
246247

247248
// Would be better to create some diff and update the changed elemets
248249
doc.remove(0, doc.getLength());

0 commit comments

Comments
 (0)