| Current Path : /var/www/html/mmishra/indem/js/tinymce/docs/api/ |
| Current File : /var/www/html/mmishra/indem/js/tinymce/docs/api/class_tinymce.html.Node.html |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html>
<head>
<title>Class: tinymce.html.Node</title>
<meta name="generator" content="MoxieDoc" />
<link rel="stylesheet" type="text/css" href="css/reset.css" />
<link rel="stylesheet" type="text/css" href="css/grids.css" />
<link rel="stylesheet" type="text/css" href="css/general.css" />
<script type="text/javascript" src="http://www.google.com/jsapi"></script>
<script type="text/javascript">
google.load("jquery", "1.3");
</script>
<script type="text/javascript" src="js/jquery.treeview.min.js"></script>
<script type="text/javascript" src="js/general.js"></script>
</head>
<body>
<div class="classDetailsContent">
<h1>tinymce.html.Node</h1>
<table class="classDetails">
<tr>
<td class="first">Namespace</td>
<td class="last">tinymce.html</td>
</tr>
<tr>
<td class="first">Class</td>
<td class="last">Node</td>
</tr>
</table>
<div class="classDescription">This class is a minimalistic implementation of a DOM like node used by the DomParser class.
</div>
<div class="version">
<span>Version:</span>3.4</div>
<h4>Example</h4>
<pre class="brush: js;"/>
<div class="summaryLists">
<h2>Public Methods</h2>
<table class="Methods summary">
<thead>
<tr>
<th>Method</th>
<th>Defined By</th>
</tr>
</thead>
<tbody>
<tr>
<td class="first">
<div>
<a class="memberName" href="class_tinymce.html.Node.html#Node">Node</a>(name:String, type:Number)</div>
<div class="summary">Constructs a new Node instance.</div>
</td>
<td class="last">Node</td>
</tr>
<tr class="even">
<td class="first">
<div>
<a class="memberName" href="class_tinymce.html.Node.html#append">append</a>(node:<a href="class_tinymce.html.Node.html">Node</a>):<a href="class_tinymce.html.Node.html">Node</a>
</div>
<div class="summary">Appends a new node as a child of the current node.</div>
</td>
<td class="last">Node</td>
</tr>
<tr>
<td class="first">
<div>
<a class="memberName" href="class_tinymce.html.Node.html#attr">attr</a>(name:String, value:String):String/<a href="class_tinymce.html.Node.html">Node</a>
</div>
<div class="summary">Gets/sets or removes an attribute by name.</div>
</td>
<td class="last">Node</td>
</tr>
<tr class="even">
<td class="first">
<div>
<a class="memberName" href="class_tinymce.html.Node.html#clone">clone</a>():<a href="class_tinymce.html.Node.html">Node</a>
</div>
<div class="summary">Does a shallow clones the node into a new node.</div>
</td>
<td class="last">Node</td>
</tr>
<tr>
<td class="first">
<div>
<a class="memberName" href="class_tinymce.html.Node.html#create">create</a>(name:String, attrs:Object):void</div>
<div class="summary">
<span class="static">[static] </span>Creates a node of a specific type.</div>
</td>
<td class="last">Node</td>
</tr>
<tr class="even">
<td class="first">
<div>
<a class="memberName" href="class_tinymce.html.Node.html#empty">empty</a>():<a href="class_tinymce.html.Node.html">Node</a>
</div>
<div class="summary">Removes all children of the current node.</div>
</td>
<td class="last">Node</td>
</tr>
<tr>
<td class="first">
<div>
<a class="memberName" href="class_tinymce.html.Node.html#getAll">getAll</a>(name:String):Array</div>
<div class="summary">Get all children by name.</div>
</td>
<td class="last">Node</td>
</tr>
<tr class="even">
<td class="first">
<div>
<a class="memberName" href="class_tinymce.html.Node.html#insert">insert</a>(node:<a href="class_tinymce.html.Node.html">Node</a>, ref_node:<a href="class_tinymce.html.Node.html">Node</a>, before:Boolean):<a href="class_tinymce.html.Node.html">Node</a>
</div>
<div class="summary">Inserts a node at a specific position as a child of the current node.</div>
</td>
<td class="last">Node</td>
</tr>
<tr>
<td class="first">
<div>
<a class="memberName" href="class_tinymce.html.Node.html#isEmpty">isEmpty</a>(elements:Object):Boolean</div>
<div class="summary">Returns true/false if the node is to be considered empty or not</div>
</td>
<td class="last">Node</td>
</tr>
<tr class="even">
<td class="first">
<div>
<a class="memberName" href="class_tinymce.html.Node.html#remove">remove</a>():<a href="class_tinymce.html.Node.html">Node</a>
</div>
<div class="summary">Removes the node from it's parent.</div>
</td>
<td class="last">Node</td>
</tr>
<tr>
<td class="first">
<div>
<a class="memberName" href="class_tinymce.html.Node.html#replace">replace</a>(node:<a href="class_tinymce.html.Node.html">Node</a>):<a href="class_tinymce.html.Node.html">Node</a>
</div>
<div class="summary">Replaces the current node with the specified one.</div>
</td>
<td class="last">Node</td>
</tr>
<tr class="even">
<td class="first">
<div>
<a class="memberName" href="class_tinymce.html.Node.html#unwrap">unwrap</a>():void</div>
<div class="summary">Unwraps the node in other words it removes the node but keeps the children.</div>
</td>
<td class="last">Node</td>
</tr>
<tr>
<td class="first">
<div>
<a class="memberName" href="class_tinymce.html.Node.html#wrap">wrap</a>():void</div>
<div class="summary">Wraps the node in in another node.</div>
</td>
<td class="last">Node</td>
</tr>
</tbody>
</table>
</div>
<div class="detailsList">
<div class="details">
<h2>Method details</h2>
<div class="memberDetails" id="Node">
<h3>Node<span class="memberType">constructor</span>
</h3>
<code class="syntax">public
function Node(name:String, type:Number)</code>
<div class="memberDescription">Constructs a new Node instance.
</div>
<h4>Parameters</h4>
<table class="params">
<tr>
<td class="first">name:String</td>
<td class="last">Name of the node type.</td>
</tr>
<tr>
<td class="first">type:Number</td>
<td class="last">Numeric type representing the node.</td>
</tr>
</table>
</div>
<div class="memberDetails" id="append">
<h3>append<span class="memberType">method</span>
</h3>
<code class="syntax">public
function append(node:<a href="class_tinymce.html.Node.html">Node</a>):<a href="class_tinymce.html.Node.html">Node</a>
</code>
<div class="memberDescription">Appends a new node as a child of the current node.
</div>
<h4>Parameters</h4>
<table class="params">
<tr>
<td class="first">node:<a href="class_tinymce.html.Node.html">Node</a>
</td>
<td class="last">Node to append as a child of the current one.</td>
</tr>
</table>
<h4>Returns</h4>
<div class="returns">
<a href="class_tinymce.html.Node.html">Node</a> - The node that got appended.</div>
<h4>Example</h4>
<pre class="brush: js;"/>
</div>
<div class="memberDetails" id="attr">
<h3>attr<span class="memberType">method</span>
</h3>
<code class="syntax">public
function attr(name:String, value:String):String/<a href="class_tinymce.html.Node.html">Node</a>
</code>
<div class="memberDescription">Gets/sets or removes an attribute by name.
</div>
<h4>Parameters</h4>
<table class="params">
<tr>
<td class="first">name:String</td>
<td class="last">Attribute name to set or get.</td>
</tr>
<tr>
<td class="first">value:String</td>
<td class="last">Optional value to set.</td>
</tr>
</table>
<h4>Returns</h4>
<div class="returns">String/<a href="class_tinymce.html.Node.html">Node</a> - String or undefined on a get operation or the current node on a set operation.</div>
<h4>Example</h4>
<pre class="brush: js;"/>
</div>
<div class="memberDetails" id="clone">
<h3>clone<span class="memberType">method</span>
</h3>
<code class="syntax">public
function clone():<a href="class_tinymce.html.Node.html">Node</a>
</code>
<div class="memberDescription">Does a shallow clones the node into a new node. It will also exclude id attributes since
there should only be one id per document.
</div>
<h4>Returns</h4>
<div class="returns">
<a href="class_tinymce.html.Node.html">Node</a> - New copy of the original node.</div>
<h4>Example</h4>
<pre class="brush: js;"/>
</div>
<div class="memberDetails" id="create">
<h3>create<span class="memberType">method</span>
</h3>
<code class="syntax">public static
function create(name:String, attrs:Object):void</code>
<div class="memberDescription">Creates a node of a specific type.
</div>
<h4>Parameters</h4>
<table class="params">
<tr>
<td class="first">name:String</td>
<td class="last">Name of the node type to create for example "b" or "#text".</td>
</tr>
<tr>
<td class="first">attrs:Object</td>
<td class="last">Name/value collection of attributes that will be applied to elements.</td>
</tr>
</table>
</div>
<div class="memberDetails" id="empty">
<h3>empty<span class="memberType">method</span>
</h3>
<code class="syntax">public
function empty():<a href="class_tinymce.html.Node.html">Node</a>
</code>
<div class="memberDescription">Removes all children of the current node.
</div>
<h4>Returns</h4>
<div class="returns">
<a href="class_tinymce.html.Node.html">Node</a> - The current node that got cleared.</div>
</div>
<div class="memberDetails" id="getAll">
<h3>getAll<span class="memberType">method</span>
</h3>
<code class="syntax">public
function getAll(name:String):Array</code>
<div class="memberDescription">Get all children by name.
</div>
<h4>Parameters</h4>
<table class="params">
<tr>
<td class="first">name:String</td>
<td class="last">Name of the child nodes to collect.</td>
</tr>
</table>
<h4>Returns</h4>
<div class="returns">Array - Array with child nodes matchin the specified name.</div>
</div>
<div class="memberDetails" id="insert">
<h3>insert<span class="memberType">method</span>
</h3>
<code class="syntax">public
function insert(node:<a href="class_tinymce.html.Node.html">Node</a>, ref_node:<a href="class_tinymce.html.Node.html">Node</a>, before:Boolean):<a href="class_tinymce.html.Node.html">Node</a>
</code>
<div class="memberDescription">Inserts a node at a specific position as a child of the current node.
</div>
<h4>Parameters</h4>
<table class="params">
<tr>
<td class="first">node:<a href="class_tinymce.html.Node.html">Node</a>
</td>
<td class="last">Node to insert as a child of the current node.</td>
</tr>
<tr>
<td class="first">ref_node:<a href="class_tinymce.html.Node.html">Node</a>
</td>
<td class="last">Reference node to set node before/after.</td>
</tr>
<tr>
<td class="first">before:Boolean</td>
<td class="last">Optional state to insert the node before the reference node.</td>
</tr>
</table>
<h4>Returns</h4>
<div class="returns">
<a href="class_tinymce.html.Node.html">Node</a> - The node that got inserted.</div>
<h4>Example</h4>
<pre class="brush: js;"/>
</div>
<div class="memberDetails" id="isEmpty">
<h3>isEmpty<span class="memberType">method</span>
</h3>
<code class="syntax">public
function isEmpty(elements:Object):Boolean</code>
<div class="memberDescription">Returns true/false if the node is to be considered empty or not
</div>
<h4>Parameters</h4>
<table class="params">
<tr>
<td class="first">elements:Object</td>
<td class="last">Name/value object with elements that are automatically treated as non empty elements.</td>
</tr>
</table>
<h4>Returns</h4>
<div class="returns">Boolean - true/false if the node is empty or not.</div>
<h4>Example</h4>
<pre class="brush: js;"/>
</div>
<div class="memberDetails" id="remove">
<h3>remove<span class="memberType">method</span>
</h3>
<code class="syntax">public
function remove():<a href="class_tinymce.html.Node.html">Node</a>
</code>
<div class="memberDescription">Removes the node from it's parent.
</div>
<h4>Returns</h4>
<div class="returns">
<a href="class_tinymce.html.Node.html">Node</a> - Current node that got removed.</div>
<h4>Example</h4>
<pre class="brush: js;"/>
</div>
<div class="memberDetails" id="replace">
<h3>replace<span class="memberType">method</span>
</h3>
<code class="syntax">public
function replace(node:<a href="class_tinymce.html.Node.html">Node</a>):<a href="class_tinymce.html.Node.html">Node</a>
</code>
<div class="memberDescription">Replaces the current node with the specified one.
</div>
<h4>Parameters</h4>
<table class="params">
<tr>
<td class="first">node:<a href="class_tinymce.html.Node.html">Node</a>
</td>
<td class="last">Node to replace the current node with.</td>
</tr>
</table>
<h4>Returns</h4>
<div class="returns">
<a href="class_tinymce.html.Node.html">Node</a> - The old node that got replaced.</div>
<h4>Example</h4>
<pre class="brush: js;"/>
</div>
<div class="memberDetails" id="unwrap">
<h3>unwrap<span class="memberType">method</span>
</h3>
<code class="syntax">public
function unwrap():void</code>
<div class="memberDescription">Unwraps the node in other words it removes the node but keeps the children.
</div>
<h4>Example</h4>
<pre class="brush: js;"/>
</div>
<div class="memberDetails last" id="wrap">
<h3>wrap<span class="memberType">method</span>
</h3>
<code class="syntax">public
function wrap():void</code>
<div class="memberDescription">Wraps the node in in another node.
</div>
<h4>Example</h4>
<pre class="brush: js;"/>
</div>
</div>
</div>
</div>
</body>
</html>