2009/11/10

Version 1.3.1 release

  • [Requirement] rewrite dialog for define XPath search condition
  • [Requirement] bind hotkey to cursor config selection(default hot key is Alt+C, Alt+X)
  • [Requirement] Display tag name only if JSP tag lib is render to TD
  • [Bug] content assist show wrong hint if cursor is in end of line
  • [Bug] DOM find/replace dialog: Copy Editor Selection does not work
  • [Bug] cursor move to wrong position if disable "Open editor for imported page"
  • [Bug] editor preference config read wrong value for show tag name
  • [Bug] scroll bar control does not work in IE8
I also make a flash demo here. Please let me know if you have any suggestion. Thanks!

2009/10/15

Version 1.3.0 release

  • [Requirement] Add DOM based search/replace dialog, DOM based document can be modified by java script.
  • [Requirement] Save position/size for all dialog.
  • [Requirement] Change scroll bar control of visual part.
  • [Requirement] Highlight IMG, INPUT, TEXTAREA, SELECT with border style
  • [Bug] Undo modification caused render slow down.
  • [Bug] Outline area position/size not update after modified code.
  • [Bug] APPLET, OBJECT, IFRAME, EMBED is display even the style is hide.
  • [Bug] tag library declaration is not generate for Struts bean:message.
The old Element Modify Wizard is replaced by new feature. For more information about new feature, please view this page. I still have some ideas, but don't have enough time to implement. Please let me know if you have any suggestion. Thanks!

2009/09/25

New Feature for modify XML with java script

Next major release will support this feature (replace the Modify element wizard) , so user can write java script to perform complex modification. A variable named node is created automatic. It represented the selected node in dialog box.
Here is a example://get id attribute from first child node named 'span'
var nid=node.span['@id'];
//above call is same as: var nid=node.getChild('span')['@id'];
//delete first child node
node.getChild('span').remove();
//insert text before node
node.insertBefore(''+nid+':'+node.getChild('span').getInnerHTML()+'');
The node object will provide lots of function(Detail can be found here). Most of get methods are W3C API like... and additional support:
  • For get child node : node.childName is the same as node.getChild('childName') unless the childName is the same as any supported function.
  • For get attribute value : node['@attrName'] is the same as node.getAttribute('attrName')
Basic rules for modification: 1) All node text/data are evaluated as original value.
For example://if node['@attr']='789'
node.setAttribute('attr','123');
//try to set @id=@attr
node.setAttribute('id',node['@attr']);
//node['@id'] will be '789' not '123'
2) If a node is modified several times, high priority modification will overwrite others.
For example://remove a node
node.remove();
//below call will not take effect, because remove() conflict with setOuterHTML();
node.setOuterHTML('test');
If you have any suggesion, please feedback.