MyBB Community Forums

Full Version: Embed editable Google Docs
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
It's actually pretty simple to embed an editable Google Docs document into your post. You just use iframe.

For this Mycode, I'm using the Easy MyCodes plugin from MyBB Hacks. This plugin makes it simpler to create custom MyCodes by removing the need to use regular expressions.

So, once you have that plugin installed, go and add a new Mycode by going to Configuration, then MyCode in your AdminCP.

[Image: uH5rc.png]

In the MyCode Pattern section, enter:
[doc]{URL}[/doc]

And then in the Replacement section, add:
<div style="border:2px solid #356795;"><IFRAME src="$1" width="98%" height="600" scrolling="no" frameborder="0">[Your browser does not support frames or is currently configured not to display frames. Please use an up-to-date browser that is capable of displaying frames.]</IFRAME></div>

Of course, you can adjust the width, border, height, etc., to suit your needs. You can also subsitute the [doc] tag with whatever you would like to use for the tag.

Now, to use the code in a post, simply type:
[doc]your_google_doc_url[/doc]

Also, make sure to set your Google Doc document so that anyone with the link can see it, and set it to be editable by others if you want others to be able to edit it.

That's cool. I love collaboration tools. Smile