Closed (won't fix)
Project:
Wysiwyg
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
2 Mar 2010 at 21:13 UTC
Updated:
2 Mar 2010 at 23:14 UTC
For node types article (=story) and blog I need to convert all line breaks in database body field, all \n and \n\n ... to
and
and so on.
Where can this replacement be done in PHP? hook_form_alter or where is the place to input this code? Some code examples? Thanx.
Comments
Comment #1
drupalfan2 commentededit:
... convert to
<br /> and <p>Comment #2
twodSee my reply in #730542: Newline conversion for Filtered HTML for a link to a snippet you can run to fix all body fields (including teasers) without having to implement a hook and have it run each time.
We won't put PHP code like that in Wysiwyg module to run on each WYSIWYG-enabled field because we can't know the location of all of them. We'd need to target the standard node fields, CCK and every other field where markup content could possibly exist- by all modules out there.