Commit b8b97d1e authored by Robert Lyon's avatar Robert Lyon

Bug 1811284: Allow mathslate to work in https sites

Currently the template file for this has hardcoded http urls
We need to use a different template if the mahara site is https://

behatnotneeded

Change-Id: I6fbdf769efcbbafdf68af8b075573ba14ea16f43
Signed-off-by: Robert Lyon's avatarRobert Lyon <robertl@catalyst.net.nz>
parent 26c03520
......@@ -9,3 +9,4 @@ Changes:
* Adjusting the config.json options for uppercase Greek letters
* Adding the 'aria-hidden="true"' to presentation icons
* Removed target=_blank links
* Allowing mathslate to work under https:
<!DOCTYPE html>
<head>
<!--
* MathSlate editor popup.
*
* @package tinymcefour_mathslate
* @copyright 2013 Daniel Thies
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
-->
<script src="https://yui-s.yahooapis.com/3.14.1/build/yui/yui-min.js"></script>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML"> </script>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<link rel="stylesheet" type="text/css" href="https:./styles.css">
<script>
// Create a YUI sandbox on your page.
YUI().use('node', 'event', function (Y) {
// The Node and Event modules are loaded and ready to use.
// Your code goes here!
});
</script>
<script>
if (typeof M === "undefined") M={};
M.util=M.util||{};
M.util.image_url=M.util.image_url||function(image,module){
return 'https:'+(module=='tinymce_mathslate'?'./pix/':'../../pix/')+image+'.svg';
}
M.util.get_string = function(image,module){
return 'https:'+(module=='tinymce_mathslate'?'./pix/':'../../pix/')+image+'.svg';
}
M.tinymce_mathslate=M.tinymce_mathslate||{};
M.tinymce_mathslate.config="https:./config.json";
M.tinymce_mathslate.help="https:./help.html";
</script>
<script src="./strings.js"></script>
<script src="./yui/build/moodle-tinymce_mathslate-snippeteditor/moodle-tinymce_mathslate-snippeteditor-debug.js"> </script>
<script src="./yui/build/moodle-tinymce_mathslate-mathjaxeditor/moodle-tinymce_mathslate-mathjaxeditor-debug.js"> </script>
<script src="./yui/build/moodle-tinymce_mathslate-editor/moodle-tinymce_mathslate-editor-debug.js"> </script>
<script src="./yui/build/moodle-tinymce_mathslate-textool/moodle-tinymce_mathslate-textool-debug.js"> </script>
<script>
YUI().use('moodle-tinymce_mathslate-editor','moodle-tinymce_mathslate-textool', function (Y) {
MathJax.Hub.Queue(['Typeset',MathJax.Hub]);
var editor = new M.tinymce_mathslate.Editor('#editor',"https:./config.json");
Y.one('#editor').addClass('mathslate-tinymce');
var mathEditor = top.tinymce.activeEditor.windowManager.getParams();
mathEditor.output = function(format) { return editor.output(format); }
});
</script>
</head>
<body class="yui3-skin-sam">
<div id='editor' style="width: 500px"></div>
</body>
......@@ -18,13 +18,15 @@ tinymce.PluginManager.add('mathslate', function(editor,url) {
var win, mathEditor={output: null};
var slateurl = location.protocol == 'https:' ? '/mathslate-s.html' : '/mathslate.html';
win = editor.windowManager.open({
title: "Math Editor",
spacing: 10,
padding: 10,
width: 525,
height: 500,
url: url + '/mathslate.html',
url: url + slateurl,
buttons: [
{text: "Insert Inline", onclick: function() {
editor.execCommand('mceInsertContent',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment