Privacy policy. Thank you. Microsoft makes no warranties, express or implied, with respect to the information provided here. This control enables properties of the HTML content to be edited. The properties and settings established in this class control how the editing surface, buttons, and other user interface UI elements behave when users edit the HTML.
Constructors HtmlEditor Initializes a new default instance of this control. Gets or sets the field that is associated with a HtmlEditor object. Gets or sets a value that specifies whether the user has reading rights to the source document in rich-client authoring mode.
Gets or sets a value that specifies whether the user is authorized to write to the source document in rich-client authoring mode. Gets or sets a value whether the mode is such that the user's client application can open the source document when in rich-client authoring mode.
Raises the System. PreRender event that occurs immediately before the component is rendered. Represents an event handler that is triggered when an update from the source document is requested in rich-client authoring mode. I removed the reference to the aspx. The reason for the different master page is that we have some heavy customization for our default branding, and I didn't want this to carry over to our application page.
I then added the following references:. These references ensure that you can add the HtmlEditor to the page, and that the Ribbon controls will load. Next, in the PlaceHolderMain section I added a reference to the editor:. By default, the reference to the editor was not added to the designer. To fully configure the editor for use, you will need to override the OnInit function.
Here is the code I used:. GetCurrent this. Page ;. TrimById "Ribbon. Layout" ;. EditAndCheckout" ;. Add htmlEditor. Field ;. OnInit e ;. As you can see, I also trim the Wiki controls from the Ribbon. I don't have a need for the Layout and Check out functions. Notice that I set the field ControlMode to edit, and modify a few additional parameters to hide options from the ribbon.
The final step is to add the RichHtmlField control to the page. Adding the field to the page causes the page to render the associated Ribbon Contextual Tabs. Without it, you would only see a text area for entering content, but the Ribbon would never display. To get the rest of the editor wired up required some javascript to handle the population of the editor control, and a few hidden fields for storing parameters from the parent page such as editor type and control id. We have up to 8 editable sections for a standard article, so the id of the parent content area was necessary to maintain the position of our content blocks.
I also perform an initial post back of the page via javascript in order to validate the variables and throw an error message is one of the required values is missing. To post the content back to the parent page, I use a button click event, and the following code to write the information back to the parent:. Write close ;. Flush ;. A hyperlink control that when placed on the page offers a link that a user can click to edit the page.
Used by the LevelHierarchyWebPart object to gather data. Represents a single default view of the LevelHierarchyDataSource class. Extends the ToolPart class for Web Parts that are hierarchical. User interface UI control that renders in the Web browser as a clickable button with Microsoft SharePoint Foundation publishing styles.
Adding this control to a Publishing page creates input fields on the page that are important for authoring-related operations. A user interface UI component that displays several actions that can be performed by authors in Microsoft SharePoint Foundation Publishing. Represents the control used to edit the ScheduledItem. StartDate or ScheduledItem. EndDate property of a ScheduledItem object.
EndDate of a ScheduledItem. User interface UI component that displays common actions that can be performed by authors in Microsoft SharePoint Foundation Publishing. This redirect happens only if the page is currently published and that user does not have rights to edit the page.
Placing this control on a Publishing page triggers saving the publishing page when that page is in Edit mode and the user attempts to navigate to another page. Represents the Site Elements control that is used to render master page elements such as a header or a footer.
Represents the toolbar button that launches spell checking in Microsoft SharePoint Foundation forms. An expression editor class that helps controls that are using this class to be displayed correctly.
Represents the tool part for a SummaryLinkWebPart object. Represents errors that occur during SummaryLinkWebPart execution. Represents a data source for a table of contents that supports taxonomy-based managed navigation. Renders a hierarchical view of Web Parts and Web pages when structural navigation is enabled, and renders the navigation term set when managed navigation is enabled.
Represents the DataSource control that supplies data used to render the Variation Flag control. This class or member is deprecated. When you upgrade or write new applications that use this class or member, use the new class or member instead.
A sample UI control that shows how to connect to the control to display a drop-down menu of the Variation peer links to the current Page. Represents a VideoRendition object that abstracts media rendition properties required for playback in the media player.
An interface that can be implemented by composite controls. Used to create external controls that will allow easy access to the main input control of the child controls.
0コメント