Kentico Xperience 13 documentation and ASP.NET Core

Most documentation about running Xperience applications under ASP.NET Core can be found in a dedicated section: Developing Xperience applications using ASP.NET Core. The rest of the documentation still applies, but some code samples and scenarios might need slight modifications for Core projects.

All major differences between the MVC 5 and Core platforms are summarized in Migrating to ASP.NET Core.


Using the Rich text widget

The Rich text widget is provided in Xperience by default. It allows content editors to add stylized text content to pages that use the page builder. The Rich text widget can be found only when editing pages in the Pages application on the Page tab.

Working with text in the Rich text widget

The toolbar of the Rich text widget is completely customizable with regards to its layout and functionality. It is possible that some functionality and buttons are not present in your project and the toolbar appearance is different than the screenshot on this page.

More editing options

The toolbar can be configured to include buttons that trigger an additional pop-up toolbar. Some functionality is therefore grouped under a single button. For example, subscript, superscript, text color, and other buttons are grouped under the More text button in the default implementation of the toolbar. Look for icons containing the More sign.

Inserting dynamic text

You can add personalized text to the widget by using the Dynamic text button. The following types of dynamic text are available:

URL parameter

This option allows you to customize the text based on the value of a URL parameter (the parameter must be present in the URL when the page is displayed).

  1. Click on the Dynamic text button and select the URL parameter tab.
  2. Fill in the form:
    • URL parameter – the value of this parameter will be used in place of the dynamic text.
    • Default text – if the URL parameter is not provided, this text will be displayed.
  3. Click Insert.

To see the result, navigate to the live site page and add a URL query string parameter to the URL of the page, for example:

Adding dynamic text based on a URL parameter

Contact attribute

This option allows you to include a personalized piece of text based on information about the current contact.

  1. Click on the Dynamic Text button and select the Contact attribute tab.
  2. Fill in the form:
    • Contact attribute – select a contact attribute that will be displayed (such as the email address, names, etc.).
    • Default text – if the information about the current visitor is unknown, this text will be displayed instead.

Adding dynamic text based on a contact attribute

Displaying HTML source code

You can view and edit the HTML code of the content displayed by the Rich text widget, by clicking the Code View button. The code view button is located under the More misc button in the default implementation of the toolbar. To close the code view, click the code view button on the right side of the widget.

Be aware that any erroneous changes will result in invalid HTML in the output of the widget.

Editing the HTML source of the Rich text widget

To insert links to the content of the widget, click the Insert Link button. You can either direcly paste a URL to an external resource or you can click the Select button and use one of the following options:

  • Pages – link to a page within the site's content tree.
  • Media – link to a media file located in one of the site's media libraries.
  • Attachments – link to a file attached to the page.

To remove the currently selected file or page from the selector, click the Clear button.

Adding a link

Was this page helpful?