Author: yradtsevich
Date: 2008-12-11 14:35:06 -0500 (Thu, 11 Dec 2008)
New Revision: 12560
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe.html/src/org/jboss/tools/vpe/html/template/HtmlTextTemplate.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/HTML.java
trunk/vpe/plugins/org.jboss.tools.vpe/ve/EditorOverride.css
Log:
RESOLVED - issue JBIDE-2115: VPE can't apply link styles.
https://jira.jboss.org/jira/browse/JBIDE-2115
CSS class 'vpe-text' has been created and used in HtmlTextTemplate .
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/HTML.java
===================================================================
---
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/HTML.java 2008-12-11
19:08:03 UTC (rev 12559)
+++
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/HTML.java 2008-12-11
19:35:06 UTC (rev 12560)
@@ -61,6 +61,12 @@
public static final String TAG_A = "A"; //$NON-NLS-1$
public static final String TAG_H1 = "H1"; //$NON-NLS-1$
public static final String TAG_FORM = "FORM"; //$NON-NLS-1$
+
+ /**Use this class if you want to wrap a text node in a span that
+ * must not affect visual representation of the text node.
+ * <p/>
+ * See also EditorOverride.css .*/
+ public static final String CLASS_VPE_TEXT = "vpe-text"; //$NON-NLS-1$
public static final String ATTR_ID = "ID"; //$NON-NLS-1$
public static final String ATTR_TYPE = "TYPE"; //$NON-NLS-1$
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/ve/EditorOverride.css
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/ve/EditorOverride.css 2008-12-11 19:08:03 UTC
(rev 12559)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/ve/EditorOverride.css 2008-12-11 19:35:06 UTC
(rev 12560)
@@ -333,3 +333,67 @@
a[\_moz_anonclass="mozTableRemoveRow"]:active {
background-image: url("resource:/res/table-remove-row-active.gif");
}
+
+span.vpe-text {
+ background :inherit !important;
+ background-image:none !important;
+ border :0px !important;
+ bottom :inherit !important;
+ caption-side :inherit !important;
+ clear :inherit !important;
+ clip :inherit !important;
+ color :inherit !important;
+ content :inherit !important;
+ counter-increment :inherit !important;
+ counter-reset :inherit !important;
+ cursor :inherit !important;
+ direction :inherit !important;
+ /*display :inherit !important;*/
+ empty-cells :inherit !important;
+ float :inherit !important;
+ font :inherit !important;
+ height :inherit !important;
+ left :inherit !important;
+ letter-spacing :inherit !important;
+ line-height :inherit !important;
+ list-style :inherit !important;
+ list-style-image :inherit !important;
+ list-style-position :inherit !important;
+ list-style-type :inherit !important;
+ margin :0 !important;
+ max-height :inherit !important;
+ max-width :inherit !important;
+ min-height :inherit !important;
+ min-width :inherit !important;
+ orphans :inherit !important;
+ outline :none !important; /*ccs3-modsel-162.html*/
+ /*outline-color :inherit !important;
+ outline-width :inherit !important;
+ outline-style :inherit !important;*/
+ overflow :inherit !important;
+ padding :0 !important;
+ page :inherit !important;
+ page-break-after :inherit !important;
+ page-break-before :inherit !important;
+ page-break-inside :inherit !important;
+ /*position :inherit !important;*/
+ quotes :inherit !important;
+ right :inherit !important;
+ size :inherit !important;
+ table-layout :inherit !important;
+ text-align :inherit !important;
+ text-decoration :inherit !important;
+ text-indent :inherit !important;
+ text-transform :inherit !important;
+ top :inherit !important;
+ unicode-bidi :inherit !important;
+ vertical-align :inherit !important;
+ visibility :inherit !important;
+ white-space :inherit !important;
+ widows :inherit !important;
+ width :inherit !important;
+ word-spacing :inherit !important;
+ z-index :inherit !important;
+ font-size-adjust :inherit !important;
+ opacity :inherit !important;
+}
\ No newline at end of file
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe.html/src/org/jboss/tools/vpe/html/template/HtmlTextTemplate.java
===================================================================
---
trunk/vpe/plugins/org.jboss.tools.vpe.html/src/org/jboss/tools/vpe/html/template/HtmlTextTemplate.java 2008-12-11
19:08:03 UTC (rev 12559)
+++
trunk/vpe/plugins/org.jboss.tools.vpe.html/src/org/jboss/tools/vpe/html/template/HtmlTextTemplate.java 2008-12-11
19:35:06 UTC (rev 12560)
@@ -45,6 +45,7 @@
.createTextNode(visualText);
//Max Areshkau without this span, we can't select text element
nsIDOMElement element = visualDocument.createElement(HTML.TAG_SPAN);
+ element.setAttribute(HTML.ATTR_CLASS, HTML.CLASS_VPE_TEXT);
element.appendChild(visualNewTextNode);
VpeElementData textElementData = new VpeElementData();
@@ -52,6 +53,7 @@
textElementData.addNodeData(nodeData);
VpeCreationData result = new VpeCreationData(element);
result.setElementData(textElementData);
+
return result;
}
}