Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Section
Column
width60%
Info

This documentation refers to the latest trunk version of the Inline Edit code. For documentation specific to the v0.5 released version, please see Inline Edit API - v0.5.

Inline Edit Overview

The Inline Edit allows users to edit content within the context of their work rather than going to an "edit mode". It can be applied to any text, assuming a very simple contract is maintained:

  1. The elements that are part of the Inline Edit component have some kind of container element.
  2. The text you wish to make editable is within the component container.

You can optionally provide your own markup that will be used for the edit mode, but if not, default markup is provided.


Creation

Creating a single Inline Edit

Code Block
javascript
javascript
fluid.inlineEdit(componentContainer, options);

Return: The Inline Edit component object.

Column
Panel
borderColor#566b30
bgColor#fff
titleBGColor#D3E3C4
titleOn This Page
borderStylesolid
Table of Contents
minLevel2
maxLevel5
Panel
borderColor#321137
bgColor#fff
titleBGColor#c1b7c3
titleSee Also
borderStylesolid
Panel
borderColor#321137
bgColor#fff
titleBGColor#cccccc
titleStill need help?
borderStylesolid

Join the fluid-talk mailing list and ask your questions there.

Creating Multiple Inline Edits

Code Block
javascript
javascript

fluid.inlineEdits(componentContainer, options);

This function will find any elements within the given container that are identified as 'editables' and apply the Inline Edit component to them.

Parameters

componentContainer

The componentContainer parameter is a selector, a single-element jQuery, or a DOM element representing the component's containerspecifying the root DOM node of the Inline Edit markup.

Anchor
option_description
option_description

...

The options parameter is an optional collection of name-value pairs that configure the Inline Edit component(s):

Insert excerpt
Infusion13:Inline Edit Configuration Options
Infusion13:Inline Edit Configuration Options
nopaneltrue

The options for the creation of multiple Inline Edits are the same as those for the creation of a single Inline Edit, with the addition of a selector for identifying the editable elements. The default selector is defined as follows:

Code Block
javascript
javascript

selectors: {
    editables: ".inlineEditable"
}

...

Functions

Code Block
javascript
javascript
fluid.inlineEdit.edit();

...

Updates the component's internal representation of the text to a new value. The component will be re-rendered.

Creating Multiple Inline Edits

...


fluid.inlineEdits(componentContainer, options);

This function will find any elements within the given container that are identified as 'editables' and apply the Inline Edit component to them.

Parameters

componentContainer

The componentContainer parameter is a selector, a single-element jQuery, or a DOM element specifying the root DOM node of the Inline Edit markup.

options

The options parameter is an optional collection of name-value pairs that configure the Inline Edit components. The available options are the same as those for the creation of a single Inline edit (described above), with the addition of a selector for identifying the editable elements. The default selector is defined as follows:

...

...

Skinning

This component can be skinned "out of the box" when you include our CSS skin files. Just be sure to put the following in you document:

...