Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

https://github.com/aboveyunhai/chakra-slatejs-example

This is a richtext example of using slate.js with Chakra UI.
https://github.com/aboveyunhai/chakra-slatejs-example

chakra-ui react slate-react slatejs typescript

Last synced: 3 months ago
JSON representation

This is a richtext example of using slate.js with Chakra UI.

Lists

README

        

# chakra-slatejs-example
This is a richtext example of using slate.js with Chakra UI and Typescript.

Because Chakra UI modifies some of default html css style, the example is intented to fully use Chakra basic components to achieve the same behavior from offical example.

Also includes Light/Dark Mode toggler to demonstrate how to specify the richtext editor display under different color mode.

CodeSandBox: [chakra-slatejs](https://codesandbox.io/s/chakra-slatejs-ptpfm?file=/src/index.tsx)

Based on [Slate official RichText example](https://github.com/ianstormtaylor/slate/blob/master/site/examples/richtext.tsx)
and the discussion of selection bug: https://github.com/ianstormtaylor/slate/issues/3412