lead-ext / wysiwyg-editor-plugin
WYSIWYG editor for Sylius.
Package info
github.com/Lead-Ext/LeadExtWysiwygEditorPlugin
Type:sylius-bundle
pkg:composer/lead-ext/wysiwyg-editor-plugin
dev-master
2017-06-07 19:15 UTC
Requires
- php: ^7.1
- sylius/sylius: dev-master
This package is not auto-updated.
Last update: 2026-03-01 10:52:53 UTC
README
WYSIWYG editor for Sylius.
By default plugin adds text editor for product's description and short description.
Usage:
-
Install bundle:
$ composer.phar require lead-ext/wysiwyg-editor-plugin
-
Add bundle to
AppKernel.php:new LeadExt\WysiwygEditorPlugin\LeadExtWysiwygEditorPlugin(),
-
Configure bundle in
app/config/config.yml:lead_ext_wysiwyg_editor: api_key: 'your_api_key' #please read official web site for more information https://www.tinymce.com/
-
Add init script for WYSIWYG editor on a page with desired options:
{{ wysiwyg_init({ browser_spellcheck: true, branding: false, elementpath: false, statusbar: false, menubar: false, language: app.request.locale })}}Please check official documentation for all available options: https://www.tinymce.com/docs/
-
Use
TextWysiwygTypeform type for your field:public function buildForm(FormBuilderInterface $builder, array $options) { $builder ->add('text', TextWysiwygType::class, [ 'required' => false, ]) }
Manual steps:
- add
rawfilter for rendered fields. F.e.{{ product.shortDescription|raw }}