0

I have a field that looks like this in my schema:

<Field ID="{7662cd2c-f069-4dba-9e35-082cf976e170}" Type="Note" RestrictedMode="TRUE"  NumLines="15" Name="Body" DisplayName="$Resources:Project.Player, Column_Message_DisplayName;" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="Body">
      </Field>

When a user types something like this inside the multiline textbox:

Lorem Ipsum Lorem Ipsum Lorem IpsumLorem Ipsum Lorem IpsumLorem IpsumLorem IpsumLorem Ipsum Lorem IpsumLorem IpsumLorem Ipsum.

Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem IpsumLorem IpsumLorem IpsumLorem Ipsum.

When it gets displayed it shows up like this:

Lorem Ipsum Lorem Ipsum Lorem IpsumLorem Ipsum Lorem IpsumLorem IpsumLorem IpsumLorem Ipsum Lorem IpsumLorem IpsumLorem Ipsum. Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem IpsumLorem IpsumLorem IpsumLorem Ipsum.

Is there any good solutions to fix this so the text that gets typed inside the multiline textbox gets displayed as the same?

Thanks!

0

both ways are using sharepoint designer!

1.Open the page in SPD.

2.Conver into XSLT Data View.

3.Select the cell in the table and right click you will find the option Table Properties click on Table Properties

4.Opens Table Properties window, under Layout section check the Specify Width check box and give the width in pixels or in percentages.

5.Then Apply and OK

if not

Using xslt functionality to change all line break to.For example your original text is:

<xsl:value-of select="@Column_Name" escaping="yes"></xsl:value-of>

Replace it to:

<xsl:call-template name="breakitemdesc"></xsl:call-template>

Add below to the beginning of the other or after of the section:

<xsl:template name="breakitemdesc">
<xsl:param name="text" select="@item_x0020_Description"/>
<xsl:choose>
<xsl:when test="contains($text, ' ')">
<xsl:value-of select="substring-before($text, ' ')"/>
<br/>
<xsl:call-template name="breakitemdesc">
<xsl:with-param name="text" select="substring-after($text,' ')"/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$text"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>

http://social.msdn.microsoft.com/Forums/sharepoint/en-US/9a58177f-f135-492b-97df-c6c70086c2d3/sharepoint-designer-show-line-break-for-multi-text-plain-text

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.