public function htmlAction(Request $request, $teaserId)
    {
        $requestStack = $this->get('request_stack');
        $masterRequest = $requestStack->getMasterRequest();

        if ($request->get('preview') || $request->get('_preview')) {
            $request->attributes->set('_preview', true);
        } elseif ($masterRequest !== $request && $masterRequest->attributes->get('_preview')) {
            $request->attributes->set('_preview', true);
        }

        $teaser = $this->get('phlexible_teaser.teaser_service')->find($teaserId);

        $request->attributes->set('contentDocument', $teaser);

        $renderConfigurator = $this->get('phlexible_element_renderer.configurator');
        $renderConfig = $renderConfigurator->configure($request);

        if ($renderConfig->getResponse()) {
            return $renderConfig->getResponse();
        }

        if ($request->get('template')) {
            $renderConfig->set('template', $request->get('template', 'teaser'));
        }

        $data = $renderConfig->getVariables();

        return $this->render($data['template'], (array) $data);
    }