How to use the upad-parse.Translators.Xml function in upad-parse

To help you get started, we’ve selected a few upad-parse examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github MicroPad / Web / app / src / react-web / components / WhatsNewModalComponent.tsx View on Github external
private getHtml: () => Promise = async () => {
		const whatsNewNote = (await Translators.Xml.toNotepadFromNpx(helpNpx)).sections[0].notes[2];

		extension('colour', {
			type: 'listener',
			listeners: {
				'images.after': (event, text: string) =>
					text.replace(/c\[([^\]]+)]\(([^)]+)\)/gi, (match, content, colour) =>
						`<span style="color: ${colour}">${content}</span>`
					)
			}
		} as any);

		const html = new Converter({
			parseImgDimensions: true,
			simplifiedAutoLink: true,
			strikethrough: true,
			tables: true,