Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
2 posts
|
Hi,
So I have a .adoc document, that I am rendering as html using java APIs. But the styling is not getting rendered. I have tried using :linkcss: as well as the following. :stylesdir: mystylesheets/ :stylesheet: mystyles.css But still there is no styling in my rendered page. My code is as follows: Attributes attributes = new Attributes(); Options options = new Options(); options.setAttributes(attributes); options.setInPlace(true); router.get("/readme.html").handler( ctx -> { String html = asciidoctor.convert( getDocFileContent(), options); ctx.response().end(html); }); I am using a sample readme.adoc file, the content is getting loaded, but the default embedded styling is not rendered. Can somebody please help me regarding this. My sample.adoc file: == Base Verticle This document is a reference guide for using the Base verticle as well as the utilities provided by it. [cols="2,1,4",options="header"] |=== | Property | Required| Description |PROPERTY1 |Yes |random remarks |PROPERTY2 |No |random1 remarks |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Administrator
2681 posts
|
You need to set the safe mode to "safe". When using the API, the default mode is "secure", which disables many features. -Dan On Tue, Aug 1, 2017 at 2:35 AM, jasjeetkaur [via Asciidoctor :: Discussion] <[hidden email]> wrote: Hi, ... [show rest of quote] Dan Allen | @mojavelinux | https://twitter.com/mojavelinux |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
2 posts
|
I have done that.
options.setSafe(SafeMode.SAFE); Also, the problem is only with asciidoctor.convert(...) api. If I use the convertFile variant of the api, the style is rendered by default. But I need convert api as I in my logic, passing the file would negate the purpose of my utility. Thanks Jasjeet Kaur |
Free forum by Nabble | Edit this page |