Skip to Content Skip to Menu

Enabling Embed Code Storage in Community Builder Fields

  • 4creator
  • 4creator
  • OFFLINE
  • Posts: 43
  • Thanks: 6
  • Karma: 1
  • Add-ons
1 year 5 days ago #335923 by 4creator
Hello,

Is there a way to allow the storage of embed codes in fields created with Community Builder?
While I can display the Apple Music preview player on the TinyMCE editor by enabling iframe usage in Joomla and TinyMCE, the embed codes disappear from the editor upon saving the profile. If possible, I would like to input and save embed codes via a Text Area instead of an Editor Text Area.

Below is a sample of the embed codes:
Code:
<iframe id="embedPlayer" src="https://embed.music.apple.com/jp/album/blow-by-blow/158639291?app=music&amp;itsct=music_box_player&amp;itscg=30200&amp;ls=1&amp;theme=auto" height="450px" frameborder="0" sandbox="allow-forms allow-popups allow-same-origin allow-scripts allow-top-navigation-by-user-activation" allow="autoplay *; encrypted-media *; clipboard-write" style="width: 100%; max-width: 660px; overflow: hidden; border-radius: 10px; transform: translateZ(0px); animation: 2s 6 loading-indicator; background-color: rgb(228, 228, 228);"></iframe>

Thanks

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48536
  • Thanks: 8290
  • Karma: 1445
1 year 5 days ago #335928 by krileon
Use a Custom HTML field, which don't do any content filtering beyond whatever filtering your WYSIWYG editor does. I do not recommend letting users add iframes to editor text area fields as you're basically adding a security vulnerability to your site by doing so, but if you insist on doing this you can adjust "Exclude Tags from Filtering" in CB > Configuration > User Profile.

If you specifically need to allow embedding an apple music player from a specific album then you put 99% of the iframe in a Custom HTML field and give users a field to supply the album. You then substitute in the album into your Custom HTML field. This is the safer more secure way of doing this.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
The following user(s) said Thank You: 4creator

Please Log in or Create an account to join the conversation.

  • 4creator
  • 4creator
  • OFFLINE
  • Posts: 43
  • Thanks: 6
  • Karma: 1
  • Add-ons
1 year 4 days ago #335939 by 4creator
Actually I was aware of the existence of custom HTML but did not understand how to use it. I will try to follow your advice!

Thank you so much!!

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum