code: private void appendText(String text) {
  
          if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(text)) {
              text = Translate.decode(text);
              text = collapse(text);
          }
          if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(text)) {
  
              if (m_storedBrCount > 0) {
                  m_appendBr = true;
                  appendLinebreak(m_storedBrCount);
              }
              appendIndentation();
              m_brCount = 0;
  
              List<String> wordList = CmsStringUtil.splitAsList(text, ' ');
              Iterator<String> i = wordList.iterator();
              while (i.hasNext()) {
                  String word = i.next();
                  boolean hasNbsp = ((word.charAt(0) == 160) || (word.charAt(word.length() - 1) == 160));
                  if ((word.length() + 1 + m_lineLength) > m_maxLineLength) {
                      m_appendBr = true;
                      appendLinebreak(1);
                      appendIndentation();
                      m_brCount = 0;
                  } else {
                      if (!hasNbsp
                          && (m_lineLength > m_indent)
                          && (m_result.charAt(m_result.length() - 1) != 160)
                          && (m_result.charAt(m_result.length() - 1) != 32)) {
  
                          m_result.append(' ');
                          m_lineLength++;
                      }
                  }
                  m_result.append(word);
                  m_lineLength += word.length();
              }
          }
      }
docs: Appends text.<p>
  
  @param text the text