5

Im using the bootstrap-wysihtml5 rich text editor bootstrap-wysihtml5 which basically works as expected. However, I was wondering what would be the best approach to process the generated HTML output for inclusion into the DOM tree. The issue is that normal text input comes without a tag whereas all the other tags (h1, h2, ul, etc. are provided) which makes it difficult to take the output straight away.

Is there a way to avoid any additional processing? Or am I just missing the p-tags somewhere?

Jeromy French
  • 11,812
  • 19
  • 76
  • 129
tomw
  • 98
  • 1
  • 6

2 Answers2

1

For anybody finding here later (April 2015, Version 0.4.17): Just use the option

useLineBreaks : false

false means, every paragraph is properly and initially surrounded by <p>...</p>. Block commands are applied to that <p>.

true means, there is no initial <p>...</p> and block commands embrace with some <div>...</div> and more.

peter_the_oak
  • 3,529
  • 3
  • 23
  • 37
0

I tnik better to use is tinyMCE, workd great and every new line has <p> tag, you can also force him to not use <p>, just send false in init:)

Miomir Dancevic
  • 6,726
  • 15
  • 74
  • 142