UNPKG

@umbraci/jsmind

Version:

jsMind is a pure javascript library for mindmap, it base on html5 canvas. jsMind was released under BSD license, you can embed it in any project, if only you observe the license.

44 lines (43 loc) 1.38 kB
/** * Create a custom node render function for multiline text * @param {MultilineTextOptions} [options={}] - Plugin options * @param {number} [options.text_width=200] - Maximum width for multiline text nodes * @param {string} [options.line_height='1.5'] - Line height for text * @returns {function(jsMind, HTMLElement, Node): boolean} Custom render function * @example * const options = { * view: { * custom_node_render: createMultilineRender({ * text_width: 250, * line_height: '1.6', * }) * } * }; */ export function createMultilineRender(options?: MultilineTextOptions): (arg0: jsMind, arg1: HTMLElement, arg2: Node) => boolean; declare namespace _default { export let name: string; export { init }; export { createMultilineRender }; } export default _default; /** * Default plugin options */ export type MultilineTextOptions = { /** * - Maximum width for multiline text nodes (default: 200) */ text_width: number; /** * - Line height for text (default: '1.5') */ line_height: string; }; /** * Plugin initialization function * @param {import('../jsmind.js').default} jm - jsMind instance * @param {MultilineTextOptions} options - Plugin options * @private */ declare function init(jm: import("../jsmind.js").default, options: MultilineTextOptions): void;