mirror of
https://github.com/laurent22/joplin.git
synced 2024-12-27 10:32:58 +02:00
13 lines
387 B
TypeScript
13 lines
387 B
TypeScript
import { useEffect } from 'react';
|
|
import PlatformImplementation from '../../../services/plugins/PlatformImplementation';
|
|
|
|
export default function usePluginServiceRegistration(ref: any) {
|
|
useEffect(() => {
|
|
PlatformImplementation.instance().registerComponent('textEditor', ref);
|
|
|
|
return () => {
|
|
PlatformImplementation.instance().unregisterComponent('textEditor');
|
|
};
|
|
}, []);
|
|
}
|