Skip to content
Go to file
Removed a deprecated method from a custom tiny mce initialization class
and replaced it with a new method AddEpiServerSupport.
4 contributors

Users who have contributed to this file

@seriema @gregwiechec @ben-mckernan @barteksekula
43 lines (38 sloc) 1.6 KB
using AlloyTemplates.Models.Blocks;
using AlloyTemplates.Models.Pages;
using EPiServer.Cms.TinyMce.Core;
using EPiServer.Framework;
using EPiServer.Framework.Initialization;
using EPiServer.ServiceLocation;
namespace AlloyTemplates.Business.Initialization
public class ExtendedTinyMceInitialization : IConfigurableModule
public void Initialize(InitializationEngine context)
public void Uninitialize(InitializationEngine context)
public void ConfigureContainer(ServiceConfigurationContext context)
context.Services.Configure<TinyMceConfiguration>(config =>
// Add content CSS to the default settings.
// This will clone the default settings object and extend it by
// limiting the block formats for the MainBody property of an ArticlePage.
config.For<ArticlePage>(t => t.MainBody)
.BlockFormats("Paragraph=p;Header 1=h1;Header 2=h2;Header 3=h3");
// Passing a second argument to For<> will clone the given settings object
// instead of the default one and extend it with some basic toolbar commands.
config.For<EditorialBlock>(t => t.MainBody, config.Empty())
.Toolbar("bold italic underline strikethrough");
You can’t perform that action at this time.