diff --git a/README.md b/README.md index bcb4e62..1f29a0a 100644 --- a/README.md +++ b/README.md @@ -7,8 +7,14 @@ ## Introduction -The iframe module provides an IFrame page type that allows you to embed an IFrame into a page without resorting to -custom code. +The IFrame module provides an IFrame page type in the CMS which allows you to embed an IFrame into a page without +resorting to custom code in your templates or TinyMCE instance. + +This can help if you have `iframe` disabled in TinyMCE's [valid_elements](https://www.tiny.cloud/docs-3x/reference/configuration/Configuration3x@valid_elements/) +and do not want to to re-enable it in for a single/specific use-case. + +Various attributes of the IFrame can be controlled from CMS fields, such as size and content that surrounds the +IFrame itself. ## Requirements @@ -18,8 +24,13 @@ custom code. ## Installation -Run `composer require silverstripe/iframe`, then append dev/build?flush=all to the website URL in your -browser. e.g. http://mysite.test/dev/build?flush=all +Install with Composer: + +``` +composer require silverstripe/iframe +``` + +After installation, ensure you run `dev/build?flush` in either your browser or via command line. ## Instructions diff --git a/docs/en/userguide/index.md b/docs/en/userguide/index.md index 0c67780..0df2b3b 100644 --- a/docs/en/userguide/index.md +++ b/docs/en/userguide/index.md @@ -1,5 +1,5 @@ title: IFrame page -summary: Embed IFrames in your website without adding code +summary: Embed IFrames in your website without adding custom code # IFrame @@ -8,29 +8,31 @@ summary: Embed IFrames in your website without adding code * Create and modify an IFrame ## Before we begin -Make sure that your SilverStripe installation has the [IFrame](http://addons.silverstripe.org/add-ons/silverstripe/iframe) module installed. +Make sure that your SilverStripe installation has the [IFrame](https://addons.silverstripe.org/add-ons/silverstripe/iframe) module installed. This module provides a page type that you can use to embed IFrames in your website. ## Creating an IFrame -IFrame pages are created like any other page. When you create a new page, selected the **I Frame Page** from the list of available page types. +IFrame pages are created like any other page. When you create a new page, select the **IFrame Page** from the list of +available page types. -There are a few new fields on an IFrame page. +There are a few extra fields on an IFrame page which can help you to customise the IFrame that gets created on the +frontend of your website. -The most important is *Iframe URL*: this is the URL that wish you display inside the IFrame. This can be an absolute -path (ie, http://example.com/) or a relative path (ie, /about-us/). If it is a relative path then it will be assumed to -be from the root of your site (ie, http://mysite.com/about-us/). +The most important is *IFrame URL*: this is the URL that wish you display inside the IFrame. This can be an absolute +path (e.g. `http://example.com/`) or a relative path (e.g. `/about-us/`). If it is a relative path then it will be assumed to +be from the root of your site (e.g `http://mysite.com/about-us/`). -*Auto height* will change the height of the IFrame to match the total height of the remote page. +"Auto height" will change the height of the IFrame to match the total height of the remote page. _This will only work if the remote page is hosted on the same domain._ -If you check *Auto width* the IFrame will take up the entire width of the content area that it is in. +If you check "Auto width" the IFrame will take up the entire width of the content area that it is in. -You can manually set the height and width with the *Fixed height* and *Fixed width* fields. -The Auto width/height options must not be enabled for these fields to work. +You can manually set the height and width with the "Fixed height" and "Fixed width" fields. +The "Auto width/height" options must not be enabled for these fields to work. -The *Content* field has been broken up into three separate fields: one to display above the IFrame, one to display +The "Content" field has been broken up into three separate fields: one to display above the IFrame, one to display beneath the IFrame, and another to display instead of the IFrame if the user has disabled them. ## Known Issues diff --git a/license.md b/license.md index 8794670..a0faaad 100644 --- a/license.md +++ b/license.md @@ -1,4 +1,4 @@ -Copyright (c) 2017, SilverStripe Limited +Copyright (c) 2019, SilverStripe Limited All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: