3 * CKEditor 'templates' plugin admin behavior.
6 (function ($, Drupal, drupalSettings) {
11 * Provides the summary for the "templates" plugin settings vertical tab.
13 * @type {Drupal~behavior}
15 * @prop {Drupal~behaviorAttach} attach
16 * Attaches summary behaviour to the "templates" settings vertical tab.
18 Drupal.behaviors.ckeditorTemplatesSettingsSummary = {
20 $('[data-ckeditor-plugin-id="templates"]').drupalSetSummary(function (context) {
21 var templatePathValue = $('input[name="editor[settings][plugins][templates][template_path]').val();
22 var replaceContentValue = $('input[name="editor[settings][plugins][templates][replace_content]').is(':checked');
24 var templatePathOutput = templatePathValue ? 'Template file overridden.' : 'Default or theme template file.';
25 var replaceContentOutput = replaceContentValue ? '"Replace content" checked' : '"Replace content" unchecked';
27 return templatePathOutput + '<br />' + replaceContentOutput;
32 })(jQuery, Drupal, drupalSettings);