Hufe921 / canvas-editor

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

Add footnote #747

Open LovaVikasso opened 1 month ago

LovaVikasso commented 1 month ago

What problem does this feature solve?

Adds footnotes for supplementary information with automatic numbering and interactive scrolling for easy navigation between references and footnotes footnotes

What does the proposed API look like?

Footnote Insertion: Allow users to insert footnotes at any point in the document. Each footnote will be automatically numbered or labeled with a symbol.

Automatic Numbering: Footnotes will be automatically numbered sequentially, and the numbering will update if footnotes are added or removed.

Footnote Display: Footnotes will be displayed at the bottom of the page or section where they are referenced, with a line separating the main content from the footnotes.

Editable Footnotes: Users can edit the text of footnotes, which will be updated automatically in all references throughout the document.

Formatting Options: Provide basic formatting options for footnotes, including font size and style adjustments.

Interactive Scrolling: Implement interactive scrolling for footnotes:

Click on Footnote Number: When a user clicks on a footnote number in the main text, the view will automatically scroll to the corresponding footnote text at the bottom of the page or section. Click on Footnote Text: Conversely, when a user clicks on a footnote text at the bottom of the page or section, the view will scroll to the location in the main content where the footnote was referenced.