<?php if(arg(0) == 'node' && arg(2) == 'gdoc') { // Editing ?> Cancel Editing <?php } else { // Viewing ?> Edit Google Doc <?php } ?>Edit Google Doc To get the proper editing link, I used the one given to me by the document when I click "Share". To get the viewing link, I had to publish the document to the Web and used the link in that dialog.
This proof of concept could be turned into a module that packages this functionality as a new Field API type, responding to viewing or editing modes by embedding the corresponding URL. For tighter integration with Drupal, several ideas some to mind:
Comments
That's a nice proof of concept, definitely spurs up some ideas... Keep up the good!
Of related interest: Embedded Google Docs Viewer, a Drupal 7 field formatter that renders an uploaded file using the GDocs Viewer.
Great job, can't wait to integrate D7 with Google Docs
This is amazing!
I go back and forth with WordPress and Drupal because I can get a WordPress site up in minutes and a Drupal site can take weeks. But I love Drupal.
Anyway, I've been working on my WordPress site thinking that the editing/formatting in Google Docs is SO much nicer than the WordPress editor that maybe I should find some way to use Google Docs as my posts. This would be PERFECT what you have created here.
Just wanted to chime in with my two cents worth!