braft-editor icon indicating copy to clipboard operation
braft-editor copied to clipboard

如何自定义block中key的值?(How to set the value of key of block by my rule?)

Open luneice opened this issue 5 years ago • 1 comments

存储block中的数据时发现它的key是随机的,但是使用blockStyleFn去设置时报错,怎么使用我自己的规则定义block的key的值?

When i store the data of block of editorState.toRAW(), which can be found that the value of key of block seems random. So how to change the value of key of block, because something is wrong when using blockStyleFn to set it.

luneice avatar Jan 09 '20 04:01 luneice

我也遇到类似的问题了,不过是在使用blockStyleFn的时候会报错 Unknown DraftEntity key。请问你最后怎么解决了?

astudentat avatar Jul 15 '24 07:07 astudentat