Author: sdzmitrovich
Date: 2008-03-10 15:53:47 -0400 (Mon, 10 Mar 2008)
New Revision: 6825
Modified:
branches/jbosstools-2.0.x/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpePreviewDomBuilder.java
Log:
jbide-1738
Modified:
branches/jbosstools-2.0.x/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpePreviewDomBuilder.java
===================================================================
---
branches/jbosstools-2.0.x/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpePreviewDomBuilder.java 2008-03-10
19:18:35 UTC (rev 6824)
+++
branches/jbosstools-2.0.x/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpePreviewDomBuilder.java 2008-03-10
19:53:47 UTC (rev 6825)
@@ -80,6 +80,19 @@
creationData = template.create(getPageContext(), sourceNode, getVisualDocument());
} else {
nsIDOMElement tempHTMLElement = getVisualDocument().createElement(HTML.TAG_DIV);
+
+ if (sourceNode.getNodeType() == Node.ELEMENT_NODE) {
+ if (((Element) sourceNode).hasAttribute("style"))
+ tempHTMLElement.setAttribute(HTML.ATTR_STYLE,
+ ((Element) sourceNode)
+ .getAttribute("style"));
+ if (((Element) sourceNode).hasAttribute("styleClass"))
+ tempHTMLElement.setAttribute(HTML.ATTR_CLASS,
+ ((Element) sourceNode)
+ .getAttribute("styleClass"));
+
+ }
+
creationData = new VpeCreationData(tempHTMLElement);
}
}catch (XPCOMException ex) {