Ektron 9.00
IMPORTANT: If you are using Internet Explorer 9, set the following parameters to ensure optimum functionality.
1. Press F12 in your IE9 browser. A settings menu bar appears at the bottom of the browser above the tabs.
2. Set Browser Mode to Internet Explorer 9 (not Compatibility view).
3. Set the Documentation Mode to IE9 Standards.
4. Click X to exit.
When your hover the cursor over editable content, a yellow border appears. When you click the content, the border turns blue, and a floating editor toolbar appears.
NOTE:
The editor toolbar consists of tabs with buttons. A system administrator can customize the toolbar options depending on the context. For example, he may want the Inspector available when editing content in the Workarea but not while editing "in context". For information about customizations, see Customizing the Editor and Modifying Editor Plug-ins.
StyleConfig.js
. For example, headings, bullets, and bolded fonts may be maintained during a paste operation but the actual font may not. IMPORTANT: When you paste content from another application, the editor formats that content into valid, minimal HTML and retains as much formatting and styling as possible. However, results are browser-dependent.
See Also: Applying Styles
NOTE: If you apply the Span style, you can select it in the Inspector to enter style modifications.
In addition to the toolbar's styling buttons, you can apply styling to content by clicking the Inspector, which may appear at the bottom of the editor.
The Inspector provides inline styles and properties that you can apply to text, images, tables, links, and so on.
Best Practice
To enhance your site's appearance, define a set of styles from which content authors can select, instead of letting authors apply styling as needed.
NOTE: A developer or administrator can add classes and IDs that also can be applied. Inline styles immediately affect the content display. But classes only affect a Web page if it loads the CSSCascading Style Sheet; sets the look and formatting of a markup language document. and files that contain the classes.
For example, in the editor, you select the text 37 percent gain and apply <span>
tags.
Next, open the Inspector. The top right corner of the dialog indicates that the content is in a <Span>
tag, within a <p>
tag, within a <DIV>
tag. Below that are styles you can apply to the <span>
tag. You can click any tag in the list (such as the current paragraph), then apply styling properties to it. Click the Advanced tab to see more styling options for the tag.
NOTE: To modify the list of styles, your Ektron administrator modifies the styleconfig.js file, as described in Creating Styles and Classes.
The Inspector's Advanced tab lets you apply additional refinements, based on the selected element. For example, if you select an image, see Editing Images. Some property dialogs are below.
You may want to style a few words only. See 37 percent gain in the following example.
To apply styling to one or a few words:
To remove all styling properties from text:
A link tab appears.
To learn about inserting an image, see Inserting an Image.
NOTE: You know that you selected an image if you see an <IMG> tag in the Inspector.
Use a bookmark to let a site visitor “jump” from any word or phrase to another place in the same content block. On your Web page, text appears in a different color to indicate the bookmark.
Bookmarks are particularly helpful on a long page. For example, your Web page contains minutes from several meetings, and the top of the page lists meeting dates. You could assign a hyperlink to each date, and a bookmark to each set of minutes. A site visitor can click any date to “jump” (using the bookmark) to those minutes.
To use a bookmark, you create 2 things:
For example, place the text [ Top ] [ Bottom ] at the top and bottom of a content block. The following procedure shows how to create bookmarks so that clicking [ Top ] at the bottom of the page jumps to the top of the page, and clicking on [ Bottom ] at the top of the page jumps to the bottom of the page.
PageTop
.PageBottom
.NOTE: You can use <Tab> to move from one cell to the next. If you are on the last cell, <Tab> creates a new row. Use <Shift>+<Tab> to move backwards.
Use the Inspector to apply properties to a table, a table row (TR
), or a single cell (TD
).
Alternatively, you can enter a table caption in the Inspector.
Click the gray area beside a table row or above a table column. Your selection is highlighted.
You can use the following table functions on selected rows/columns:
IMPORTANT: When you save and publish your content, your site styling is applied. Therefore, a table in the Workarea may appear differently from a table you edit in context.
NOTE: To split a merged cell, select the column or row of the merged cell before clicking Split.
With the Inspector open, click anywhere in a table to view styles and advanced properties you can apply.
In the following example, a 3x3 table was created. Clicking in a cell, the nested tag structure shows the following:
Click any tag to see styles you can apply to it. For example, click to see table properties. The following image shows the table size reduced to 25%.
When you make a table the content focus (a colored bar appears around the table), a tab appears above the table's left top corner. Use the tab to drag the table to another place in your content.
NOTE: You can also move a table in Source Viewer.
NOTE: You can also delete a table from Source View, and easily collapse the entire table to delete it in one line of HTML.
The easiest way to insert an image into content is by dragging and dropping it from a Windows Explorer window. You can also
You can drag-and-drop an image from your computer using a file browser into Ektron content. Dropped images are added to the Library for future reuse. Dropped images must have one of these extensions: .jpg
, .gif
, or .png
, and cannot exceed 5 MB.
When dragging and dropping, the file name becomes the item's title, and no other library information is collected (for example, its summary and metadata). Once the content is saved, use the Edit Library screen to add information for the new library item.
NOTE: Dragging and dropping of images is only supported for Firefox and Webkit-based browsers (such as Safari and Chrome), and from your local computer (not a network drive).
NOTE: If the file is not in the library, you can insert it by clicking the Add Library button, clicking Browse and navigating to the file. Then, enter a title and optionally a description and metadata information. The file is inserted into the content and added to the library.
Alternatively, you can insert a miniature version of the image, called a thumbnail, by clicking the thumbnail button (). When the thumbnail appears on a Web page, a site visitor clicks it to view a full-sized image.
After inserting an image, you can adjust its properties by opening the Inspector.
NOTE: You will know that you selected an image if you see an <IMG> tag in the Inspector.
The Inspector’s Advanced tab lets you modify the image size, position, wrapping, and so on, and lets you select images that change based on breakpoints for viewing modes of your users. See Adding a Group by Breakpoint in Creating a Mobile-Driven Web Experience.
For example, click Responsive Image Selection > Change and select an image to display when screen resolution is 275 pixels or fewer.
If you reduce the editing window to under 276 pixels, the editor automatically switches to the smaller picture.
NOTE: You know that you selected an image if an <IMG> tag appears in the Inspector.
<object width="425" height="350"> <param name="movie" value="http://www.youtube.com/v/8K_NQe57C-k"></param> <param name="wmode" value="transparent"></param> <embed src="http://www.youtube.com/v/8K_NQe57C-k" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"></embed> </object>
To view and edit the HTML source, click View Source () on the Review tab. The Source Viewer appears. As you edit the HTML, the content window dynamically updates with your changes.
When you finish editing in the Source Viewer, click the X in the top right corner.
The Source Viewer supports tag completion. For example, if you type <p>
, the Source Viewer automatically adds a closing </p>
tag.
The Source Viewer supports collapsing and expanding tags. For example, if a table is in the content, a small arrow appears next to the line numbers. Click the arrow to expand or collapse the nested tags.
NOTE: Replacing text is supported only in the Source Viewer. Search is supported in the editor by pressing Ctrl/f.
Consider replacing OnTrek with Ektron in the following content.
<p>OnTrek announced a 37 percent gain in revenue for the first half of 2010 over the first half of 2009. Q3 2010 sales increased 45 percent compared to a record sales month in July 2009. “Demand for OnTrek’s latest solutions, from new and existing customers, combined with our ability to deliver upon mission-critical business initiatives continues to drive a healthy gross margin,” said James Bradford, founder and CEO of OnTrek. “With competitive technical analysis and boardroom influence favoring OnTrek in customers’ due diligence, our momentum and accelerated growth is expected to continue.” <br/></p>
You can validate content against Accessibility (Section 508Section 508 Of The Rehabilitation Act - requiring electronic and information technology to be accessible to people with disabilities. Guideline), WCAGWeb Content Accessibility Guidelines - making Web content accessible to people with disabilities., HTML5, or XHTML guidelines by clicking Validate () on the Review tab. The Content Validator screen appears. Choose which guideline you want to use from the drop-down menu, then click Validate. Options include:
NOTE: Each standard may have conflicts with the other standards; valid HTML5 code may not be valid XHTML code. Choose the standard guideline that you need.
A template is section of HTML-formatted content that users can copy into their content for any number of reasons. For example, a template can help maintain a structure, such as image captions. If you want the caption on the left with content flowing around it, create mark-up to do this and put it in a template.
Administrators create content templates within a designated folder structure. When authors are editing content in any folder, they click a toolbar button, then select and insert a template.
The following sections provide additional details on how to create and insert templates.
To prepare for templates, create an Ektron folder structure to contain them. Then, specify its parent folder at the templatePlugin
element in the AlohaEktron.aspx
file, located in siteroot\Workarea\FrameworkUI\js\Ektron\Controls\EktronUI\Editor\Aloha\
.
templatePlugin: {FolderID: 45}
IMPORTANT: You cannot use 0, the root folder, as the parent folder for templates.
NOTE: You set permissions on the parent template folder as you do for any other folder. Users must have read-only or greater permission for the parent template folder in order to insert a template into content.
After you create the folder, open it (or any of its child folders) and create and publish HTML content to be used as a template. Authors may only select published content from this folder structure when inserting a template into content.
To insert a template
The template is copied to your content, and then decoupled from the template source file. So, you can modify the copied text as you like; modifications do not affect the template. Also, if you later change the template, that action does not affect previously-inserted copies.
This section describes machine translation, which converts content to another language. Machine translation operates on an entire piece of content, not selected portions of content.
IMPORTANT: Before you can use machine translation, a system administrator must enable it. See Enabling Machine Translation.
An administrator can customize the editor.
The editor is determined by the ek_EditControlWin
(Windows) or ek_EditControlMac
(MacIntosh) tags in web.config
. However, you can change them to use another editor.
<!-- EditControlWin may be either "Aloha" or "ContentDesigner" or "UserPreferred" --> <add key="ek_EditControlWin" value="Aloha" />
Aloha
designates the default editor for all users.ContentDesigner
designates the eWebEdit400 editor for all users.UserPreferred
lets users choose an editor on their profile page. Creating a New User If the value is UserPreferred
, Aloha is the default value in the profile for all users.
Plug-ins are open-source, customizable pieces of JavaScript code that provide editor functionality. Ektron provides several useful plug-ins that lets you customize the editor. You specify the editor plug-ins that you want to use in the siteroot\ektron.cms.framework.ui.config
. Many plug-ins are buttons on the editor toolbar. See Also: Customizing the Editor's Toolbar Buttons
Editor plug-ins are stored at \Workarea\FrameworkUI\js\Ektron\Controls\EktronUI\Editor\Aloha\plug-ins\ektron\[plug-in_name]
. Each [plug-in_name]
folder has supporting CSS
and lib
folders containing these files:
Plug-in_Name.css
—cascading style sheet for the plug-inPlug-in_Name-plug-in.js
—JavaScript file for the plug-inPlug-in code has the following basic outline:
Init
function executes upon loading (usually to create the button)createButtons
function adds a button to floating menuNOTE: For more information about customizing the editor and creating plug-ins, see the webinar: Customize the Behavior of the Editor for Your Projects.
Each editor plug-in has one of these prefixes:
common/
—native to the editorektron/
—supplied by Ektronextra/
—supplied by others. You can create your own plug-ins. (This document does not describe how.)The following are standard editor plug-ins.
common/ui
, common/block
—required internal plug-ins; do not removecommon/abbr
()—specify an abbreviation for content, which shows up as bubble text See Also: Displaying Bubble Text on Contentcommon/characterpicker
()—insert special characters (such as ® and ±)common/contenthandler
—controls sanitization of content and supports cleaning of Microsoft Word documents being pasted to the editor to preserve as much formatting as possible.Content handler is independent of paste. It cleans content when certain actions are performed, such as paste, getContents
(getting content to save it to the database), and initEditable
(opening content).
NOTE: If content contains improper tagging, it is removed when pasted. Also, images embedded within documents are not pasted into Ektron content; you must insert them separately.
dom-to-xhtml/dom-to-xhtml
—ensures XHTML compliance. This plug-in enables Ektron controls.common/highlighteditables
—not a toolbar button; if enabled, you can click a content item to highlight it for easy identification of content elementscommon/horizontalruler
()—insert horizontal linecommon/list
( and )—create an unordered (bulleted <ul>
) or ordered (numbered <ol>
) listcommon/paste
—not a toolbar button; uses the browser’s ability to paste content from the clipboardcommon/table
()—insert a table See Also: Inserting a Tablecommon/undo
—not a toolbar button; enables the browser’s ability to undo the last actionektron/bookmark
()—set a bookmark See Also: Removing a Linkektron/draganddrop
—not a toolbar button; enables drag and drop of images into content; supported browsers: Firefox and Webkit-based (such as Safari and Chrome) ektron/editInContextCallback
—raise callback events (that depend on your permissions and workflow) when you “edit in context”ektron/embed
()— embed a video into your content ektron/format
—contains bold (), italic (), subscript (), superscript (), and the formatting palette (Paragraph, Span, Heading1-Heading6, Pre)ektron/hyperlink
()—insert a hyperlink See Also: Working with Linksektron/library
()—insert a library item (file, form, hyperlink, image, and quicklinka special kind of hyperlink that jumps to another content item on your Web site. (A regular hyperlink jumps to a Web page on the internet.)) into the contentektron/sourceview
()—opens a view of HTML coding of the content. Whether you edit in the source viewer or the HTML editor, both views are kept concurrent. See Also: Viewing and Editing HTML Source Contentektron/template(
)—insert predefined content into the editor at the cursor location; for example, a caption below an image. See Also: Using a Template to Structure Contentektron/translate
()—machine translate text to another Ektron-supported language. See Also: Translating Contentektron/validator
()—verify content against HTML5, XHTML, WC3, and WCAG compliance. See Also: Validating ContentThe following example shows how to create a "Hello World" plug-in snippet within a <span>
tag. To learn about creating plug-ins, see http://aloha-editor.org/guides/writing_plug-ins.html.
// define the HelloWorld module using RequireJS define([ 'aloha', 'aloha/plug-in', 'aloha/floatingmenu', 'aloha/jquery', 'i18n!aloha/nls/i18n', 'css!helloworld/css/helloworld.css'], // callback executed once dependencies are loaded by RequireJS function (Aloha, Plugin, FloatingMenu, jQuery, i18nCore) { // create and register the Plugin return Plugin.create("helloworld", { defaults: { text: "Hello World!", wrapper: '<span class="helloworld"></span>' }, init: function () { // executed on plug-in initialization window.console.info("HelloWorld: Begin initialization"); this.createButtons(); window.console.info("HelloWorld: End initialization"); }, createButtons: function () { // provide locally scoped version of this for use // in callbacks,e tc. var that = this, tabInsert = i18nCore.t('floatingmenu.tab.insert'); // create hellowworld button this.helloWorldButton = new Aloha.ui.Button({ 'name': 'helloWorld', 'iconClass': 'ektron-aloha-button ektron-aloha-helloWorld', 'size': 'small', 'onclick': function () { that.insertHello(); }, 'tooltip': "Click to insert Hello World!", 'toggle': false }); // add it to the floating menu FloatingMenu.addButton( 'Aloha.continuoustext', this.helloWorldButton, tabInsert, 1 ); }, insertHello: function () { window.console.info("HelloWorld: Hello World Button clicked"); var html = jQuery(this.settings.wrapper).text(this.settings.text); // get the current selection range var range = Aloha.Selection.getRangeObject(); if (range.isCollapsed()) { GENTICS.Utils.Dom.insertIntoDOM(html, range, jQuery(Aloha.activeEditable.obj)); } else { // remove the contents of the current selection range.deleteContents(); // insert our Hello World elements GENTICS.Utils.Dom.insertIntoDOM(html, range, jQuery(Aloha.activeEditable.obj)); // deselect the current range object Aloha.getSelection().removeAllRanges(); } return false; } }); } );
The editor toolbar appears in several Workarea locations, and on your site when logged-in users edit in context. A variation of the toolbar appears when content authors create HTML content, enter a calendar event, reply to a discussion forum post, and so on.
In the \siteroot\ektron.cms.framework.ui.config
file, the <add name="EditInContext">
element lists all editor toolbar variations. Following each variation is a list of buttons for that variation. To customize the functions that appear in a variation, edit the list.
IMPORTANT: When placing the editor on an .aspx page, specify its toolbar using the ToolbarConfig
property.<ektron:AlohaEditor ID="AlohaMessage" runat="server" AllowScripts="false" ToolbarConfig="Mediamedia" />
NOTE: Embedded within each plug-in's description is the editor tab under which it appears. You cannot change this information.
For example, to remove the validator button () from the toolbar when editing a Smart Form rich area text field:
Content
element within the ektron.cms.framework.ui.config
file.ektron/validator
plug-in within the Content
element.ektron/validator
plug-in (see example below).<add name="Content" path="dom-to-xhtml/dom-to-xhtml,common/ui,ektron/format, common/contenthandler,common/table,common/list,ektron/hyperlink, common/highlighteditables,common/undo,common/paste,common/horizontalruler, ektron/translate,ektron/validator,ektron/template,ektron/embed,ektron/inspector, ektron/sourceview,ektron/advancedinspector,ektron/draganddrop,common/block" default="false" />
StyleConfig.js
You set up styles and classes that users can use with the Inspector in the StyleConfig.js
file. It is located at:
[siteroot]\Workarea\FrameworkUI\js\Ektron\Controls\EktronUI\Editor\
Aloha\plug-ins\ektron\advancedinspector\lib\StyleConfigjs
In the following example, the Alert style is applied to the STRONG tag and is defined as follows.
"STRONG": { "styles": { "Alert": { "type": "style", "value": "color:red;", "workareaBox": "color:red;" } } }
STRONG
is the tag to which the Alert
style is being applied.Alert
is the name of the new style that displays in the Inspector's Style Selectortype
is defined as style
for an in-line style, or class
to be applied to an elementvalue
for this Alert style is red text that gets applied to the style or class elementworkareaBox
defines how the preview appears within the Inspector when a user chooses this styleektronUI:Editor Control
The ektronUI:Editor
control is an ASP.NET server component that you can integrate into an .aspx page. See the following example.
The ToolbarConfig
property value (EditInContext
in this example) specifies which plug-ins to load with the editor. See Also: Modifying Editor Plug-ins
<!DOCTYPE html PUBLIC "~//WJC//DTD XHTML 1.0 Strict//EN" "http:..www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title>Editor control integration</title> </head> <body> <div id="content"> <ektronUI:Editor ID="Editor1" runat="server" ToolbarConfig="EditInContext" /> </div> </body> </html>