2
0
mirror of https://github.com/tenrok/BBob.git synced 2026-05-15 11:59:37 +03:00
Files
bbob/packages/bbob-preset
Nikolay Kostyurin f35a37433b Publish
- @bbob/cli@2.0.1
 - @bbob/core@2.0.1
 - @bbob/html@2.1.0
 - @bbob/parser@2.1.0
 - @bbob/plugin-helper@2.0.1
 - @bbob/preset-html5@2.1.0
 - @bbob/preset-react@2.0.1
 - @bbob/preset@2.1.0
 - @bbob/react@2.0.1
2018-09-24 00:56:50 +02:00
..
2018-09-24 00:56:50 +02:00
2018-09-24 00:56:50 +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