Comments (2)
好吧,我依靠示例自己封装了个组件,大家也自己封装吧,
from document-editor-react.
Hi likedream11, you can pass event to config like so:
var onRequestUsers = function (event) {
var editor = window.DocEditor.instances[args.id];
editor.setUsers({
"c": event.data.c,
"users": [
{
"email": "[email protected]",
"id": "78e1e841",
"name": "John Smith"
},
{
"email": "[email protected]",
"id": "F89d8069ba2b",
"name": "Kate Cage"
}
]
});
};
<DocumentEditor
config={{
events: {
onRequestUsers: onRequestUsers
}
}}
/>
</div>
)}
Detailed documentation on this method you can find here (https://api.onlyoffice.com/editors/config/events#onRequestUsers)
from document-editor-react.
Related Issues (10)
- Error occurs when I introduce dependency HOT 4
- DocsAPI is not defined HOT 3
- Great project! How to insert characters to the Word document cursor position it
- How to use "events_onRequestHistory" HOT 1
- How to add plugins ? HOT 1
- How do I display the Close button in the top right corner HOT 1
- Is there any way to track the current page being viewed?
- 我接入document-editor-react后,工程报错 HOT 2
- Remove jsonwebtoken package HOT 1
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 document-editor-react.