Posted by Ruriko on January 30, 2012 at 6:22am
3 followers
Jump to:
| Project: | Feeds |
| Version: | 7.x-2.0-alpha4 |
| Component: | User interface |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Issue Summary
I want to be able to choose an input filter when I import. How can I do this? especially when I'm importing HTML to a custom a field
Comments
#1
Feeds does allow to set the node body format, but I don't think Feeds supports setting a custom field's format.
If you are familiar with writing a custom module, try the suggestions in this issue: #1191184: Feed items created with 'Plain text' input format by default
This code is from comment #3 in the issue I mentioned:
<?phpfunction yourmodulename_node_presave($node) {
//
// Workaround for Feeds module setting text format to Plain Text instead of Full HTML or Filtered HTML
//
if ($node->type == 'feed_whoi') {
$node->body['und'][0]['format'] = 'full_html';
}
}
?>
Replace your node type where it says
feed_whoiand replace the$node->body...with something like$node->field_CUSTOMFIELDNAME['und'][0]['format'] = 'full_html';.