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
15 lines
312 B
JSON
15 lines
312 B
JSON
{
|
|
"compilerOptions": {
|
|
"outDir": "./build",
|
|
"allowJs": true,
|
|
"target": "es5",
|
|
"lib": ["dom", "es5", "scripthost", "es2015.promise"],
|
|
"moduleResolution": "node",
|
|
"module": "es2015",
|
|
"sourceMap": true
|
|
},
|
|
"include": [
|
|
"./src/**/*"
|
|
]
|
|
}
|