Giter Club home page Giter Club logo

slate-instant-replace's Introduction

Hi ! ⚡️

My name is Enzo and I'm providing technical leadership to young teams.

I'm a super energetic person who:

💻 codes a lot
🍳 eats a lot
🏋🏻‍♂️ trains a lot

I have been doing web development for the last 11 years bootstrapping +50 products in a wide variety of markets 🚀

Currently building 10xTeam.dev 🎯

https://enzoferey.com

slate-instant-replace's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

slate-instant-replace's Issues

Error when extending a URL: assertNode could not find node

Hey @enzoferey,

nice job with this, exactly what I was looking for! 👏 👍
I am trying to get your url-example running and everything works fine except for one thing:

When I type a URL like http://go.co it gets properly detected, tagged as an Inline and the node gets rendered. If I continue typing then - lets say the character m to finish the URL to be http://go.com I receive an error message in the console:

slate.es.js:7198 Uncaught Error: `Node.assertNode` could not find node with path or key: List [ 0, 2 ]
    at Document.Node.(:3000/anonymous function) [as assertNode] (http://localhost:3000/static/js/bundle.js:57490:13)
    at Document.splitNode (slate.es.js:6849)
    at Document.getFragmentAtRange (slate.es.js:5339)
    at Document.object.(:3000/anonymous function) [as getFragmentAtRange] (http://localhost:3000/static/js/bundle.js:51244:28)
    at Value.get$$1 (slate.es.js:12405)
    at getSelection (index.js:23)
    at getLastWordRec (index.js:31)
    at getLastWord (index.js:50)
    at Object.onKeyDown (index.js:87)
    at Stack$$1.run (slate.es.js:10253)
    at slate-react.es.js:4210
    at Change.call (slate.es.js:14204)
    at Editor.change (slate-react.es.js:4192)
    at Editor.onEvent (slate-react.es.js:4209)
    at Object._this.(:3000/anonymous function) [as onKeyDown] (http://localhost:3000/static/js/bundle.js:49360:23)
    at Content.onEvent (slate-react.es.js:2117)
    at _this.(:3000/anonymous function) (http://localhost:3000/static/js/bundle.js:47400:15)
    at HTMLUnknownElement.callCallback (react-dom.development.js:100)
    at Object.invokeGuardedCallbackDev (react-dom.development.js:138)
    at Object.invokeGuardedCallback (react-dom.development.js:187)
    at Object.invokeGuardedCallbackAndCatchFirstError (react-dom.development.js:201)
    at executeDispatch (react-dom.development.js:461)
    at executeDispatchesInOrder (react-dom.development.js:483)
    at executeDispatchesAndRelease (react-dom.development.js:581)
    at executeDispatchesAndReleaseTopLevel (react-dom.development.js:592)
    at forEachAccumulated (react-dom.development.js:562)
    at runEventsInBatch (react-dom.development.js:723)
    at runExtractedEventsInBatch (react-dom.development.js:732)
    at handleTopLevel (react-dom.development.js:4476)
    at batchedUpdates$1 (react-dom.development.js:16659)
    at batchedUpdates (react-dom.development.js:2131)
    at dispatchEvent (react-dom.development.js:4555)
    at interactiveUpdates$1 (react-dom.development.js:16714)
    at interactiveUpdates (react-dom.development.js:2150)
    at dispatchInteractiveEvent (react-dom.development.js:4532)

I've been stuck at this point for half an hour now and came to conclude that this either is an issue with your extension or with Slate itself. I'll have a look at your code now, but I just got started with Slate today so that might not be that effective.

Would love it if you could have a look at this. Thanks! 😊

Move to Jest

Use jest instead of mocha + chai + sinon and globals.

Update to Slate 0.5

Request to update this library to Slate 0.5.

If this is something I end up needing I would be happy to help, do you have any thoughts on where the focus would need to be to update?

SSR Support

It looks like this plugin doesn't work with server side rendering, it would be great to get a check for the existence of window before using it – likely just a code compilation setting?

outline/rich-markdown-editor#133

Does not pass events to subsequent plugins

Hey Enzo, it looks like if you place this plugin before another one the events never make it through – I believe because you need to call next() method if no transforms are run – and you're only doing so in one spot.

image

Could be the case with this issue: #3

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.