Skip to content

[Q] Remove some element from selected element #696

Answered by ziflex
fer-ri asked this question in Q&A
Discussion options

You must be logged in to vote

Hey,

There is no direct API that would allow doing so, but you can use the SET_INNER_HTML function to override the content.
The query would be:

LET content = ELEMENT(doc, 'article.main-content')
LET strippedHTML = REGEX_REPLACE(stripped.innerHTML,  expression, "")

SET_INNER_HTML(content, strippedHTML)

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@fer-ri
Comment options

Answer selected by fer-ri
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #695 on November 08, 2021 19:27.