ws-replace
The attribute ws-replace creates a Doc or seq hole. The element on which this attribute is set will be replaced with the provided Doc(s). The name of the hole is the value of the ws-replace attribute.
ws-hole
The attribute ws-hole creates a Doc or seq hole. The element on which this attribute is set will have its contents replaced with the provided Doc(s). The name of the hole is the value of the ws-hole attribute.
Can you help me clearly distinguish these two concepts?
ws-replacereplaces the entire element, whilews-holejust replaces the contents. Look at the examples in the documentation you linked to. Notice how withws-replace, the<div>element disappears and is completely replaced by the "Welcome" paragraph. Whereas withws-hole, the<div>element is still there, wrapped around the "Welcome" paragraph.Using
ws-replacebecomes:
Using
ws-holebecomes: