Hi Jason,
I'm guessing you're applying that configuration within the ConfigureContainer method of an IConfigurableModule? Have you specified a dependency on TinyMceInitialization with a [ModuleDependency(typeof(TinyMceInitialization))] like this?
[ModuleDependency(typeof(TinyMceInitialization))]
public class CustomizedTinyMceInitialization : IConfigurableModule
{
public void Initialize(InitializationEngine context)
{
}
public void Uninitialize(InitializationEngine context)
{
}
public void ConfigureContainer(ServiceConfigurationContext context)
{
context.Services.Configure<TinyMceConfiguration>(config =>
{
config.Default()
.AddEpiserverSupport()
.Toolbar("formatselect cut copy paste")
.BlockFormats("paragraph=p;")
.Height(300)
.Width(580);
});
}
}
Without that dependency your IConfigurableModule would most likely execute before the default TinyMCE initialisation so your settings would be overridden by the defaults.
Hi Paul
Thanks for responding, yes the configuration is within a ConfigureContainer method of an IConfigurableModule and the ModuleDependency is set correctly.
The strange thing is that the .BlockFormats are applied as expected but not the toolbar, and the toolbar changes are applied correctly to a specific page type and property but not globally.
Hi Jason,
My guess is that TinyMCE is being configured somewhere else in another IConfigurable module with the settings from screenshot n°1.
I'm working with Jason on this project and found the issue.
We're using ImageVault and found that we needed to have a module dependency of [ModuleDependency(typeof(ImageVaultTinyMceModule))] rather than of [ModuleDependency(typeof(TinyMceInitialization))] which was overriding our custom settings.
Changing this resolved the issue and our custom settings were then applied as expected.
Epi 11 TinyMCE v2
Hi I'm having an issue configuring the default toolbar for TinyMCE, using the simplified example below the formatselect dropdown is applied OK but the toolbar still contains the default buttons/options
config.Default()
.AddEpiserverSupport()
.Toolbar("formatselect cut copy paste")
.BlockFormats("paragraph=p;")
.Height(300)
.Width(580);
If I apply the same settings to a specific page and property it's renders as expected
config.For<StandardPage>(t => t.MainBodyContent, config.Empty())
.AddEpiserverSupport()
.Toolbar("formatselect cut copy paste")
.BlockFormats("paragraph=p;")
.Height(300)
.Width(580);
I can't see what I'm doing wrong for the default setting which I need to apply globally
Thanks,
Jason