Closed tmedwards closed 4 years ago
How exactly would the Typing processor handle HTML elements embedded within the 'text content'?
It types them out. Specifically:
By "text" in the above I mean anything with a .nodeValue
—e.g., text nodes, comments, CDATA sections.
Because it uses the original nodes, no handlers or anything else should be lost, so even interactive content should survive processing. Tested with the link markup, <<link>>
macros, and a few other things.
Additionally. There's some handling of special cases, like nodes that have been set to display: none;
, which are simply zipped through without delay.
EDIT: Minor clarification.
And what about styling related markup/elements? (bold, colour, etc...)
Elements are nodes, so they get typed out per my last reply. Well, they get appended to their original parent and their text content, if any, is typed out.
Add a teletype/typewriter macro that handles most content, rather than being limited to strings—e.g., as Typed.js is. Invocations within the same passage should coordinate—i.e., they should be processed in order of appearance, rather than all attempting to type at once.
The prototype would be something like:
E.g.,
EDIT: Updated prototype and examples: