Placeholder in ASP.NET MVC Rich Text Editor Control

4 Mar 20251 minute to read

Specifies the placeholder for the Rich Text Editor’s content used when the editor’s content area is empty through the Placeholder property.

You can customize the appearance of the placeholder text by targeting the e-rte-placeholder class in your CSS. This allows you to modify properties such as font family, color, and other styles.

.e-richtexteditor .e-rte-placeholder {
    font-family: monospace;
}

The below sample demonstrates the Placeholder option in Rich Text Editor.

@Html.EJS().RichTextEditor("placeholder").Placeholder("Type something").Render()
<style>
    .e-richtexteditor .rte-placeholder {
        font-family: monospace;
    }
</style>
public class HomeController : Controller
    {

        public ActionResult Index()
        {
            return View();
        }
    }

See Also