def METHOD_NAME(self, type, url):
    if type == QTextDocument.HtmlResource:
        return util.Formatter().html(url.path())
    elif type == QTextDocument.ImageResource:
        url = QUrl.fromLocalFile(os.path.join(__path__[0], url.path()))
    return super().METHOD_NAME(type, url)