How I can embed Google Docs in my website? - html

How I can embed Google Docs in my website to use it like an editor?

If you just want to use the editing components (bold, italic, etc. such as the ones above this answer form) then a good option is to use TinyMCE. It's free, cross-browser compatible and available here: http://tinymce.moxiecode.com/ .
It's made in javascipt (a jQuery version is available), and what it does is wrap words (or characters) in html friendly tags, such as <strong> for bold, <em> for italic etc. When you want to change colours or the like the selection will be put in a <span> tag, so will not break your paragraph flow.
The total selection of options is very large, but can be customised to your wishes. I personally recommend it, as its the best way to allow clients to edit content and save it in the database correctly.

You can use the Google Documents List API
The Google Documents List API allows
client applications to
programmatically access and manipulate
user data stored with Google
Documents.

Yes. Code to embed:
<iframe src="" width="640" height="718" frameborder="0" marginheight="0" marginwidth="0">Loading…</iframe>
Don’t forget to add
embedded=true
to the url.
(e.g. <iframe src=“https://docs.google.com/document/d/1f2YyognZrHKo0lGBiV2yMNW2Ojl0IG6gaNihURMxBsA/edit?embedded=true” width=“640” height=“718” frameborder=“0” marginheight=“0” marginwidth=“0”>Loading…</iframe>)

In my humble opinion, that is not possible. Usually google will announce an API if they want other developers to just use their editors. What you are asking is quite interesting - you want the google docs editor to open a file (not necessarily in google drive), and then to edit it and save it after user is done editing. You also want the feature of collaborative editing (I suppose) where several people can edit the same document.
But to make these things available to coders to embed in their websites, google has to entirely remove their authentication system from their editor and also the support for google drive and a lot of other stuff. Google will simple not do that because I believe it will be a negative impact on their business.
I will refer you here to some links which will help you find a good editor for yourself:
(For editing code): http://en.wikipedia.org/wiki/Comparison_of_JavaScript-based_source_code_editors
(For editing normal text): http://www.webdesignerdepot.com/2008/12/20-excellent-free-rich-text-editors/
But none of them will have the collaborative editing like google docs. I know, I am disappointed too. I too was searching for a text editor of such nature and couldn't find one.

Related

Looking for an existing iGoogle/OpenSocial gadget comparable to iGoogle's default native RSS gadget

iGoogle's standard RSS feed gadget is not OpenSocial, so it can't be embedded in other web sites. So I am hoping there is an alternative solution already available somewhere.
In iGoogle's gadget list there are other RSS gadgets, but none of them seem as nice as the default one by Google which is native to iGoogle.
The main difference between the standard gadget and most others is the ability to expand a headline and see more of the article by clicking the arrow next to the story. Also a clean layout.
It must be a widget/gadget that is OpenSocial compatible.
(I am aware that iGoogle will be closing, that is not relevant to my needs.)
MyYahoo:
Appears overall best alternative to iGoogle in terms of setup speed, "just working", and widgets for average or novice users.
appears not to import opml, but can support rss feeds
by hand can setup the same rss feeds as igoogle or netvibes
supports upto 9 tabs. every tab has an advertisement
only supports Yahoo search
appears no wikipedia search widget
good support for display of stock portfolio quotes in widgets provided by Yahoo
several good yahoo widgets provided, e.g. tv guide, local movies
can have different theme for each tab, or all the same.
can use uploaded image for wallpaper.
can make backgrounds transparent.
can set background and text colors for all parts of a theme, separately.
has spectrum chooser for colors. cannot type in hex codes.
very user friendly interface for configuring themes.
supports user-created applications (widgets) for MyYahoo tabs.
This is how to get started with it
Try Skim.Me as an alternative to embedding iGoogle's RSS gadget

How to add all of the websites Google has indexed to a Google Custom Search

I want to add all of the websites indexed by Google in a Google custom search. If I try to add sites manually from the Google custom search, it would take more than my life to include all of them.Is there any way I can do that with any trick? Thanks in advance.
I dont think that there is a solution to your question. Here is why:
Google provides their search tool in order to enable people to search their own site and a list of relevant sites of their choosing. However, if Google allowed you to use their entire search tool in your site then there would be no reason to visit Google anymore, thus their advertising revenue would plummet.
One of the things you could consider is choosing the sites that you want to add and then creating a script that will automatically add more sites based on what your users search for.
Where it says: Sites to search, don't go into the submenus for adding specific sites. There is a dropdown off to the side that will change from "Search Only Included Sites" to "Search Entire Web but emphasize included sites"
I think this may be what you're looking for:
http://www.google.com/cse/
According to google, all web search is not possible:
http://support.google.com/customsearch/bin/answer.py?hl=en&answer=1210656
However it is possible to include all know top-level domains to search engine.
Acording to:
http://support.google.com/customsearch/bin/answer.py?hl=en&answer=70322
it would be like: *.com, *.ch, *.pl and many more: http://en.wikipedia.org/wiki/List_of_Internet_top-level_domains
More importantly, if google forbids to perform all web search then any hack won't last long.

Embedding Google Calendar to a website the right way (HTML5, that is)

I pasted in the link to Google Calendar and it works as supposed to BUT VS got sad because the format doesn't follow the HTML5 standard. It truly doesn't, see for yourself.
[Attrocity from the past, inline attributes and other archaic exhibits](https://www.google.com/calendar/embed?showTitle=0&showDate=0&showCalendars=0&showTz=0&mode=WEEK&height=400&wkst=2&bgcolor=%23ffffff&src=konrad.viltersten%40gmail.com&color=%23182C57&src=etscb3ui6hjumgqu43ho71m7v8%40group.calendar.google.com&color=%23125A12&ctz=Europe%2FStockholm" style=" border-width:0 " width="600" height="400" frameborder="0" scrolling="no")
Can anything be done about it?
Apparently it's not such a big issue. Anyway, i've found an other service that integrates with Google Calender and provides much more settings options. It even includes a (limited) possibility to add one owns CSS styling to the embedded calender. And it's sort of free.
The name is "You can book me" and can be found here.

Prevent site configuration info from showing up on Google

I have a site that's running WordPress.
The main page has an embedded Flash player and an imbedded iframe, and for some reason, all the configuration info from the Flash player is showing up on Google for my site, and nothing else.
How can I have the main site information show up on Google, without having that Flash player config info show up?
And can I customize what shows up at all?
If there's some way to tag the info I don't want to show up, or tag the info I want to show up, I can probably do most ofthe edits myself, I just don't know where to start...
EDIT: I tried most of the suggestions below, and I didn't get anywhere...
Any other ideas?
Thanks a lot!
If you don't want Google, or other crawler to access certain parts of your website you should use a robots.txt file. Inside you specify which parts are accessible and which aren't, when the crawlers get to your website will always look for this file for instructions.
You can check some documentation on how to do it here and here
In order to influence what text is used on the google search result try putting this within your head tags
<meta name="description" content="WHATEVER YOU WANT DISPLAYED ON GOOGLE">
Source: http://static.googleusercontent.com/external_content/untrusted_dlcp/www.google.com/en/us/webmasters/docs/search-engine-optimization-starter-guide.pdf
Some more information from google on controling parts of a page. Apparently there are google off/google on tags.
http://perishablepress.com/press/2009/08/23/tell-google-to-not-index-certain-parts-of-your-page/
Hope this helps.
If you want Google to index only part of your pages, you can't follow normal SEO routines. You should provide a mechanism to understand whether the current client (requester) is a robot or not. If yes, then don't render that part. This is the only way. Otherwise, a robot either gets the whole rendered content, or doesn't have access based on robots.txt file (Robot Exclusion Protocol).
Another way (which is not really smart, and can't be guaranteed to work) is to dynamically inject your content into the page via JavaScript. Because AMAIK, robots don't run JavaScript.
As search spiders won't render javascript generated markup (JS is not run as it is client-side in the browser), a quick fix would be to don't output any of flash / markup initially in the HTML document and then use JS to add the flash stuff on load.
Note: as far as I'm aware, Google is currently testing a JS reading spider so this may not work long term.
Google is returning this data because it simply can't find any content where it normally would. Search engines require content - they're not advanced enough to process your multimedia to determine what it's all about.
Google will IGNORE your meta description if it doesn't feel that it reflects your page content (of which there is only iframes and JS)
Use SWFObject to provide alternate content for users without flash (including search engines) - ensure it's not some dinky text like "download flash here" - but a lengthy descriptive content piece about your site or media that they would normally experience if they could experience.
Use robots.txt or <meta name="robots" content="noindex,follow"> for the iframe content to prevent it from being indexed.
For the love of all things holy, please look at reducing the number of JS files and inline JS on your site (i'd recommend WP-minify since it's so obvious that you love plugins)

Cleaning up HTML from textarea

I have a page with two textareas, where registered users can fill them with HTML codes. First one has TinyMCE (so HTML is cleaned up), but the other one does not, since I expect the code to be inserted as embed codes from other sites (mostly sites that provide maps, e.g. Google Maps, MapMyRace.com, etc). But problem is that those other sites may provide different tags, not just <embed> or <iframe>. So I can't strip tags because then I might strip tags that I didn't know other sites provided. I will save the HTML in these two textareas into my database, to be retrieved and displayed as parts of some other pages.
Do you have any suggestions to make this setup more secure? Or should I disallow free input of HTML in the 2nd textarea altogether? (Or.. I let the users tick a check box saying "I accept full responsibility for the behavior of the code I am inserting".. LOL)
Your opinion is highly appreciated :)
Thanks
The short answer is : free HTML is insecure and must be avoided. Nothing blocks your user from creating an iframe that redirects the user to some harmful page or put ads on your page or deface your site.
My favorite approach to this problem is to allow the user to paste a link (no the "embed on page" iframe code) in a text box. Then I use regex to identify the pasted link (is it youtube, Bing maps, ...) and I create the HTML from the pasted link, which isn't too complex for most iframe providers. It's much more work for you, and it restricts the APIs you can put on your page, but it's secure.
Letting your users use arbitrary HTML is dangerous. You may want to have a black and white lists of tags that you disallow and allow (respectively).