Embedding Google spreadsheet in post/thread.
Hello,
How do we go about embedding a google spreadsheet into a post/thread? Its an iframe code that google provides but I am not sure if I want to embed an iframe as I do know about the security flaws. Is there any other way I can embed it?
0
Comments
This is currently not possible.
Iframes shouldn't be allowed for users and as far as i know, there is no easy way to do so.
However, you can create a custom plugin, that allows iframes from google docs only:
public function base_links_handler($sender) { $args = &$sender->EventArguments; $args['Mixed'] = preg_replace( '/<a[^>]*href="https:\/\/docs\.google\.com\/spreadsheets\/d\/e\/([a-zA-Z0-9\-_]+)(.*)<\/a>/', '<iframe src="https://docs.google.com/spreadsheets/d/e/$1/pubhtml?widget=true&headers=false" style="width:100%;height:800px;"></iframe>', $args['Mixed'] ); }Where to add this? Check out:
https://docs.vanillaforums.com/developer/addons/addon-quickstart
and
https://open.vanillaforums.com/addon/638/example
My themes: pure | minusbaseline - My plugins: CSSedit | HTMLedit | InfiniteScroll | BirthdayModule | [all] - PM me about customizations
VanillaSkins.com - Plugins, Themes and Graphics for Vanillaforums OS
insecure but for personal or internal forum use:
you can do so by removing -iframe in library/core/class.vanillahtmlformatter.php on line 165