JSPM

  • Created
  • Published
  • Downloads 40405
  • Score
    100M100P100Q148554F
  • License MIT

Base preset for creating extensible presets for @bbob/core

Package Exports

  • @bbob/preset

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@bbob/preset) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

#@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