nyrodev / utility-bundle
Utility Bundle for Symfony, provide many shortcut and useful functionnalities
Installs: 3 389
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 2
Open Issues: 0
Language:JavaScript
Type:symfony-bundle
Requires
Suggests
- becklyn/ordered-form-bundle: Used for form positionning
- doctrine/doctrine-cache-bundle: Required to cache EmbedService result
- embed/embed: Required to use EmbedService
- sabberworm/php-css-parser: Required to use rem2px command
- slim/psr7: Required to use EmbedService, or any other PS7 implementation
- dev-master
- 6.x-dev
- v6.2
- v6.1
- v6.0
- 5.x-dev
- v5.6
- v5.5
- v5.4
- v5.3
- v5.2
- v5.1
- v5.0
- 4.x-dev
- v4.16
- v4.15
- v4.14
- v4.13
- v4.12
- v4.11
- v4.10
- v4.9
- v4.8
- v4.7
- v4.6
- v4.5
- v4.4
- v4.3
- v4.2
- v4.1
- 2.8.x-dev
- v2.8.18
- 2.8.17
- v2.8.16
- v2.8.15
- v2.8.14
- v2.8.13
- v2.8.12
- v2.8.11
- v2.8.10
- v2.8.9
- v2.8.8
- v2.8.7
- v2.8.6
- v2.8.5
- v2.8.4
- v2.8.3
- v2.8.2
- v2.8.1
- v2.8.0
- 1.0.0
- dev-dev
This package is auto-updated.
Last update: 2024-12-14 17:07:44 UTC
README
Using TinymceType
Add tinymce to your dependancies:
composer require tinymce/tinymce
Add tinymce depency your webpack encore config:
.addPlugin(new CopyWebpackPlugin({ patterns: [ {from: 'vendor/tinymce/tinymce', to: '../tinymce'} ] }))
Translate Tinymce
Require tinymce npm dependancy:
npm i tinymce-i18n
Then copy the language file you need by adding to your webpack encore config:
.addPlugin(new CopyWebpackPlugin({ patterns: [ {from: 'vendor/tinymce/tinymce', to: '../tinymce'}, {from: 'node_modules/tinymce-i18n/langs7/fr_FR.js', to: '../tinymce/langs/'}, { from: 'node_modules/tinymce-i18n/langs7/fr_FR.js', to: '../tinymce/langs/fr.js', transform: (input, filename) => { return input.toString().replace('tinymce.addI18n("fr_FR", {', 'tinymce.addI18n("fr", {'); } } ] }))
Using tinymce browser feature
Add JS and CSS generation to your webpack encore config:
.addEntry('css/admin/tinyBrowser', './vendor/nyrodev/utility-bundle/Resources/public/css/tinyBrowser/index.css') .addEntry('js/admin/tinyBrowser', './vendor/nyrodev/utility-bundle/Resources/public/js/tinyBrowser/index.js')
Add tinymce plugins depency your webpack encore config:
.addPlugin(new CopyWebpackPlugin({ patterns: [ {from: 'vendor/tinymce/tinymce', to: '../tinymce'}, {from: 'vendor/nyrodev/utility-bundle/Resources/public/js/filemanager', to: '../tinymce/plugins/filemanager'}, {from: 'node_modules/tinymce-i18n/langs7/fr_FR.js', to: '../tinymce/langs/'}, { from: 'node_modules/tinymce-i18n/langs7/fr_FR.js', to: '../tinymce/langs/fr.js', transform: (input, filename) => { return input.toString().replace('tinymce.addI18n("fr_FR", {', 'tinymce.addI18n("fr", {'); } } ] }))
Create a route for the browser page, in config/routes/browser.yaml
:
Be sure to protect this route behind a security firewall!
tiny_browser: path: "%adminPrefix%/tinyBrowser/{type}/{dir}" controller: NyroDev\UtilityBundle\Controller\TinymceController::browserAction defaults: dir: null requirements: dir: '.+'