PHP Classes

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

Recommend this page to a friend!
  Classes of Abed Nego Ragil Putra   GoLavaCMS   public/js/tinymce/src/plugins/anchor/src/main/js/ui/Dialog.js   Download  
File: public/js/tinymce/src/plugins/anchor/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,149 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.anchor.ui.Dialog', [ 'tinymce.plugins.anchor.core.Anchor' ], function (Anchor) { var insertAnchor = function (editor, newId) { if (!Anchor.isValidId(newId)) { editor.windowManager.alert( 'Id should start with a letter, followed only by letters, numbers, dashes, dots, colons or underscores.' ); return true; } else { Anchor.insert(editor, newId); return false; } }; var open = function (editor) { var currentId = Anchor.getId(editor); editor.windowManager.open({ title: 'Anchor', body: { type: 'textbox', name: 'id', size: 40, label: 'Id', value: currentId }, onsubmit: function (e) { var newId = e.data.id; if (insertAnchor(editor, newId)) { e.preventDefault(); } } }); }; return { open: open }; } );