hyTags
HomeHome DocumentationDocumentation

selection-replace

Replaces the selected element with a fragment.
Parameter
Type
Description
fragment
Fragment
Fragment to replace the element with
return
void
Void
Test Case:Replace element with fragment
    <div></div>
    
    <fragment-from-string value="<span>replacement</span>">
    <selection-replace></selection-replace>
    
    👆 Try to change something!
  • Test succeeded Test failed