English | 简体中文
npm install fantasy-editor --save
# Clone the repository
$ git clone https://github.com/lingjieee/fantasy-editor.git
# Change directory
$ cd fantasy-editor
# Install dependencies
$ yarn install
# Run examples
$ yarn start
A React Rich Text Editor Based On Slate
Home Page: https://fantasy-editor.jieee.dev/
License: MIT License
English | 简体中文
npm install fantasy-editor --save
# Clone the repository
$ git clone https://github.com/lingjieee/fantasy-editor.git
# Change directory
$ cd fantasy-editor
# Install dependencies
$ yarn install
# Run examples
$ yarn start
重现步骤:
打开 https://fantasy-editor.jieee.dev/examples/full
删除所有内容, 输入 任意内容,并转换为代码块, 如 输入很多个 11111111111111
选中一部分内容,并设置一个任意颜色
编辑器就崩溃了
https://fantasy-editor.jieee.dev/examples/full
i can enter ```,then enter space button, it's work
then i enter ```js or ```javascript or ```python , then enter space button, it's not work
can you fix it ?
thank you very much
=====
中文版:
你好,我想插入代码块 , 但是编辑器只支持 ```, 不支持设定特定语言,如 ```js , ```python ,
如果我在 ```后面加了特定语言的标记, 按空格后,没有自动生成一个代码块
请问有办法解决吗
谢谢
如 鼠标放在图标 B上, 显示 【加粗】
鼠标放在 U 上,提示 【添加下划线】
谢谢
在编辑器里 输入了 markdown的内容
请问 用啥办法 获取markdown格式的内容
因为我的数据库存 同时存了markdown格式 和 html格式, 所以我想额外获取markdown格式
谢谢
我想在现有图标后面,添加一个问号图标, 点击图标后,就会显示 编辑器的使用说明, 请问怎么操作呢
有点类似 这个编辑器后面的问号 https://canner.github.io/canner-slate-editor/?selectedKind=canner-slate-editor&selectedStory=Simple%20demo&full=0&addons=1&stories=1&panelRight=0
谢谢
以这个demo的代码为例子 https://fantasy-editor.jieee.dev/examples/serialize/markdown
我把里面的 value.json 文件的内容修改为了: [{ "type":"paragraph", "children": [{ "text":"" }] }]
目的是让编辑器初始值为空
然后我随便输入一点内容, 接着全选,删除编辑器里所有内容(可能会按下很多次删除键)
然后切换到中文输入法, 输入中文,
然后编辑器就崩溃了(并非每次都崩溃,但概率极大,可能90%的概率)
这是报错信息:
Error: Cannot resolve a Slate point from DOM point: [object Text],1
我简单的查询了下,和这个 问题有点像 ianstormtaylor/slate#3753
按照示例在react中运行时报错
Error: The useSlate
hook must be used inside the component's context.
请问如何解决
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.