-
Notifications
You must be signed in to change notification settings - Fork 0
Unify the edit/hyperlight/hypercite/footnotes systems from main-content with hyperlit-container #270
Description
i am beggining to plan a major structural upgrate to the system,
involving both back and front end. on front end, it concerns
@resources/js/hyperlitContainer/ and, specifically, in regards to
@resources/js/footnotes/ and @resources/js/hyperlights/ currently,
footnotes and hyperlights have "annotations" which are stored in the
footnotes and hyperlights tables... in footnotes there is a content
column, in hyperlights there is an annotatoin column. this makes
pullling teh content for hyperlit container to display when clicking a
footnote or mark tag really simple and straight forwared. however, it
means having a seperate contenteditable editor... via i think
@resources/js/hyperlitContainer/noteListener.js this works entirely
differently to @resources/js/divEditor/ and, as a result, nothing in
either footnotes or hyperlights annotations can be highlighted or
hypercited... my idea is to, therefore, upgrate this system. It is to
move to a system where the content/annotations for hyperlights and
footnotes do store teh first couple nodes to their own tables... but,
these reference, primarily, nodes in the actual nodes table. this means
treating each hyperlight annotation and footnote content as books...
they literaly get a book id like the main book they are attached to.
thereby, a highlight x in book TheBible will get book = TheBible/x so,
if user goes to url.com/TheBible/x (as opposed to TheBible#x) it would
display the highlight annotation as a book... type thing. it IS a book.
the idea then of the hyperlights/footnotes tables is, when pulling
these, they will already have the first couple nodes in these cells...
the rest only get pulled if user, in the hyperlit-container, clicks to
expand hyperlight/footnote content, then it pulls rest of nodes from
the nodes table, and the libary card, and everything else, to local
indexeedDB, just as if its a normal book... this requires, therefore,
that the hyperlit-container be updated, and likewise the
@resources/js/editToolbar/ and @resources/js/divEditor/ be updated,
such that when writing/editing/reading annotations and notes in the
hyperlit-container, it functions exactly like doing so in main-content,
but just updating the book "/TheBible/x"... so the diveditor,
essentially, and edit-toolbar, can interract with different divs, or
even main-content classes, in the same page. this will allow, once
complete, users to hyperlight, hypercite, etc, annotations and notes,
as these are just text nodes like any in main-content... this requires
systemic research into each of these sub-systems, to ensure they are
properly modularised and therefore can be switched without actions
affecting one book in page affect accidnetally others...