Multi-Lines of Text Word Wrap

Home Forums Classic DFFS Multi-Lines of Text Word Wrap

Viewing 5 reply threads
  • Author
    Posts
    • #6211
      Kyle Vaske
      Participant

        How do you set up so that in Multi-Lines of Text field types, the text box wraps at a certain length of characters or when the width of the box has been reached? Currently it just continues to expand to the right for as long as you continue typing.

        I will attach a screenshot of what is happening.

      • #6221
        Alexander Bautz
        Keymaster

          Hi,
          You can try adding this to the custom CSS in the Misc tab:

          div.ms-rtestate-write{
          	max-width:400px;
          	word-wrap: break-word;
          }

          The class “ms-rtestate-write” is from the enhanced rich text field in SP2013 – use the developer tools (hit F12) to inspect the textarea (or div) to find the correct identifier.

          Alexander

        • #6232
          Kyle Vaske
          Participant

            Utilizing that CSS class, it restricts the width of the text box boundary, but now the text exceeds the boundary and just keeps going to the right. See screenshot attached. I am using SP2010 currently as well.

            Attachments:
          • #6313
            Alexander Bautz
            Keymaster

              I cannot recreate this issue so its hard to tell why this is happening. You must try to tinker with the CSS to see if you get the text to wrap properly.

              Alexander

            • #6332
              Alexander Bautz
              Keymaster

                Hi,
                After looking at it in your site I was able to recreate it. This is actually caused by the fact that the div (the textarea you write in) inherits from the side-by-side td where white-space:nowrap is configured.

                To correct this, you must add this to the appropriate field(s) in the “Field CSS” in the DFFS backend:

                div.ms-rtestate-write{
                white-space:normal !important;
                }

                Let me know if this helps,
                Alexander

              • #6333
                Kyle Vaske
                Participant

                  I have put this class into the “Field CSS” backend, and taken it out of the Misc tab and this still does not work, as it still expands to the right as far as needed. I will screenshot the configuration.

                  The first is the set up in the Field CSS tab, and the second is the Misc tab.

              Viewing 5 reply threads
              • You must be logged in to reply to this topic.