Hello.

I wanna Ajax edit to node title and node body field.

I have tryed this and still worked.
but I think this is not smart. because 1. need module_hook 2.Can't use wsywig editer 3.html tag to urlencoding

/**
 * Implementation of hook_nodeapi()
 **/
function hook_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL) {
  switch($op) {
    case 'view':
          $node->content['jeditable_body']['#prefix'] = '<span id="node-'.$node->nid.'-body" class="jeditable-textarea">';
          $node->content['jeditable_body']['#value'] = strip_tags($node->content['body']['#value']);
          $node->content['jeditable_body']['#suffix'] = '</span>';
  }
}

This is very good module!
Thank you!

Comments

Dave.Ingram’s picture

I fully agree that this is not idea. I'm glad that the above code is working for you. I actually added that in there as I thought it would be handy, but I didn't thoroughly test editing the body or title field of nodes.

The main feature that's needed for the body is the ability to change your formatter. Also, wysiwyg is tricky for this and probably won't happen in this module. There are plans brewing for the D7 inline editing module which would provide for wysiwyg and due to the new fields API would be able to do a lot more than what this module is doing. That may be a little time coming yet, and of course will mean a D7 upgrade. But it's coming.

kevin.mcnamee@mailbox.org’s picture

Assigned: » Unassigned