2012/01/04

Version 2.4.0 release

  • [Requirement] Load extra CSS file by project
  • [Requirement] Add java script API: setMappingAttribute(attributeName)
  • [Requirement] DOM find/replace dialog: add axis "descendant-or-self::" for search simple element
  • [Bug] Hidden element outline is not move after scrolling.
  • [Bug] Taglib API: insertBefore(node, refNode) should not replace node
  • [Bug] Visual view: Pin editer does not work in some case
If a custom tag will generate several HTML elements, the setMappingAttribute(attributeName) API could let each element mapping to different attribute. So 
For example: <t:inputText label="Name" value="Bravo Editor"/>
will generate:
<div><span>Name</span><input type="text" value="Bravo Editor" /></div>

When you click text inside <span>, the cursor of source editor will move to attribute 'label'.
When you click <input>, the cursor of source editor will move to attribute 'value'.

Render script example:
var container = factory.createElement("div");
var label = factory.createElement("span"); 
label.setMappingSource(srcElement); 
label.setMappingAttribute('label');
label.appendChild(factory.createText(srcElement.getAttribute('label'))); 
var input = factory.createElement("input"); 
input.setMappingSource(srcElement); 
input.setMappingAttribute('value');
input.setAttribute('value',srcElement.getAttribute('value')); 
container.appendChild(label); 
container.appendChild(input); 
container

No comments:

Post a Comment