Add Gleam Embedded Widget Code in the blog

Hi,

I'm trying to add a gleam Embedded Widget Code in the blog. Couldn't figure out how. Is it possible?

TIA

You can use key text for this:

Hi, Thanks for the response.

But the Gleam widget code is a HTML code and the ‘Key Text’ don’t output HTML.

"The Key Text field allows content writers to enter a single string.

This field will only outputs a string, it does not output any HTML. This makes it different from the Rich Text field which can output formatted HTML."

The link below has information about the widget code

I have tried Rick text but didn’t have any luck with it.

Thanks.

On the contrary :slightly_smiling_face:

Key text allows you to export a plain string of HTML that you can then use. You can inject the HTML like this (assuming you are using Vue.js):

<div v-html="slice.primary.gleam_embed" />

If you don't want to inject HTML (it's unsafe to do so), you can use Key Text to output just the Gleam link, and structure it later in your code:

image

<a class="e-widget no-button" :href="slice.primary.gleam_embed" rel="nofollow">
  {{ slice.primary.gleam_title }}
</a>
<script type="text/javascript" src="https://js.gleam.io/e.js" async="true"></script>

One question I do have though, how does Gleam know which thing to embed? Is it from the page URL, or does the script look for that 2lWbH code in the page? If it's from the page URL, then you could actually just have a checkbox with 'embed Gleam on this page' and do the whole thing from the code.


If all else fails, see this from the Gleam help page:

Note if using Wordpress.com you cannot embed Javascript. This means you will need to just link to the standalone landing page from your post.

1 Like

Like Marcello said you'll need to inject the html in to your application.

This is similar to how we recommend this in our article for custom embedding.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.