As a webmaster, how can I allow Blogger users to embed my content on their blogs?
I tried the following solution - simple button redirecting to:
https://www.blogger.com/blog-this.g?u=[ MY URL ]&t=[ MY WIDGET CODE ]
with tag inside [ MY WIDGET CODE ]
.
I encountered two problems:
the <script>
tag seems to be erased automatically from proposed post content
even if user copies and pastes the script, it only works after publication - so user is unable to see how is it going to look like in the preview
Thanks in advance for any tips :)
Note: I know it is probably a security issue, but if blogger is able to post content with scripts then why isn't he able to preview them?
Adding widgetsLog in to your Blogger account. Choose where you'd like to place your widget and click Add a Gadget. Scroll down to "HTML/JavaScript" and click the + icon to the right. Copy your widget code from the Branded Web Manager and paste it into the HTML/JavaScript box along with a title.
Step 1 – Choose HTML as website platform and set the width and height of the widget as per your requirement. Step 2 – Now, Copy the generated embed code displaying on the screen. Step 3 – Then open the backend of your HTML website and Paste the embed code into the webpage where you want to embed the widget.
If your problem is that script tags are erased then you can make a js file and host it on google drive or any other servers you like and link this js to your blog template. I used this approach for third party plugins like codehighlighter and it works. You can see http://a2znotes.blogspot.com
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With