Socket
Socket
Sign inDemoInstall

@biblo/addon-simple-markup

Package Overview
Dependencies
518
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @biblo/addon-simple-markup

Allow using simple markup in texts in Biblo files


Version published
Maintainers
1
Created

Readme

Source

Biblo addon simple markup

Biblo addon for parsing simple markup.

Bold text

"Lorem **bold** ipsum" ➡️ Lorem bold ipsum

Italic text

"Lorem _italic_ ipsum" ➡️ Lorem italic ipsum

Strike through text

"Lorem ~~strike through~~ ipsum" ➡️ Lorem strike through ipsum

Installation

# npm
npm install @biblo/addon-simple-markup --save

# Yarn
yarn add @biblo/addon-simple-markup

Initialization

Import the addon and add it to BibloProvider:

import React from "react";
import {
    bibloImporter,
    BibloProvider,
} from "@biblo/react-native";

// Import the addon
import BibloAddonSimpleMarkup from "@biblo/addon-simple-markup";

const components = bibloImporter(
    require.context("/", true, /\.biblo\.[tj]sx?$/),
);

export default function App() {
    return (
        <BibloProvider
            // Apply the addon
            addons={[BibloAddonSimpleMarkup]}
            components={components}
        >
            ...
        </BibloProvider>
    );
}

Options

The default markup is set with

  • ** for bold
  • _ for italic
  • ~~ for strike through

This can be changed by passing an object to BibloAddonSimpleMarkup:

<BibloProvider
    addons={[
        BibloAddonSimpleMarkup({
            bold: "*",
            italic: "__",
            strikeThrough: "--",
        }),
    ]}
    components={components}
>
    ...
</BibloProvider>

Keywords

FAQs

Last updated on 01 Dec 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc