mirror of
https://github.com/tbluemel/rtf.js.git
synced 2026-11-30 16:47:59 +01:00
ex:
===
{\field {\*\fldinst import image.WMF}}
{\field {\*\fldinst import image.EMF}}
where:
======
* "image.WMF" is a relative URL path
* the external files are not read by the library
* a new hook function is added to the "settings" Object
that is passed to the "RTFJS.Document()" constructor
* "settings.onImport(relURL, cb)"
* this hook function is responsible for:
* reading data from the external file @ "relURL" into a blob
* mapping the file extension to a "keyword" (ex: "wmetafile")
* passing this information to the callback function with the desired height
* cb({keyword, blob, height})
demo:
=====
samples/04_rtf_imports/rtf.html
12 lines
168 B
CSS
12 lines
168 B
CSS
html, body {
|
|
margin: 20px;
|
|
padding: 0;
|
|
|
|
font-size: 16px;
|
|
font-family: arial, helvetica, sans-serif;
|
|
line-height: 1.25em;
|
|
}
|
|
svg {
|
|
width: 100%;
|
|
}
|