<commit_before>// ConfigureCKEditor.js
// the cookie getting parts from:
// From: https://docs.djangoproject.com/en/1.6/ref/contrib/csrf/
// And:  http://stackoverflow.com/questions/6506897/csrf-token-missing-or-incorrect-while-post-parameter-via-ajax-in-django

'use strict';

let $ = require('jquery');

let ConfigureCKEditor = function (editor, repositoryId) {
    let MiddlewareService = require('../services/middleware.service.js');

    editor.config.extraPlugins = 'uploadimage';
    editor.config.filebrowserUploadUrl = MiddlewareService.host() + '/repository/repositories/' + repositoryId + '/assets';
    editor.config.mathJaxLib = '//cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML';
};

module.exports = ConfigureCKEditor;<commit_msg>change ckeditor config to use /touchstone url (to match future qbank format)<commit_after>// ConfigureCKEditor.js

'use strict';

let $ = require('jquery');

let ConfigureCKEditor = function (editor, repositoryId) {
    let MiddlewareService = require('../services/middleware.service.js');

    editor.config.extraPlugins = 'uploadimage';
    editor.config.filebrowserUploadUrl = MiddlewareService.secureHost() + '/repository/repositories/' + repositoryId + '/assets';
    editor.config.mathJaxLib = '//cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML';
};

module.exports = ConfigureCKEditor;
{'fraction_non_alphanumeric': 0.14641288433382138, 'fraction_numerical': 0.006588579795021962, 'mean_word_length': 4.7923728813559325, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2963072', 'n_tokens_mistral': 441, 'n_tokens_neox': 421, 'n_words': 69}