Wagtail rich text block better revision diffing

21 Views Asked by At

Its possible to override how Wagtail compare page changes? Now its converting html to flat text but I want a better view when diffing.

This is how wagtail do the diffing between texts:

class RichTextFieldComparison(TextFieldComparison):
    def htmldiff(self):
        return diff_text(
            text_from_html(self.val_a), text_from_html(self.val_b)
        ).to_html()


register_comparison_class(RichTextField, comparison_class=RichTextFieldComparison)
0

There are 0 best solutions below