Re:Show HN: Wysihtml – Open-source rich text editor for web ...
by lhl on Thursday December 18, 2014 @10:50AM
(#8767787)
Wordpress has had this forever: http://codex.wordpress.org/Function_Reference/wpautop
Like most of WP, the code is ugly, but battle-tested.
Re:Show HN: Wysihtml – Open-source rich text editor for web ...
by olla on Thursday December 18, 2014 @10:52AM
(#8767799)
Configuring parser_rules for allowed tags can do a lot, but i think it would not be enough to disable linebreaks alltogether. Thanks for pointing this out. We will consider adding it to configuration.
I can do paragraphs by not manually breaking lines and instead select the second paragraph's content, then apply the "normal text" style, but this isn't exactly intuitive.
Or one could disallow further linebreaks and thus just create paragraphs when you're entering a linebreak.