Last active
August 16, 2017 15:26
-
-
Save mattiasnorell/0daf1d851358ecb01f8c to your computer and use it in GitHub Desktop.
Remove all buttons from a EPiServer CMS 7 XHTML / TinyMCE editor and add only the buttons you want to use.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using EPiServer.Core; | |
using EPiServer.DataAnnotations; | |
using EPiServer.Shell.ObjectEditing; | |
using Site.EPiServerAdmin.Attributes; | |
using Site.EPiServerAdmin.Constants; | |
using System.ComponentModel.DataAnnotations; | |
namespace Site.Models.Blocks | |
{ | |
[DefaultContentType( | |
DisplayName = "Testblock", | |
Description = "A block used to test things.", | |
GUID = "226F3E63-4DB5-4546-AFFA-B9C4A9C6BAC6")] | |
[DefaultImageUrl] | |
public class TestBlockModel:BlockData | |
{ | |
[EditorButtons(new[] { "bold" })] | |
[Display(Name = "Main contents", GroupName = GroupNames.Default)] | |
public virtual XhtmlString MainBody { get; set; } | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Doesn't appear to work with newer versions of EPiserver (CMS 10+). It just rendered an empty readonly text area for me.