GitbookIO / slate-edit-code

A Slate plugin for code block editing
https://gitbookio.github.io/slate-edit-code/
Apache License 2.0
43 stars 34 forks source link

Don't work in slate 0.37 #45

Closed linonetwo closed 6 years ago

linonetwo commented 6 years ago

Don't work in local development, try to reproduce in an online environment but there is another bug. https://stackblitz.com/edit/react-fh7kbo?file=index.js

linonetwo commented 6 years ago
wx20180818-160922 2x

I add border to code block, seems that "enter" will add a new code block instead of a code line.

linonetwo commented 6 years ago

OK, seems plugin is completely not working with slate@0.37 There are lots of API breaking change, I will take a look into it, and submit a PR if I can.

linonetwo commented 6 years ago

@Soreine @SamyPesse I've made it worked. https://github.com/GitbookIO/slate-edit-code/pull/46

Soreine commented 6 years ago

Thanks a lot :)

linonetwo commented 6 years ago

Closing due to the close of PR https://github.com/GitbookIO/slate-edit-code/pull/46#issuecomment-422760482 I may publish another npm package likes slate-code-block or so from my forked version since it's Apache License 2.0?

Soreine commented 6 years ago

Yes you can :)

https://tldrlegal.com/license/apache-license-2.0-(apache-2.0)

cdunn commented 6 years ago

@linonetwo did you ever get around to publishing somewhere? just starting down the road of updating all the slate plugin forks. thanks!

linonetwo commented 6 years ago

@cdunn I've published it as https://www.npmjs.com/package/slate-code-block.

Thought there are some breaking changes in slate 0.40, I will adapt to that soon.