Edit HTML Action

The Edit HTML action copies the HTML content of an existing element, including any child elements, on the page and inserts it after the original selector. Then, the action hides the original element. This type of action allows you to make quick edits to any existing content on a page, such as a product description or heading. The action also appends included CSS styles in the <head> of the page.

While the Edit HTML action should keep any CSS styles from an ID or class intact, it may break JavaScript bindings on elements that you select. If you need to edit elements on the page that require the native JavaScript to remain intact, then use an Insert HTML action to take over the inner content while leaving the parent element with its bindings intact.

Required Components

Relative Element Selector

Enter the element selector into Relative Element Selector. This selector determines which HTML content the action copies and makes available for editing. For additional information on selectors, refer to the Element Selectors.

HTML

This code editor is populated within Action Builder when you select an element on the page. You can edit or alter the original content in any way within this code editor. The content is a duplicate of the original content but may not keep any JavaScript binding intact.

Optional Components

CSS Style

Monetate appends anything that you add in the CSS editor to a stylesheet in the <head> portion of your site within a <style> block. These styles are available on this page for use with any page element.

Select All Elements

The Select multiple elements, if matched? setting allows you to apply the action to the first occurrence of the relative element selector or to all occurrences of it, if multiple exist.

Select NO if you want the action to apply to the first occurrence. Select YES if you want the action to apply to all occurrences.

Re-Check for Elements

Use the Re-check for Elements toggle to enable or disable polling. If you enable polling, then Monetate continues to check for the selected element even if it does not initially appear on the page. This option is good if certain elements don't fire right when the page loads.

If you disable polling, then Monetate only checks for the element once when the page loads.