Proyectos de Subversion Moodle

Rev

Autoría | Ultima modificación | Ver Log |

{"version":3,"file":"tinyconfig.min.js","sources":["../src/tinyconfig.js"],"sourcesContent":["// This file is part of Moodle - http://moodle.org/\n//\n// Moodle is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// Moodle is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.\n\n\n/**\n * @author     Andreas Grabs <moodle@grabs-edv.de>\n * @copyright  2024 Andreas Grabs\n * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\n\nimport fragment from 'core/fragment';\nimport notification from 'core/notification';\n\n/**\n * Get a configuration object for a specific tinymce editor element.\n *\n * @param {Integer} contextid\n * @param {String} targetid\n * @param {String} targetname\n * @param {Integer} draftitemid\n * @param {Integer} repeatindex\n * @returns {object} The tinymce configuration object\n */\nexport const getTinyConfig = (contextid, targetid, targetname, draftitemid, repeatindex) => {\n    const serviceparams = {\n        contextid: contextid,\n        targetid: targetid,\n        targetname: targetname,\n        draftitemid: draftitemid,\n        repeatindex: repeatindex\n    };\n    var fragmentpromise = fragment.loadFragment('mod_unilabel', 'get_tinyconfig', contextid, serviceparams);\n    return fragmentpromise.then(function(tinyconfig) {\n        return JSON.parse(tinyconfig);\n    }).fail(notification.exception);\n};\n"],"names":["contextid","targetid","targetname","draftitemid","repeatindex","serviceparams","fragment","loadFragment","then","tinyconfig","JSON","parse","fail","notification","exception"],"mappings":";;;;;kNAmC6B,CAACA,UAAWC,SAAUC,WAAYC,YAAaC,qBAClEC,cAAgB,CAClBL,UAAWA,UACXC,SAAUA,SACVC,WAAYA,WACZC,YAAaA,YACbC,YAAaA,oBAEKE,kBAASC,aAAa,eAAgB,iBAAkBP,UAAWK,eAClEG,MAAK,SAASC,mBAC1BC,KAAKC,MAAMF,eACnBG,KAAKC,sBAAaC"}