Comments (6)
Hi @pubuzhixing8,
Awesome to hear that you are using slate-yjs in production. Your help would definitely be very appreciated! Sadly we currently rely on the react peer-dependency for cursors, but with the rewrite in v4 we could clean up the API a bit and might be able to remove that dependency.
I wasn't aware that there are different view layer implementations of slate, thanks for bringing that to my attention π
from slate-yjs.
My goal for v4 is to make cursors entirely platform-independent, so just have a CursorPlugin.decorate
utility which returns a function you can pass to either slate-react
or slate-angular
etc. (maybe memorized so you don't even have to useMemo in react.
Btw, so sorry for taking so long on v4 but it's hard to prioritize working on this rn. There are some awesome changes coming including an almost complete document flattening (using nested Y.XmlTexts) which would result in idiomatic conflict resolution in almost all cases.
from slate-yjs.
I do agree I used also this lib in backend (NodeJS) because I do some replacement under the document and then I need to force the normalisation of the editor while everything sync back to the Yjs doc store.
I do not want to have extra library like react in backend, so I just added a react.js
with module.exports = {}
as current workaround. This is a good enough temp solution. The best could to have model/utils/plugin separately imported as needed.
from slate-yjs.
Even with the removed dependency, it would be a good idea for this repo to provide for react/angular/other specific implementations.
I would say a monorepo with multiple "adapter" packages would do the trick for that - have a core slate-yjs repo that only does slate-yjs stuff, slate-yjs-react for the addition of the react hooks and others, etc... It should be relatively simple to do, and if a major bump is coming either way it might be the perfect time to do it.
from slate-yjs.
Looking forward, it sounds awesome! It would be nice also to consider a simple conversion script for production data.
Do you have a branch where you push your current progress? You could also attract some community members doing a part like cursor for angular ;)
from slate-yjs.
Next is split into core and react, core contains all frontend independent logic/utils and doesn't have a react dependency.
from slate-yjs.
Related Issues (20)
- Changes in new slate-yjs HOT 2
- cursor jumping to line start when using IME HOT 1
- Error: Can't resolve 'use-sync-external-store/shim/with-selector' in '/../node_modules/@slate-yjs/react/dist' HOT 6
- The operating error HOT 3
- useRemoteCursorOverlayPositions in react 18 does not work HOT 11
- Awareness Update before State Update HOT 5
- hocuspocus is no longer open source HOT 2
- Undo after replacing selected text with mark is bringing back mark incorrectly and throws exceptions afterwards HOT 3
- Content duplication in Slate-Yjs offline syncing
- An empty line is added when the user opens or reloads the the document . HOT 3
- `Cannot read properties of null (reading 'parent')` during `flushLocalChanges`
- Empty text node added when replacing the doc content with the new content HOT 2
- applyRemoteEvents breaks on text and inline void combination HOT 1
- #applySlateOp doesn't properly adjust indices for move_node operations HOT 1
- Need an example for testing addition of text data in editor for yjs websocket backend HOT 2
- Path doesn't match yText, yTarget spans multiple nodes HOT 5
- absolutePositionToSlatePoint returns null for inline elements
- Nextjs - Firefox canβt establish a connection to the server at ws://127.0.0.1:1234/. HOT 1
- CursorEditor sending cursor position not working
- Expose Yjs -> Slate / Slate -> Yjs function transformations
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from slate-yjs.