Try our conversational search powered by Generative AI!

TinyMce configuration not applied to block in page model

Fixed in

EPiServer.CMS.TinyMce 2.4.0

Created

May 23, 2018

Updated

Jun 27, 2018

Area

CMS UI

State

Closed, Fixed and tested


Description

Steps to reproduce

1. Install an empty Alloy site.
2. Set up a block and page:

public class ProductPage
{
   ...
   [Display(Name = "Test Block", Order = 45)]
    public virtual TeaserBlock TestBlock { get; set; }
}
public class TeaserBlock
{
   ...
   [CultureSpecific]
   [Display(
GroupName = SystemTabNames.Content,
Order = 5)]
  public virtual XhtmlString TestXhtmlString { get; set; }
}

3. Set up the TinyMce configuration:

config.Default()
.BlockFormats("Header1=h1")
.ContentCss("/Assets/css/editor.css");
 
config.For<TeaserBlock>(t => t.TestXhtmlString)
.BlockFormats("Header1=h1;Header2=h2")
.ContentCss("/Assets/css/editor.css");

4. Go to "Alloy Plan" page -> "Content" tab and observer the format option of TestXhtmlString.

Expected: Shows 2 formats: h1 and h2

Actual: Only shows 1 format, h1