Hufe921 / canvas-editor

rich text editor by canvas/svg
https://hufe.club/canvas-editor-docs
MIT License
3.47k stars 506 forks source link

Can CommentList and render add to the Draw? #735

Closed justsxl closed 1 month ago

justsxl commented 1 month ago

What problem does this feature solve?

Now the commentList is in Main.ts, Can it be used as a property of Draw.ts and render in Draw?

What does the proposed API look like?

interface IComment { id: string content: string userName: string rangeText: string createdDate: string }

export interface IEditorData { header?: IElement[] main: IElement[] footer?: IElement[] comm?: IComment[] }

Hufe921 commented 1 month ago

The comment feature is only implemented using the internal API of the editor and is not related to the core layer of the editor. Just refer to the demo and implement it yourself