Suppose I have the following markup:
<html> <head> <title>Page Title</title> </head> <body> <h1>Some title</h1> <p>First paragraph</p> <p>Second paragraph</p> </body> <html>
I need to note some parts of the text, namely the "first paragraph of seconds", It will look something like this:
<html> <head> <title>Page Title</title> </head> <body> <h1>Some title</h1> <p>F <mark> irst paragraph</p><p>Secon </mark> d paragraph</p> </body> <html>
But the problem is that the html markup will be broken. The more complex the markup, the more problems this approach will have.
Question:
Looking for ideas on how I can take the first HTML example and apply a function to return an html structure, where the "first paragraph of the second" is specially marked somehow.
I currently have:
- parent container of the first paragraph line
- text "first paragraph second"
- first text offset in the first paragraph
source share