HTML Rich-text editor element based on Web Components, WebCell v2 & Quill.
import { documentReady, render, createCell } from 'web-cell';
import { QuillCellProps, QuillCell } from 'quill-cell';
const upload: QuillCellProps['upload'] = async file => {
const response = await fetch('/file', {
method: 'POST',
body: file
});
const { path } = await response.json();
return path;
};
documentReady.then(() =>
render(
<QuillCell name="content" upload={upload}>
Operate after selecting
</QuillCell>
)
);