diff --git a/www/content/attributes/hx-swap-oob.md b/www/content/attributes/hx-swap-oob.md index e50d31d01..be59f0014 100644 --- a/www/content/attributes/hx-swap-oob.md +++ b/www/content/attributes/hx-swap-oob.md @@ -27,14 +27,50 @@ The value of the `hx-swap-oob` can be: If the value is `true` or `outerHTML` (which are equivalent) the element will be swapped inline. -If a swap value is given, that swap strategy will be used. +If a swap value is given, that swap strategy will be used and the encapsulating tag pair will be stripped for all strategies other than `outerHTML`. If a selector is given, all elements matched by that selector will be swapped. If not, the element with an ID matching the new content will be swapped. -### Troublesome Tables +### Using alternate swap strategies + +As mentioned previously when using swap strategies other than `true` or `outerHTML` the encapsulating tags are stripped, as such you need to excapsulate the returned data with the correct tags for the context. + +When trying to insert a `` in a table that uses ``: +```html + + + ... + + +``` + +A "plain" table: +```html + + + ... + +
+``` + +A `
  • ` may be encapsulated in `