• takase
  • NEWBIE
  • 0 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies
Hi, 

I found the following code for a tooltip in combination with a component.

How can I add a linebreak into this text. <br/> is not working.
<c:helpicon helpText="
Example: 1215551212.
No dashes, please
"/>


Thanks,
Sascha


 
<apex:component selfClosing="true">
<apex:attribute name="helpText" description="Help Text." type="String" required="true"/>
<div class="mouseOverInfoOuter" id="searchInvoiceHelper" onfocus="addMouseOver(this)" onmouseover="addMouseOver(this)" tabindex="0">
    <img src="/s.gif" alt="" class="infoIcon" title="" />
    <div class="mouseOverInfo" id="searchInvoiceHelperText" style="display: none; opacity: -0.19999999999999996; left: 16px;">
        <div class="body">{!helpText}</div>
    </div>
</div>
</apex:component>
 
<apex:page >
    <apex:sectionHeader title="Help Icon Test" />
    <apex:form>
        <apex:pageBlock>
            <apex:outputText value="enter your phone number" />
            <apex:inputText /><c:helpicon helpText="Example: 1215551212. No dashes, please"/>
        </apex:pageBlock>
    </apex:form>
</apex:page>