Closed emteknetnz closed 2 months ago
The $c
and $h
set are irrelevant - you can reproduce this with just the $c2
and $h2
set.
The problem is that you're just modifying the config that is pre-defined for that field. That means you're actually modifying the configuration instead of creating a new one, and that configuration is modified for all fields that use it.
This change fixes the above scenario:
+ use SilverStripe\Forms\HTMLEditor\HTMLEditorConfig;
// ....
- $c2 = $h2->getEditorConfig();
+ $c2 = HTMLEditorConfig::get('a-new-config');
Working as expected. Closing.
When using two HTMLEditorFields with different configs, they will both use the same config as the last one that was set
You can test this by using the code below and attempting to insert a table via the table button in the wysiwyg editor, or by adding bullet points
I feel like I've come across the before and the issue was that only a single TinyMCE.dynamic.js style file is dynamically generated