Commit 0201d72c authored by Robert Lyon's avatar Robert Lyon Committed by Cecilia Vela Gurovic
Browse files

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://


Change-Id: I6fbdf769efcbbafdf68af8b075573ba14ea16f43
Signed-off-by: Robert Lyon's avatarRobert Lyon <>
(cherry picked from commit b8b97d1e)
parent c0da1756
......@@ -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>
* MathSlate editor popup.
* @package tinymcefour_mathslate
* @copyright 2013 Daniel Thies
* @license GNU GPL v3 or later
<script src=""></script>
<script type="text/javascript" src="//"> </script>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<link rel="stylesheet" type="text/css" href="https:./styles.css">
// 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!
if (typeof M === "undefined") M={};
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';
<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>
YUI().use('moodle-tinymce_mathslate-editor','moodle-tinymce_mathslate-textool', function (Y) {
var editor = new M.tinymce_mathslate.Editor('#editor',"https:./config.json");'#editor').addClass('mathslate-tinymce');
var mathEditor = top.tinymce.activeEditor.windowManager.getParams();
mathEditor.output = function(format) { return editor.output(format); }
<body class="yui3-skin-sam">
<div id='editor' style="width: 500px"></div>
......@@ -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 ={
title: "Math Editor",
spacing: 10,
padding: 10,
width: 525,
height: 500,
url: url + '/mathslate.html',
url: url + slateurl,
buttons: [
{text: "Insert Inline", onclick: function() {
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