Hi there,
I am creating a plugin that when pressed, deletes the entire parent element the text is located in.
ie: <p>some text</p>
if the cursor was between "some" and "text", my plugin should delete the full <p>some text</p>
I have been searching for two hours how to select the surrounding <p> tags
and delete them
can you help?
I am creating a plugin that when pressed, deletes the entire parent element the text is located in.
ie: <p>some text</p>
if the cursor was between "some" and "text", my plugin should delete the full <p>some text</p>
I have been searching for two hours how to select the surrounding <p> tags
and delete them
can you help?