Socket
Socket
Sign inDemoInstall

@artibox/slate-bold

Package Overview
Dependencies
54
Maintainers
2
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @artibox/slate-bold


Version published
Maintainers
2
Created

Changelog

Source

1.2.0 (2020-09-26)

Features

  • image: caption (#60) (1bea030)

BREAKING CHANGES

  • image: Image controller methods changed Jsx serializer become multiple as list's Old images won't break, but new images will be wrapped by a figure

Readme

Source

@artibox/slate-bold

Installation

npm install @artibox/slate-bold --save

or

$ yarn add @artibox/slate-bold

Usage

Editor

import React from 'react';
import { Bold as BoldIcon } from '@artibox/icons';
import { createArtiboxEditor } from '@artibox/slate-editor';
import { Toolbar } from '@artibox/slate-toolbar';
import { createBold } from '@artibox/slate-bold';

const Bold = createBold();

const plugins = [
  Bold.forPlugin(),
  Toolbar.forPlugin({
    expandedTools: [{ icon: BoldIcon, hook: Bold.forToolHook() }]
  })
];

const Editor = createArtiboxEditor({
  plugins
});

export default Editor;

Jsx Serializer

import { createJsxSerializer } from '@artibox/slate-jsx-serializer';
import { createBoldJsxSerializerRule } from '@artibox/slate-bold';

const jsxSerializer = createJsxSerializer({
  marks: [
    createBoldJsxSerializerRule()
  ]
});

...

return (
  <div>
    {jsxSerializer(valueJSON /* from slate */)}
  </div>
);

API

This package is based on based on @artibox/slate-toggle-mark.

Hotkey

OSShortcut
Apple Logo+b
Windows Logoctrl+b

FAQs

Last updated on 26 Sep 2020

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