Code Monkey home page Code Monkey logo

iframed's Introduction

iFramed

An LWC component to embed a URL in an iframe with template syntax support

Usage

Builder

  1. Add the iFramed component to a page via Builder
  2. Set the URL to the URL you want to embed
  3. Optionally, set the parameters to the params you want to add
  4. Set the Height to the height of the iframe using css acceptable values (500px, 100%, 50vh, etc)
  5. Set the Width to the width of the iframe using css acceptable values (500px, 100%, 50vw, etc)

You use template syntax to pass in values from the current record e.g. https://www.google.com/search?q={Account.Name} or https://example.com/{Contact.ExternalId__c}

iFramed in Builder

Be sure the URL you are embedding is accessible from the Salesforce domain by adding the domain to the CSP Trusted Sites setting in Setup

Deployment

Deploy via Click

Deploy to Salesforce

Deploy via SFDX

Covert with SFDX; This creates a folder called deploy

sfdx force:source:convert -r force-app -d deploy

Now you can deploy from the resulting deploy directory

sfdx force:mdapi:deploy -d deploy -w -1 --verbose

๐Ÿ“Œ Above deploys to the default org set

  • Add -u [email protected] or -u alias to deploy else where
  • To run tests add -l RunSpecifiedTests -r ApexTestName

Results should more or less mirror below

Deploying metadata to me(a)jsmith.dev using the v57.0 SOAP API
Deploy ID: 0Af1U00001C8TTQSA3
DEPLOY PROGRESS | โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ | 3/3 Components

=== Deployed Source

 Type                     File                        Name        Id                 
 โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ 
                          zip/package.xml             package.xml                    
 ApexClass                zip/classes/Iframed.cls     Iframed     01p1U00000R33BiQAJ 
 ApexClass                zip/classes/IframedTest.cls IframedTest 01p1U00000R33BjQAJ 
 LightningComponentBundle zip/lwc/iframed             iframed     0Rb1U000000D4IpSAK 

Written with <3 by Jamie Smith

iframed's People

Contributors

jsmithdev avatar

Stargazers

Krystian Charubin avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.