Here is early R&D, rule-by-rule. At a high level, matching by element text feels possible in a wide number of cases but not all. An alternative would be to change the rendering of Wagtail content on sites to contain field marks (repurposing comments’ contentpath
?)
- In rich text: Possible by relying either on Draftail block key, or text of rich text elements before/after.
- In Django fields: Impossible
- In StreamField: Impossible unless we introduced a special HeadingBlock as a CharBlock derivative as a CMS feature. For a project-specific HeadingBlock: at least likely to be a required field.
- In rich text: Possible by relying on Draftail block key, or heading text.
- In Django fields: Possible by text match.
- In StreamField: Possible by text match. Would be helped by a custom HeadingBlock.
- In rich text: Possible by relying on Draftail block key, or element text match.
- Everywhere: likely too hard to do reliably.
- TableBlock: likely possible via text match, or could output a block key in our table template
- TypedTableBlock: perhaps possible via text match, or could output a block key in our table template
- In rich text: Possible by relying on Draftail block key, or element text match.
- In Django fields: Possible by text match.
- In StreamField: Possible by text match.
- In rich text: Possible by relying on Draftail block key, or alt text / other attributes match
- In Django fields: Possible by alt text / other attributes match
- In StreamField: Possible by alt text / other attributes match