UNPKG

synapse-react-client

Version:

[![npm version](https://badge.fury.io/js/synapse-react-client.svg)](https://badge.fury.io/js/synapse-react-client) [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettie

32 lines 1.63 kB
import { RefObject } from 'react'; import { MarkdownSynapseProps } from './MarkdownSynapse'; /** * Find all math identified elements of the form [id^=\"mathjax-\"] * (e.g. <dom element id="mathjax-10"> text </dom element>) * and transform them to their math markdown equivalents */ export declare function processMath(markupRef: RefObject<HTMLElement | null>): void; /** * When the markdown string is transferred over the network certain characters get transformed, * this does a simple transformation back to the original user's string. * * @param {string} xml * @returns * @memberof MarkdownSynapse */ export declare function decodeXml(xml: string): string; export declare function addIdsToReferenceWidgets(text: string): string; export declare function addIdsToTocWidgets(text: string): string; export declare function handleLinkClicks(event: MouseEvent): void; export declare function stripHTML(myHtmlString: string): string; export declare function transformStringIntoMarkdownProps(value: string, isRawMarkdown?: boolean): MarkdownSynapseProps; export declare const markdownToPlainText: (markdown: string, maxLength?: number) => string; export declare const isBlockLevelElement: (node: Node) => boolean; /** * Fixes invalid HTML nesting (e.g., <div> inside <p>) in a single O(n) pass. * It compares the current 'node' against a stack of its 'ancestors'. * @param node - The current DOM node being inspected. * @param ancestors - An array of the current node's parent elements */ export declare function fixInvalidNesting(node: Node, ancestors?: HTMLElement[]): void; //# sourceMappingURL=MarkdownUtils.d.ts.map