PHP Classes

File: WITheme/WICMS/admin/js/plugins/textEditor/tinymce_4.2.6_dev/tinymce/js/tinymce/classes/ui/Iframe.js

Recommend this page to a friend!
  Classes of Jules Warner   WICMS   WITheme/WICMS/admin/js/plugins/textEditor/tinymce_4.2.6_dev/tinymce/js/tinymce/classes/ui/Iframe.js   Download  
File: WITheme/WICMS/admin/js/plugins/textEditor/tinymce_4.2.6_dev/tinymce/js/tinymce/classes/ui/Iframe.js
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: WICMS
Database driven content management system with PDO
Author: By
Last change:
Date: 7 years ago
Size: 1,827 bytes
 

Contents

Class file image Download
/** * Iframe.js * * Released under LGPL License. * Copyright (c) 1999-2015 Ephox Corp. All rights reserved * * License: http://www.tinymce.com/license * Contributing: http://www.tinymce.com/contributing */ /*jshint scripturl:true */ /** * This class creates an iframe. * * @setting {String} url Url to open in the iframe. * * @-x-less Iframe.less * @class tinymce.ui.Iframe * @extends tinymce.ui.Widget */ define("tinymce/ui/Iframe", [ "tinymce/ui/Widget" ], function(Widget) { "use strict"; return Widget.extend({ /** * Renders the control as a HTML string. * * @method renderHtml * @return {String} HTML representing the control. */ renderHtml: function() { var self = this; self.classes.add('iframe'); self.canFocus = false; /*eslint no-script-url:0 */ return ( '<iframe id="' + self._id + '" class="' + self.classes + '" tabindex="-1" src="' + (self.settings.url || "javascript:\'\'") + '" frameborder="0"></iframe>' ); }, /** * Setter for the iframe source. * * @method src * @param {String} src Source URL for iframe. */ src: function(src) { this.getEl().src = src; }, /** * Inner HTML for the iframe. * * @method html * @param {String} html HTML string to set as HTML inside the iframe. * @param {function} callback Optional callback to execute when the iframe body is filled with contents. * @return {tinymce.ui.Iframe} Current iframe control. */ html: function(html, callback) { var self = this, body = this.getEl().contentWindow.document.body; // Wait for iframe to initialize IE 10 takes time if (!body) { setTimeout(function() { self.html(html); }, 0); } else { body.innerHTML = html; if (callback) { callback(); } } return this; } }); });