diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2008-09-27 19:47:43 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2008-09-27 19:47:43 +0000 |
commit | 4a0e68e838bd44f431747116073cec1bd5b07ba0 (patch) | |
tree | 790251ef055ee2d22b06ebef15e39a1a0dda4af8 /modules/node | |
parent | 289b4f77a62b3eb1b598f75c0107d6a326061606 (diff) | |
download | brdo-4a0e68e838bd44f431747116073cec1bd5b07ba0.tar.gz brdo-4a0e68e838bd44f431747116073cec1bd5b07ba0.tar.bz2 |
#125315 by chx, sun, Gábor Hojtsy, drumm, and friends: Add #input_format FAPI property that can be used by WYSIWYG editors. WOOHOO.
Diffstat (limited to 'modules/node')
-rw-r--r-- | modules/node/node.module | 2 | ||||
-rw-r--r-- | modules/node/node.pages.inc | 3 |
2 files changed, 2 insertions, 3 deletions
diff --git a/modules/node/node.module b/modules/node/node.module index e32f6eaa3..8f6031cf3 100644 --- a/modules/node/node.module +++ b/modules/node/node.module @@ -858,6 +858,7 @@ function node_submit($node) { // module-provided 'teaser' form item). if (!isset($node->teaser)) { if (isset($node->body)) { + $node->format = (!empty($node->body_format) ? $node->body_format : FILTER_FORMAT_DEFAULT); $node->teaser = node_teaser($node->body, isset($node->format) ? $node->format : NULL); // Chop off the teaser from the body if needed. The teaser_include // property might not be set (eg. in Blog API postings), so only act on @@ -938,7 +939,6 @@ function node_save(&$node) { $node->changed = REQUEST_TIME; $node->timestamp = REQUEST_TIME; - $node->format = isset($node->format) ? $node->format : FILTER_FORMAT_DEFAULT; $update_node = TRUE; // Generate the node table query and the node_revisions table query. diff --git a/modules/node/node.pages.inc b/modules/node/node.pages.inc index 1fb688ab6..6f48a74ab 100644 --- a/modules/node/node.pages.inc +++ b/modules/node/node.pages.inc @@ -296,10 +296,9 @@ function node_body_field(&$node, $label, $word_count) { '#default_value' => $include ? $node->body : ($node->teaser . $node->body), '#rows' => 20, '#required' => ($word_count > 0), + '#input_format' => isset($node->format) ? $node->format : FILTER_FORMAT_DEFAULT, ); - $form['format'] = filter_form($node->format); - return $form; } |