IMPORTANT: This version of Sitefinity CMS is out of support and the respective product documentation is no longer maintained and can be outdated. Use the version selector to view a supported product version.
Feather's sf-code-area directive marks a text area as a code section and sets its attributes. You use the directive on top of your widget or designer view, so that custom widget code is displayed and styled in a specific way, for example, in the widget designer.
The sf-code-area directive is based on the CodeMirror text editor for code, version 2.18. For more information, see the official website of CodeMirror.
@using Telerik.Sitefinity.Frontend.Mvc.Helpers;
@Html.CodeMirrorScriptReferences()
You use the sf-area-code directive on top of the <textarea> element. The sf-area-code directive exposes the following attributes:
Specific property, to which to bind the code section contents. It is a property of the widget model, which is serialized in the widget designer JavaScript code. For example:
Following is an example how to add the sf-area-code directive in the JavaScript code of the widget designer view of an Embed code widget. For more information, see Feather: Embed code widget.
Add the directive and its attributes in the widget designer view of the Embed code widget:
Back To Top
To submit feedback, please update your cookie settings and allow the usage of Functional cookies.
Your feedback about this content is important