CoreFiles by mySites.guru
admin-article-pagebreak.es6.js28 lines, 973 bytes, from Joomla_4.0.0-alpha6-Alpha-Full_Package.zip
Raw History Compare with 4.0.0-alpha5
md5
2a56be02316d48d80e060f3af13656b1
sha1
acb4812ae951e80048d30231c71d619fad68ec93
sha256
e866984795bf66292cff8d5c80cd01e9efb3be1c41176c62574479acf2097ad5
/**
 * @copyright  Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.
 * @license    GNU General Public License version 2 or later; see LICENSE.txt
 */

(() => {
  'use strict';

  window.insertPagebreak = (editor) => {
    // Get the pagebreak title
    let title = document.getElementById('title').value;

    if (!window.parent.Joomla.getOptions('xtd-pagebreak')) {
      // Something went wrong!
      window.parent.Joomla.Modal.getCurrent().close();
      return false;
    }

    // Get the pagebreak toc alias -- not inserting for now don't know which attribute to use..
    let alt = document.getElementById('alt').value;
    title = (title !== '') ? `title="${title}"` : '';
    alt = (alt !== '') ? `alt="${alt}"` : '';
    const tag = `<hr class="system-pagebreak" ${title} ${alt}>`;
    window.parent.Joomla.editors.instances[editor].replaceSelection(tag);
    window.parent.Joomla.Modal.getCurrent().close();
    return false;
  };
})();

The same content is in 2 releases, Joomla 4.0.0-alpha5 to 4.0.0-alpha6. See them all, or every version of this file.