PHP Classes

File: public/js/tinymce/src/plugins/insertdatetime/src/main/js/api/Settings.js

Recommend this page to a friend!
  Classes of Abed Nego Ragil Putra   GoLavaCMS   public/js/tinymce/src/plugins/insertdatetime/src/main/js/api/Settings.js   Download  
File: public/js/tinymce/src/plugins/insertdatetime/src/main/js/api/Settings.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,255 bytes
 

Contents

Class file image Download
/** * Settings.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.insertdatetime.api.Settings', [ ], function () { var getDateFormat = function (editor) { return editor.getParam('insertdatetime_dateformat', editor.translate('%Y-%m-%d')); }; var getTimeFormat = function (editor) { return editor.getParam('insertdatetime_timeformat', editor.translate('%H:%M:%S')); }; var getFormats = function (editor) { return editor.getParam('insertdatetime_formats', ['%H:%M:%S', '%Y-%m-%d', '%I:%M:%S %p', '%D']); }; var getDefaultDateTime = function (editor) { var formats = getFormats(editor); return formats.length > 0 ? formats[0] : getTimeFormat(editor); }; var shouldInsertTimeElement = function (editor) { return editor.getParam('insertdatetime_element', false); }; return { getDateFormat: getDateFormat, getTimeFormat: getTimeFormat, getFormats: getFormats, getDefaultDateTime: getDefaultDateTime, shouldInsertTimeElement: shouldInsertTimeElement }; } );