🚀 DAY 5 OF LAUNCH WEEK: Introducing Socket Firewall Enterprise.Learn more →
Socket
Book a DemoInstallSign in
Socket

@biblo/addon-simple-markup

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@biblo/addon-simple-markup

Allow using simple markup in texts in Biblo files

latest
Source
npmnpm
Version
1.3.1
Version published
Maintainers
1
Created
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

biblo

FAQs

Package last updated on 01 Dec 2022

Did you know?

Socket

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