-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Impossible to customize Toolbar #207
Comments
It is a bug actually. I solved this by specifying a toolbar under form's type_options.config.toolbar. Not a clean solution though, since the rest of my config is in fos_ck_editor.yaml. |
I'm bitten by the exact same bug too. @proArtex , any chance you can elaborate on what you did please ? |
Well, this is not a bug, it's just us being too dumb or not awaken enough... Here's what works : $builder->add('description', CKEditorType::class,
['config' => ['toolbar' => 'my_custom_toolbar'] ]); fos_ck_editor:
default_config: default
configs:
default:
toolbar:
# whatever here
toolbars:
configs:
my_custom_toolbar: [
'@standard.clipboard',
'@standard.editing',
['Table', 'HorizontalRule', 'SpecialChar'],
'@standard.tools',
'@standard.document',
'@standard.basic_styles',
'@standard.paragraph',
'@standard.about',
] So the toolbars node must not be under configs, but at the same level. Almost three year later, we can now close this "bug" I think... 🙂 |
$formMapper I am not able to make it works, no toolbar displayed Thank you very much |
Symfony packages
"php": "^7.1.3", "ext-ctype": "*", "ext-iconv": "*", "friendsofsymfony/ckeditor-bundle": "^2.1", "sensio/framework-extra-bundle": "^5.1","symfony/asset": "4.4.*", "symfony/console": "4.4.*", "symfony/dotenv": "4.4.*", "symfony/expression-language": "4.4.*", "symfony/flex": "^1.3.1", "symfony/form": "4.4.*", "symfony/framework-bundle": "4.4.*", "symfony/http-client": "4.4.*", "symfony/intl": "4.4.*", "symfony/mailer": "4.4.*", "symfony/monolog-bundle": "^3.1", "symfony/orm-pack": "*", "symfony/process": "4.4.*", "symfony/security-bundle": "4.4.*", "symfony/serializer-pack": "*", "symfony/translation": "4.4.*", "symfony/twig-pack": "*", "symfony/validator": "4.4.*", "symfony/web-link": "4.4.*", "symfony/webpack-encore-bundle": "^1.7", "symfony/yaml": "4.4.*"
Subject
Impossible to customize the toolbar
Here my fos_ckeditor.yaml
fos_ck_editor: configs: my_config_1: toolbar: "my_toolbar_1" uiColor: "#e2e2e2" toolbars: configs: my_toolbar_1: [ "@document", "/", "@link" ] items: document: ["Source", "-", "Save"] links: ["Link", "-", "Unlink"]
Actual results
Undefined index my_toolbar_1
The text was updated successfully, but these errors were encountered: