5
$\begingroup$
ExportString["Test","HTML"]
Export["Test.html","test","HTML"]

 <link href="HTMLFiles/m-478f1adf-0b36-429c-9ee2-ff6f5c953e52.css" rel="stylesheet" type="text/css" />

the Directory is HTMLFiles How to make it be the absolute directory, For instance

Directory[]<>"\\HTMLFiles"

I done it by StringReplace before. Is there any setting in Mathematica?

$\endgroup$
2
$\begingroup$

This can be done by HTMLFragment which introduced in 2014.

ExportString[
BarChart[{1}], 
"HTMLFragment", 
"URIHandler" -> "Export", 
"FilesPrefix" -> "http://localhost/media/temp"]

output:
<img src=\"http:/localhost/media/temp/kqh0jxxfrg57.jpg\" \
class=\"img-responsive\"/>
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.