2
0
mirror of https://github.com/tenrok/BBob.git synced 2026-05-15 11:59:37 +03:00
Files
bbob/packages/bbob-preset
github-actions[bot] b09f4fa3c7 chore(release): publish v4.2.0 (#268)
chore(release): release

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-11-26 13:34:17 +02:00
..
2024-04-23 21:11:14 +02:00
2024-04-23 21:11:14 +02:00
2021-11-29 00:33:06 +02:00
2024-04-23 21:11:14 +02:00
2024-04-23 21:11:14 +02:00

#@bbob/preset Base function for create presets to process bbcode AST to HTML or Framework specific tags

Install

npm i @bbob/preset

API

For plain HTML

import { createPreset } from '@bbob/core'

import { createPreset } from '@bbob/preset'

const options = {
    onlyAllowTags: ['url', 'h'],
    onError: (err) => console.warn(err.message, err.lineNumber, err.columnNumber)
};
const pre = parse('[url=https://github.com]hello world![/url]', options)

Usage