What is the right Adapter Definition for Plone Outputfilter?

Hi,
Following Problem:
If a static Portlet on the Site, the Filter is also present "in" the Portlet, what should i do when i want only aply the filter in the HTML-Text of Document, not of Portlet. Is there a restriction in the 'for' Attribute of Adapter Definition?

i register an adapter for a custom outputfilter in configure.zcml:

<adapter
        for="plone.app.contenttypes.interfaces.IDocument zope.publisher.interfaces.browser.IBrowserRequest"
        name="wikifilter"
        provides="plone.outputfilters.interfaces.IFilter"
        factory="plonetheme.lexikon.browser.filters.Wikifilter" />

My Filter:

# -*- coding: utf-8 -*-
from zope.interface import implementer
from plone.outputfilters.interfaces import IFilter
import logging

logger=logging.getLogger("lexikon")

@implementer(IFilter)
class Wikifilter(object):
    
    order = 2000

    def __init__(self, context, request):
        self.context = context
        pass

    def is_enabled(self):
        return True

    def __call__(self, data):
        
        logger.info("Wikifilter %s", self.context)
        logger.info("Wikifilter %s", data)
        
        return data

As I understand output filters (my understanding is likely partial), they operate on whole responses, not individual parts of them. This implies that an output filter registered for "Document"s applies whenever you view a "Document" and operates on the main "Document" content as well as all the rest (navigation, portlets, ...). When you must restrict the transformation to a part of the response, do it in your filter, i.e. you locate the relevant part[s] and transform only therein.

Hmm, i can modify the HTML Text in an extra BrowserView, I thought that the outpufilters are the better option. My aim is, to render all possible Terms with a Link to Contentsites which Title contains the Term. But i have no Experience with the Runtime and the Performance. Perhaps, i do this with a Eventhandler or a "CronJob", if the Performance of On-The-Fly-Rendering are bad. I would reporting the results.

IIRC the RichText cookedBody is transformed and then cached on Document content objects until the next edit of that document. So if you're able to hook into that cooking mechanism you'd have an elegant and performant solution.

Is cookedBody available in Plone 5 with DX? I thought it was an old AT Property.

plone.outputfilters are perfectly fine for this task.

First try to register the filter 'for='* *' and see if it gets called.

perfomance: By default a result gets cached in RAM by PortalTransforms for 3600 secs using the modified date of the content as cache key.

I have to do this at first time like described in the docs, but i don't want to transform the output of the Static Portlet which is on the same site. But my Filter is running also in the Static Portlet with the Definition 'for='* *''

Ok, Should i register my own Outputfilter with a Name e.g. 'text/x-wiki-safe' via setuphandlers? Is this necessary? I could imagine, that this step is also needed. Later in my BrowserView i can do this:

@property
def wikitext(self):
    portal_transforms = api.portal.get_tool(name='portal_transforms')
    datastream = portal_transforms.convertTo('text/x-wiki-safe', self.context.text.output, mimetype='text/html')
    return datastream.getData()