2011-07-16, 07:11 AM
Pages: 1 2
2011-07-16, 09:37 PM
So we have this:
Document Link:
Embed Code:
Here we go:
Regular Expression:
Replacement:
Example:
Hope it helps.
Document Link:
https://docs.google.com/document/pub?id=1k822aIv0GDbe_trv7MODDJ0Rf-sDb-DqAsb4gN1hqyY
Embed Code:
<iframe src="https://docs.google.com/document/pub?id=1k822aIv0GDbe_trv7MODDJ0Rf-sDb-DqAsb4gN1hqyY&embedded=true"></iframe>
Here we go:
Regular Expression:
\[gdoc\](https?\://[^\r\n"<>&]+?)\[/gdoc\]
Replacement:
<iframe src="$1" width="700px" height="300px"></iframe>
Example:
[gdoc]https://docs.google.com/document/pub?id=1k822aIv0GDbe_trv7MODDJ0Rf-sDb-DqAsb4gN1hqyY[/gdoc]
Hope it helps.
2011-07-17, 05:44 AM
where you find this code i only have code like this
https://docs.google.com/viewer?a=v&pid=explorer&chrome=true&srcid=1wvDPpnd0EcZWNSDX5kunKSKUjeQk-CwdmstCYX_SeJYDkO1zdb10-x4jR0tR&hl=hr
2011-07-17, 06:03 AM
I have never used Google Docs before and thought it was always the same code, maybe somebody can help more here
2011-07-17, 06:46 AM
yes,and thank you for trying
2011-08-14, 07:43 AM
Hi, I've tested this code and it works.
Regular Expression:
Replacement:
Example:
All you need is the ID, which can be obtained from any of the following(bold texts are the examples of the IDs):
https://docs.google.com/document/d/1apveaUwdaYevtuVIb8Q1vp4VTxyEejc22TAHLhaPSYw/edit?hl=en_US
https://docs.google.com/document/pub?id=1apveaUwdaYevtuVIb8Q1vp4VTxyEejc22TAHLhaPSYw
https://docs.google.com/viewer?a=v&pid=e...true&srcid=1wvDPpnd0EcZWNSDX5kunKSKUjeQk-CwdmstCYX_SeJYDkO1zdb10-x4jR0tR&hl=hr
Regular Expression:
\[gdoc](.*?)\[\/gdoc\]
Replacement:
<div class="codeblock">
<div class="title">Google Document:</div>
<div class="body">
<iframe src="https://docs.google.com/document/pub?id=$1" width="100%" height="300px"></iframe>
</div>
</div>
</div>
Example:
[gdoc]1k822aIv0GDbe_trv7MODDJ0Rf-sDb-DqAsb4gN1hqyY[/gdoc]
All you need is the ID, which can be obtained from any of the following(bold texts are the examples of the IDs):
https://docs.google.com/document/d/1apveaUwdaYevtuVIb8Q1vp4VTxyEejc22TAHLhaPSYw/edit?hl=en_US
https://docs.google.com/document/pub?id=1apveaUwdaYevtuVIb8Q1vp4VTxyEejc22TAHLhaPSYw
https://docs.google.com/viewer?a=v&pid=e...true&srcid=1wvDPpnd0EcZWNSDX5kunKSKUjeQk-CwdmstCYX_SeJYDkO1zdb10-x4jR0tR&hl=hr
2011-08-14, 07:48 AM
thank you works
2011-08-14, 09:08 AM
Glad I could help you, and for anyone who wants it as an install-able plugin, I've attached it in this post.
P.s. Currently waiting approval at the mods page.
Quote:A simple MyCode which able you to embed Google Docs into your posts easily.
Usage
-------
All you need is the ID. For example, these are the 3 links which can be found at the document you're viewing:
- Editing the document
https://docs.google.com/document/d/1apveaUwdaYevtuVIb8Q1vp4VTxyEejc22TAHLhaPSYw/edit?hl=en_US
OR
https://docs.google.com/viewer?a=v&pid=e...true&srcid=1wvDPpnd0EcZWNSDX5kunKSKUjeQk-CwdmstCYX_SeJYDkO1zdb10-x4jR0tR&hl=hr
OR
https://docs.google.com/leaf?id=0B6g1fNYZpYWvMWEwZDA0MzMtZmY0NC00NzhkLWI3ZGUtNmI1NTQxMDliNTY4&hl=en_US
- Publishing the document
https://docs.google.com/document/pub?id=1apveaUwdaYevtuVIb8Q1vp4VTxyEejc22TAHLhaPSYw
And the tag is:
[gdoc]ID[/gdoc]
P.s. Currently waiting approval at the mods page.
2011-09-28, 01:42 AM
ACROXX Does not work..nothing shows in firefox or IE. Set to public view a well.
http://www.bringit2u.com/forum/thread-5132.html
http://www.bringit2u.com/forum/thread-5132.html
2013-07-01, 04:31 PM
(2011-08-14, 07:43 AM)acrox999 Wrote: [ -> ]Hi, I've tested this code and it works.
It works, but replace in Replacement field:
https://docs.google.com/document/pub?id=$1
with
https://docs.google.com/file/d/$1
Pages: 1 2