Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Just a little snippet for Tom
F.visibleTextFragments.push(newFragment);
let text = `<p>`;
if (F.visibleTextFragments.length > 0) {
let visibleText = F.visibleTextFragments.reduce(function(visibleFragments, thisFragment) {
return visibleFragments + thisFragment;
});
text += `<span class="visible">${visibleText}</span>`;
}
if (F.invisibleTextFragments.length > 0) {
let invisibleText = F.invisibleTextFragments.reduce(function(invisibleFragments, thisFragment) {
return invisibleFragments + thisFragment;
});
text += `<span class="invisible">${invisibleText}</span>`;
}
text += `</p>`;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.