PHP Classes

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

Recommend this page to a friend!
  Classes of Abed Nego Ragil Putra   GoLavaCMS   public/js/tinymce/src/plugins/codesample/src/main/js/ui/Dialog.js   Download  
File: public/js/tinymce/src/plugins/codesample/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,842 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.codesample.ui.Dialog', [ 'tinymce.plugins.codesample.api.Settings', 'tinymce.plugins.codesample.core.CodeSample', 'tinymce.plugins.codesample.core.Languages' ], function (Settings, CodeSample, Languages) { return { open: function (editor) { var minWidth = Settings.getDialogMinWidth(editor); var minHeight = Settings.getDialogMinHeight(editor); var currentLanguage = Languages.getCurrentLanguage(editor); var currentLanguages = Languages.getLanguages(editor); var currentCode = CodeSample.getCurrentCode(editor); editor.windowManager.open({ title: "Insert/Edit code sample", minWidth: minWidth, minHeight: minHeight, layout: 'flex', direction: 'column', align: 'stretch', body: [ { type: 'listbox', name: 'language', label: 'Language', maxWidth: 200, value: currentLanguage, values: currentLanguages }, { type: 'textbox', name: 'code', multiline: true, spellcheck: false, ariaLabel: 'Code view', flex: 1, style: 'direction: ltr; text-align: left', classes: 'monospace', value: currentCode, autofocus: true } ], onSubmit: function (e) { CodeSample.insertCodeSample(editor, e.data.language, e.data.code); } }); } }; } );