PHP Classes

File: public/js/tinymce/src/plugins/preview/src/main/js/ui/Dialog.js

Recommend this page to a friend!
  Classes of Abed Nego Ragil Putra   GoLavaCMS   public/js/tinymce/src/plugins/preview/src/main/js/ui/Dialog.js   Download  
File: public/js/tinymce/src/plugins/preview/src/main/js/ui/Dialog.js
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: GoLavaCMS
Publish content on Web pages with SEO support
Author: By
Last change:
Date: 6 years ago
Size: 1,333 bytes
 

Contents

Class file image Download
/** * Dialog.js * * Released under LGPL License. * Copyright (c) 1999-2017 Ephox Corp. All rights reserved * * License: http://www.tinymce.com/license * Contributing: http://www.tinymce.com/contributing */ define( 'tinymce.plugins.preview.ui.Dialog', [ 'tinymce.core.Env', 'tinymce.core.util.Tools', 'tinymce.plugins.preview.api.Settings', 'tinymce.plugins.preview.ui.IframeContent' ], function (Env, Tools, Settings, IframeContent) { var open = function (editor) { var sandbox = !Env.ie; var dialogHtml = '<iframe src="javascript:\'\'" frameborder="0"' + (sandbox ? ' sandbox="allow-scripts"' : '') + '></iframe>'; var dialogWidth = Settings.getPreviewDialogWidth(editor); var dialogHeight = Settings.getPreviewDialogHeight(editor); editor.windowManager.open({ title: 'Preview', width: dialogWidth, height: dialogHeight, html: dialogHtml, buttons: { text: 'Close', onclick: function (e) { e.control.parent().parent().close(); } }, onPostRender: function (e) { var iframeElm = e.control.getEl('body').firstChild; IframeContent.injectIframeContent(editor, iframeElm, sandbox); } }); }; return { open: open }; } );