This is NOT for saving interactive HTML. SaveInteractiveHTML already does this. You should probably use it instead.
When JMP saves HTML with graphics, it creates a directory named gfx to hold the images. The gfx directory will hold images for all the HTML files that are saved in the same parent directory. If you send the HTML to someone, they only need the files for that HTML, and they need to put the gfx directory and the HTML in the same location. It works pretty well if you have a server where you can put them, but not so good if you email them.
This example JSL will embed the images into the HTML using a Data URL (formerly known as a Data URI). The gfx is not needed after conversion because the pictures are moved into the HTML.
@ihnleung
workdir = "$temp/deleteme/";
Delete Directory( workdir );
Create Directory( workdir );
dt = Open( "$sample_data/big class.jmp" );
bv = dt << Bivariate( Y( :weight ), X( :height ), Fit Line );
bv << journal;
bv << closewindow;
ow = dt << Oneway( Y( :height ), X( :sex ), Means( 1 ), Mean Diamonds( 1 ) );
ow << journal;
ow << closewindow;
Close( dt, nosave );
Current Journal() << savehtml( workdir || "x.html" );
Current Journal() << closewindow;
html = Load Text File( workdir || "x.html" );
snips = {};
rc = Pat Match(
html,
Pat Repeat(
Pat Arb() >> txt
+
(
("> file + "\!"")
|
Pat R Pos( 0 ) >> file
) +
Pat Test(
Insert Into( snips, txt );
If( file != "",
Insert Into(
snips,
"
Looks like the JSL might get mangled( & colon ; instead of : ) because of the html inside of html...the attached file might work better.