Closed hostingermanagerweb closed 1 month ago
hello @hostingermanagerweb , here u are a quick helpful code for u in react,
const Editor = () => {
const getImgDataRef = useRef();
const getImgData = () => {
if (typeof getImgDataRef.current === 'function') {
const fnOptionsIfNeededFoundInDocs= {}
const imgData = getImgDataRef.current(fnOptionsIfNeededFoundInDocs);
console.log(imgData);
}
};
return (
<div>
<FilerbootImageEditor
getCurrentImgDataFnRef={getImgDataRef}
// ...yourOtherConfigurations
/>
<button onClick={getImgData}>Your custom button</button>
</div>
)
}
I'm trying to create a button to get the data outside the default button but I don't know how to use the getCurrentImgDataFnRef property, can you help me?