Skip to main content
AI/MLCrestApps

orchardcore-html

Skill for using HtmlBodyPart in Orchard Core. Covers HTML content editing, shape templates for Liquid and Razor, custom editor configurations, HTML sanitization, Trumbowyg and Monaco editors, and display/editor shape types. Use this skill when requests mention Orchard Core HTML Body, Use HtmlBodyPart for Rich Content Editing, Enabling HTML Body, Attaching HtmlBodyPart to a Content Type, Shapes, HtmlBodyPartViewModel Properties, or closely related Orchard Core implementation, setup, extension, or troubleshooting work. Strong matches include work with OrchardCore.Html, OrchardCore.Html.ViewModels, HtmlBodyPart, DataMigration, IContentDefinitionManager, WithPart, TitlePart, TypePartSettings, HtmlBodyPartSettings, ContentDefinition, ContentTypeSettings, ContentTypePartSettings. It also helps with Shapes, HtmlBodyPartViewModel Properties, HtmlBodyPart Properties, plus the code patterns, admin flows, recipe steps, and referenced examples captured in this skill.

Stars
13
Source
CrestApps/CrestApps.AgentSkills
Updated
2026-05-29
Slug
CrestApps--CrestApps.AgentSkills--orchardcore-html
View on GitHubRaw SKILL.md

// install — copy + paste into any project

mkdir -p .claude/skills && curl -fsSL https://raw.githubusercontent.com/CrestApps/CrestApps.AgentSkills/HEAD/plugins/orchardcore/skills/orchardcore-html/SKILL.md -o .claude/skills/orchardcore-html.md

Drops the SKILL.md into .claude/skills/orchardcore-html.md. Works with Claude Code, Cursor, and any agent that loads SKILL.md files from .claude/skills/.

Orchard Core HTML Body

Enable OrchardCore.Html and attach HtmlBodyPart to a content type. The part stores its source in HtmlBodyPart.Html; it has no Body property.

await _contentDefinitionManager.AlterTypeDefinitionAsync("Article", type => type
    .Creatable()
    .WithPart("TitlePart", part => part.WithPosition("0"))
    .WithPart("HtmlBodyPart", part => part
        .WithPosition("1")
        .WithEditor("Wysiwyg")));

HtmlBodyPartViewModel exposes Html, ContentItem, HtmlBodyPart, and TypePartDefinition. It does not expose Body or TypePartSettings. Display rendering starts with the part HTML, optionally renders Liquid, and then processes shortcodes.

<article>
  {{ Model.Html | raw }}
</article>
@model OrchardCore.Html.ViewModels.HtmlBodyPartViewModel
<article>@Html.Raw(Model.Html)</article>

The part settings control sanitization, Liquid rendering, and editor choices. Use the built-in default, Trumbowyg WYSIWYG, or Monaco editor according to the enabled editor features and settings. Avoid relying on undocumented custom editor shape names; inspect the available editor shapes in the target version.

All HTML is sanitized when SanitizeHtml is enabled. If Liquid is also rendered, validate it after choosing the sanitization policy because sanitization can change Liquid markup.