[ Index ] |
PHP Cross Reference of Joomla 4.2.2 documentation |
[Summary view] [Print] [Text view]
1 (function () { 2 'use strict'; 3 4 /** 5 * @copyright (C) 2018 Open Source Matters, Inc. <https://www.joomla.org> 6 * @license GNU General Public License version 2 or later; see LICENSE.txt 7 */ 8 (function () { 9 var options = window.Joomla.getOptions('xtd-readmore'); 10 11 window.insertReadmore = function (editor) { 12 if (!options) { 13 // Something went wrong! 14 throw new Error('XTD Button \'read more\' not properly initialized'); 15 } 16 17 var content = window.Joomla.editors.instances[editor].getValue(); 18 19 if (!content) { 20 Joomla.editors.instances[editor].replaceSelection('<hr id="system-readmore">'); 21 } else if (content && !content.match(/<hr\s+id=("|')system-readmore("|')\s*\/*>/i)) { 22 Joomla.editors.instances[editor].replaceSelection('<hr id="system-readmore">'); 23 } else { 24 // @todo replace with joomla-alert 25 alert(options.exists); 26 return false; 27 } 28 29 return true; 30 }; 31 })(); 32 33 })();
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Wed Sep 7 05:41:13 2022 | Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer |