Comments (4)
Hi @michael!
Thanks for opening this issue. Looks like the attributes
editor prop allows you to do this:
- https://prosemirror.net/docs/ref/#view.EditorProps.attributes
- https://github.com/ProseMirror/prosemirror-view/blob/e878a099871b9f44329674aed25ba6e40b51b222/src/index.js#L379-L395
I'll add a little note to the README about this, too.
from use-prosemirror.
Just tested it out in the sandbox example and yes, just add the attributes
prop with an object (or function returning an object) like {class: "myProseMirror anotherClass"}
and the resulting class on the editor will be ProseMirror myProseMirror anotherClass
from use-prosemirror.
Super that does the trick. 👍 Thanks a lot!
from use-prosemirror.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
from use-prosemirror.
Related Issues (13)
- Editor broken when non-identity-stable nodeViews are specified HOT 3
- use-prosemirror is not a good fit for a React Stateless Functional Component ? HOT 2
- Input methods (e.g. Chinese) don't work on empty line HOT 14
- How can I use upload decorations with this library? HOT 7
- Prosemirror editor UI HOT 5
- Support for using EditorView subclasses HOT 9
- Scroll into view is broken
- Using nodeView with ProseMirror component HOT 10
- React 18 Support HOT 2
- Error while using useProseMirror hook
- editorView.state is out of sync until rerender of ProseMirror has completed HOT 16
- Problem when using ProseMirror's node views HOT 11
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 use-prosemirror.