Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #31058 > unrolled thread

JavaFX web engine read image data from Jar

Started byPhilipp Kraus <philipp.kraus@flashpixx.de>
First post2015-02-06 08:39 +0100
Last post2015-02-07 07:31 +0100
Articles 3 — 2 participants

Back to article view | Back to comp.lang.java.programmer


Contents

  JavaFX web engine read image data from Jar Philipp Kraus <philipp.kraus@flashpixx.de> - 2015-02-06 08:39 +0100
    Re: JavaFX web engine read image data from Jar Jeff Higgins <jeff@invalid.invalid> - 2015-02-06 07:32 -0500
      Re: JavaFX web engine read image data from Jar Philipp Kraus <philipp.kraus@flashpixx.de> - 2015-02-07 07:31 +0100

#31058 — JavaFX web engine read image data from Jar

FromPhilipp Kraus <philipp.kraus@flashpixx.de>
Date2015-02-06 08:39 +0100
SubjectJavaFX web engine read image data from Jar
Message-ID<mb1r2k$2dt8$1@ariadne.rz.tu-clausthal.de>

[Multipart message — attachments visible in raw view] — view raw

Hello,

I use JavaFX WebEngine to view HTML data within my application. Within 
my Jar file I have stored Markdown file, which are translate with 
PegDownProcessor
into HTML code. I read the Markdown file with:

BufferedReader l_reader = new BufferedReader( new InputStreamReader( 
this.getClass().getClassLoader().getResourceAsStream( p_source ) ) );
p_engine.loadContent( m_markdown.markdownToHtml( IOUtils.toString( 
l_reader ).toCharArray() ) );
l_reader.close();

m_markdown is a instance of PegDownProcessor and p_engine is a instance 
of WebEngine. I have added a changed listener on the engine to get click
events on a <a href=""> tag. On a click the listener checks the href 
attribute and read the new file from my Jar (if it is a full qualified 
URL I read the URL content).
This works well at the moment.

My question is, how can I modify the src attribut on a img tag, before 
the image is shown in the UI, because I need to change the URL also to 
the Jar file?
I did not found any information in the PegDownProcessor documentation 
to modify the URL, which is generated by the Markdwon processor.

Thanks

Phil

[toc] | [next] | [standalone]


#31060

FromJeff Higgins <jeff@invalid.invalid>
Date2015-02-06 07:32 -0500
Message-ID<mb2cfa$pma$1@dont-email.me>
In reply to#31058
On 02/06/2015 02:39 AM, Philipp Kraus wrote:
>
> I did not found any information in the PegDownProcessor documentation to
> modify the URL, which is generated by the Markdwon processor.
>
<https://github.com/sirthias/pegdown/pull/115>

[toc] | [prev] | [next] | [standalone]


#31066

FromPhilipp Kraus <philipp.kraus@flashpixx.de>
Date2015-02-07 07:31 +0100
Message-ID<mb4bfa$k5$1@ariadne.rz.tu-clausthal.de>
In reply to#31060
On 2015-02-06 12:32:30 +0000, Jeff Higgins said:

> On 02/06/2015 02:39 AM, Philipp Kraus wrote:
>> 
>> I did not found any information in the PegDownProcessor documentation to
>> modify the URL, which is generated by the Markdwon processor.
>> 
> <https://github.com/sirthias/pegdown/pull/115>

Greate thanks, I don't found the LinkRenderer. Work's well

Phil

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.java.programmer


csiph-web