MCPcopy
hub / github.com/ether/etherpad / getPadHTML

Function getPadHTML

src/node/utils/ExportHtml.ts:34–44  ·  view source on GitHub ↗
(pad: PadType, revNum: string)

Source from the content-addressed store, hash-verified

32import {StringAssembler} from "../../static/js/StringAssembler";
33
34const getPadHTML = async (pad: PadType, revNum: string) => {
35 let atext = pad.atext;
36
37 // fetch revision atext
38 if (revNum !== undefined) {
39 atext = await pad.getInternalRevisionAText(revNum);
40 }
41
42 // convert atext to html
43 return await getHTMLFromAtext(pad, atext);
44};
45
46const getHTMLFromAtext = async (pad:PadType, atext: AText, authorColors?: string[]) => {
47 const apool = pad.apool();

Callers 1

ExportHtml.tsFile · 0.85

Calls 2

getHTMLFromAtextFunction · 0.85

Tested by

no test coverage detected