Open mviraghu opened 4 months ago
Hi, can you update the class StfalconTinymceExtension Twig Extension with the following code, please... This can work with Symfony 6 too.
use Environment
use Twig\Environment;
Insert 'needs_environment' => true
public function getFunctions(): array { return [ 'tinymce_init' => new TwigFunction( 'tinymce_init', [$this, 'tinymceInit'], ['needs_environment' => true, 'is_safe' => ['html']] ), ]; }
Environment $environment as param return $environment->render ...
public function tinymceInit(Environment $environment, $options = []): string { CODE BEFORE return $environment->render( '@StfalconTinymce/Script/init.html.twig', [ 'tinymce_config' => $tinymceConfiguration, 'include_jquery' => $config['include_jquery'], 'tinymce_jquery' => $config['tinymce_jquery'], 'asset_package_name' => $assetPackageName, 'base_url' => $this->baseUrl, ] ); }
Hi, can you update the class StfalconTinymceExtension Twig Extension with the following code, please... This can work with Symfony 6 too.
use Environment
Insert 'needs_environment' => true
Environment $environment as param return $environment->render ...