remove old equation editor and related cruft
closes MAT-816 flag=none test plan: -confirm that you can use the new equation editor without issue -double check that I didn't miss any old equation editor related things that need to also be deleted Change-Id: I9b550aaae61701c1fc690b7e14df628055d16d59 Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/307642 Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com> Reviewed-by: Yona Appletree <yona.appletree@instructure.com> QA-Review: Yona Appletree <yona.appletree@instructure.com> Product-Review: Jake Oeding <jake.oeding@instructure.com>
This commit is contained in:
parent
c6f720cd2b
commit
289c5c310f
|
@ -313,8 +313,8 @@ class ApplicationController < ActionController::Base
|
|||
# put feature checks on Account.site_admin and @domain_root_account that we're loading for every page in here
|
||||
# so altogether we can get them faster the vast majority of the time
|
||||
JS_ENV_SITE_ADMIN_FEATURES = %i[
|
||||
featured_help_links lti_platform_storage scale_equation_images new_equation_editor buttons_and_icons_cropper
|
||||
calendar_series account_level_blackout_dates account_calendar_events rce_ux_improvements render_both_to_do_lists
|
||||
featured_help_links lti_platform_storage scale_equation_images buttons_and_icons_cropper calendar_series
|
||||
account_level_blackout_dates account_calendar_events rce_ux_improvements render_both_to_do_lists
|
||||
course_paces_redesign course_paces_for_students rce_better_paste
|
||||
].freeze
|
||||
JS_ENV_ROOT_ACCOUNT_FEATURES = %i[
|
||||
|
|
|
@ -1,105 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2012 - present Instructure, Inc.
|
||||
*
|
||||
* This file is part of Canvas.
|
||||
*
|
||||
* Canvas is free software: you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License as published by the Free
|
||||
* Software Foundation, version 3 of the License.
|
||||
*
|
||||
* Canvas is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
* A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
@import 'base/environment';
|
||||
|
||||
//mathquill.scss is just the stock mathquill.css file that comes with the
|
||||
//javascript library. we had to rename it to be an scss file because
|
||||
//sass can only import sass/scss files.
|
||||
@import 'vendor/mathquill.scss';
|
||||
|
||||
/*
|
||||
* instructure tweaks of stock mathquill styles
|
||||
*/
|
||||
|
||||
@font-face {
|
||||
font-family: Symbola;
|
||||
src: url(/fonts/Symbola.eot);
|
||||
src: local("Symbola Regular"),
|
||||
local("Symbola"),
|
||||
url(/fonts/Symbola.ttf) format("truetype"),
|
||||
url(/fonts/Symbola.otf) format("opentype"),
|
||||
url(/fonts/Symbola.svg#webfont7MzkO3xs) format("svg");
|
||||
}
|
||||
|
||||
div.math-dialog {
|
||||
z-index: 10001 !important;
|
||||
|
||||
& > span {
|
||||
padding: 0 !important;
|
||||
}
|
||||
}
|
||||
|
||||
.mathquill-editor {
|
||||
font-size: 1.5em;
|
||||
// the editable area gets an active blue glow so it looks wierd if there is white space between
|
||||
// it and the buttonpane
|
||||
margin-bottom: -5px;
|
||||
min-height: 247px;
|
||||
margin-#{direction(left)}: 5px;
|
||||
width: 96%;
|
||||
}
|
||||
|
||||
.mathquill-rendered-math {
|
||||
sup {
|
||||
top: auto;
|
||||
}
|
||||
}
|
||||
//undo the padding added by .ui-dialog
|
||||
.mathquill-toolbar {
|
||||
margin-#{direction(left)}: -1em !important;
|
||||
margin-#{direction(right)}: -1em !important;
|
||||
}
|
||||
|
||||
.mathquill-toolbar-panes {
|
||||
background: #ccc url(/images/tinybg.png) repeat-x top left;
|
||||
}
|
||||
.mathquill-tab-pane li {
|
||||
background: #ccc url(/images/tinybutton.png) repeat-x top left;
|
||||
font-size: 1.52em;
|
||||
}
|
||||
.mathquill-tab-pane li a:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.mathquill-editable .textarea textarea {
|
||||
z-index: inherit; /* so that jquery modal dialogs don't cancel its events */
|
||||
}
|
||||
|
||||
#mathjax-editor {
|
||||
width: 95%;
|
||||
min-height: 100px;
|
||||
margin: 0px 10px;
|
||||
}
|
||||
|
||||
#mathjax-preview, .MathJax_Display {
|
||||
min-height: 100px;
|
||||
}
|
||||
|
||||
#mathjax-message {
|
||||
min-height: 20px;
|
||||
}
|
||||
|
||||
.math-toggle {
|
||||
text-align: direction(right);
|
||||
padding-#{direction(right)}: 10px;
|
||||
}
|
||||
|
||||
#mathquill-view, #mathjax-view {
|
||||
min-height: 403px;
|
||||
}
|
|
@ -1,502 +0,0 @@
|
|||
/*
|
||||
* LaTeX Math in pure HTML and CSS -- No images whatsoever
|
||||
* v0.xa
|
||||
* by Jay and Han
|
||||
* Lesser GPL Licensed: http: //www.gnu.org/licenses/lgpl.html
|
||||
*
|
||||
* This file is automatically included by mathquill.js
|
||||
*
|
||||
*/
|
||||
|
||||
.mathquill-editable,
|
||||
.mathquill-rendered-math,
|
||||
.mathquill-rendered-math .cursor,
|
||||
.mathquill-rendered-math .underline,
|
||||
.mathquill-rendered-math .overline,
|
||||
.mathquill-rendered-math .font,
|
||||
.mathquill-rendered-math sup,
|
||||
.mathquill-rendered-math sub,
|
||||
.mathquill-rendered-math .fraction,
|
||||
.mathquill-rendered-math .sqrt-prefix,
|
||||
.mathquill-rendered-math .sqrt-stem,
|
||||
.mathquill-rendered-math .paren,
|
||||
.mathquill-rendered-math .array,
|
||||
.mathquill-rendered-math .block {
|
||||
display: -moz-inline-box;
|
||||
display: inline-block;
|
||||
padding-top: .075em;
|
||||
}
|
||||
.mathquill-editable, .mathquill-embedded-latex .mathquill-editable {
|
||||
border: 1px solid gray;
|
||||
padding: 2px;
|
||||
}
|
||||
.mathquill-embedded-latex .mathquill-editable {
|
||||
margin: 1px;
|
||||
}
|
||||
.mathquill-textbox {
|
||||
overflow-x: auto;
|
||||
overflow-y: hidden; /*so IE8 won't show a vertical scrollbar*/
|
||||
}
|
||||
|
||||
.mathquill-editable .textarea, .mathquill-rendered-math .textarea {
|
||||
position: relative;
|
||||
user-select: text;
|
||||
-moz-user-select: text;
|
||||
-webkit-user-select: text;
|
||||
}
|
||||
.mathquill-editable .textarea textarea, .mathquill-rendered-math .textarea textarea, .mathquill-rendered-math .selectable {
|
||||
position: absolute;
|
||||
clip: rect(1em 1em 1em 1em); /* the only way to hide the textarea *and the blinking insertion point* in IE */
|
||||
user-select: text;
|
||||
-moz-user-select: text;
|
||||
-webkit-user-select: text;
|
||||
}
|
||||
|
||||
.mathquill-editable .cursor {
|
||||
border-#{direction(left)}: 1px solid black;
|
||||
margin-#{direction(right)}: -1px;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
}
|
||||
.mathquill-editable .cursor.blink {
|
||||
visibility: hidden;
|
||||
}
|
||||
.mathquill-editable.empty:after, .mathquill-textbox:after, .mathquill-rendered-math .empty:after {
|
||||
visibility: hidden;
|
||||
content: 'c';
|
||||
}
|
||||
/*separated from above because unrecognized pseudoclasses invalidate the entire selector*/
|
||||
.mathquill-editable .cursor:only-child:after,
|
||||
.mathquill-editable .textarea+.cursor:last-child:after {
|
||||
visibility: hidden;
|
||||
content: 'c';
|
||||
}
|
||||
|
||||
.mathquill-rendered-math .matrixed {
|
||||
background: white;
|
||||
}
|
||||
|
||||
.mathquill-editable .selection,
|
||||
.mathquill-rendered-math .selection,
|
||||
.mathquill-editable .selection .mathquill-rendered-math,
|
||||
.mathquill-rendered-math .selection .underline,
|
||||
.mathquill-rendered-math .selection .overline,
|
||||
.mathquill-rendered-math .selection .font,
|
||||
.mathquill-rendered-math .selection sup,
|
||||
.mathquill-rendered-math .selection sub,
|
||||
.mathquill-rendered-math .selection .fraction,
|
||||
.mathquill-rendered-math .selection .sqrt-prefix,
|
||||
.mathquill-rendered-math .selection .sqrt-stem,
|
||||
.mathquill-rendered-math .selection .paren,
|
||||
.mathquill-rendered-math .selection .array,
|
||||
.mathquill-editable .selection .matrixed,
|
||||
.mathquill-rendered-math .selection .matrixed,
|
||||
.mathquill-rendered-math .selection .block {
|
||||
background: #B4D5FE;
|
||||
background: Highlight;
|
||||
color: HighlightText;
|
||||
border-color: HighlightText;
|
||||
}
|
||||
.mathquill-editable .selection.blur,
|
||||
.mathquill-rendered-math .selection.blur,
|
||||
.mathquill-editable .selection.blur .mathquill-rendered-math,
|
||||
.mathquill-rendered-math .selection.blur .underline,
|
||||
.mathquill-rendered-math .selection.blur .overline,
|
||||
.mathquill-rendered-math .selection.blur .font,
|
||||
.mathquill-rendered-math .selection.blur sup,
|
||||
.mathquill-rendered-math .selection.blur sub,
|
||||
.mathquill-rendered-math .selection.blur .fraction,
|
||||
.mathquill-rendered-math .selection.blur .sqrt-prefix,
|
||||
.mathquill-rendered-math .selection.blur .sqrt-stem,
|
||||
.mathquill-rendered-math .selection.blur .paren,
|
||||
.mathquill-rendered-math .selection.blur .array,
|
||||
.mathquill-editable .selection.blur .matrixed,
|
||||
.mathquill-rendered-math .selection.blur .matrixed,
|
||||
.mathquill-rendered-math .selection.blur .block {
|
||||
background: #D4D4D4;
|
||||
color: black;
|
||||
border-color: black;
|
||||
}
|
||||
.mathquill-editable .selection .selection.blur,
|
||||
.mathquill-rendered-math .selection .selection.blur,
|
||||
.mathquill-editable .selection .selection.blur .mathquill-rendered-math,
|
||||
.mathquill-rendered-math .selection .selection.blur .underline,
|
||||
.mathquill-rendered-math .selection .selection.blur .overline,
|
||||
.mathquill-rendered-math .selection .selection.blur .font,
|
||||
.mathquill-rendered-math .selection .selection.blur sup,
|
||||
.mathquill-rendered-math .selection .selection.blur sub,
|
||||
.mathquill-rendered-math .selection .selection.blur .fraction,
|
||||
.mathquill-rendered-math .selection .selection.blur .sqrt-prefix,
|
||||
.mathquill-rendered-math .selection .selection.blur .sqrt-stem,
|
||||
.mathquill-rendered-math .selection .selection.blur .paren,
|
||||
.mathquill-rendered-math .selection .selection.blur .array,
|
||||
.mathquill-editable .selection .selection.blur .matrixed,
|
||||
.mathquill-rendered-math .selection .selection.blur .matrixed,
|
||||
.mathquill-rendered-math .selection .selection.blur .block {
|
||||
background: #ABF;
|
||||
}
|
||||
.mathquill-editable .selection.blur .selection.blur,
|
||||
.mathquill-rendered-math .selection.blur .selection.blur,
|
||||
.mathquill-editable .selection.blur .selection.blur .mathquill-rendered-math,
|
||||
.mathquill-rendered-math .selection.blur .selection.blur .underline,
|
||||
.mathquill-rendered-math .selection.blur .selection.blur .overline,
|
||||
.mathquill-rendered-math .selection.blur .selection.blur .font,
|
||||
.mathquill-rendered-math .selection.blur .selection.blur sup,
|
||||
.mathquill-rendered-math .selection.blur .selection.blur sub,
|
||||
.mathquill-rendered-math .selection.blur .selection.blur .fraction,
|
||||
.mathquill-rendered-math .selection.blur .selection.blur .sqrt-prefix,
|
||||
.mathquill-rendered-math .selection.blur .selection.blur .sqrt-stem,
|
||||
.mathquill-rendered-math .selection.blur .selection.blur .paren,
|
||||
.mathquill-rendered-math .selection.blur .selection.blur .array,
|
||||
.mathquill-editable .selection.blur .selection.blur .matrixed,
|
||||
.mathquill-rendered-math .selection.blur .selection.blur .matrixed,
|
||||
.mathquill-rendered-math .selection.blur .selection.blur .block {
|
||||
background: #AAA;
|
||||
background: rgba(0, 0, 0, .15);
|
||||
}
|
||||
|
||||
.mathquill-editable, .mathquill-rendered-math {
|
||||
cursor: text;
|
||||
white-space: pre-wrap;
|
||||
font-family: Symbola, "Times New Roman", serif;
|
||||
}
|
||||
.mathquill-rendered-math {
|
||||
font-variant: normal;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
font-size: 115%;
|
||||
line-height: 1;
|
||||
}
|
||||
.mathquill-rendered-math var, .mathquill-rendered-math .text, .mathquill-rendered-math .nonSymbola {
|
||||
font-family: "Times New Roman", Symbola, serif;
|
||||
}
|
||||
.mathquill-rendered-math * {
|
||||
font-size: inherit;
|
||||
line-height: inherit;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border-color: black;
|
||||
user-select: none;
|
||||
-moz-user-select: none;
|
||||
-webkit-user-select: none;
|
||||
}
|
||||
.mathquill-editable.hasCursor,
|
||||
.mathquill-rendered-math .latex-command-input.hasCursor {
|
||||
border-color: ActiveBorder;
|
||||
}
|
||||
.mathquill-editable.hasCursor, .mathquill-editable .hasCursor {
|
||||
-webkit-box-shadow: #68B4DF 0 0 3px 2px;
|
||||
-moz-box-shadow: #68B4DF 0 0 3px 2px;
|
||||
box-shadow: #68B4DF 0 0 3px 2px;
|
||||
}
|
||||
|
||||
.mathquill-rendered-math .empty {
|
||||
background: #ccc;
|
||||
}
|
||||
.mathquill-rendered-math.empty {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.mathquill-rendered-math .text {
|
||||
font-size: 87%;
|
||||
}
|
||||
|
||||
.mathquill-rendered-math .font {
|
||||
font: 1em "Times New Roman", Symbola, serif;
|
||||
}
|
||||
.mathquill-rendered-math .font * {
|
||||
font-family: inherit;
|
||||
font-style: inherit;
|
||||
}
|
||||
|
||||
.mathquill-rendered-math b,
|
||||
.mathquill-rendered-math b.font {
|
||||
font-weight: bolder;
|
||||
}
|
||||
.mathquill-rendered-math var,
|
||||
.mathquill-rendered-math i,
|
||||
.mathquill-rendered-math i.font {
|
||||
font-style: italic;
|
||||
}
|
||||
.mathquill-rendered-math var.florin { /* florin looks so much better than italic f */
|
||||
margin: 0 -.1em;
|
||||
}
|
||||
|
||||
.mathquill-rendered-math big {
|
||||
font-size: 125%;
|
||||
}
|
||||
|
||||
.mathquill-rendered-math .roman {
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
.mathquill-rendered-math .sans-serif {
|
||||
font-family: sans-serif, Symbola, serif;
|
||||
}
|
||||
|
||||
.mathquill-rendered-math .monospace {
|
||||
font-family: monospace, Symbola, serif;
|
||||
}
|
||||
|
||||
.mathquill-rendered-math .overline {
|
||||
border-top: 1px solid black;
|
||||
margin-top: 1px;
|
||||
}
|
||||
.mathquill-rendered-math .underline {
|
||||
border-bottom: 1px solid black;
|
||||
margin-bottom: 1px;
|
||||
}
|
||||
|
||||
.mathquill-rendered-math sup, .mathquill-rendered-math sub {
|
||||
position: relative;
|
||||
font-size: 90%;
|
||||
}
|
||||
.mathquill-rendered-math sup {
|
||||
vertical-align: .5em;
|
||||
}
|
||||
.mathquill-rendered-math sub {
|
||||
vertical-align: -.4em;
|
||||
}
|
||||
.mathquill-rendered-math sup.nthroot {
|
||||
margin-#{direction(right)}: -.6em;
|
||||
margin-#{direction(left)}: .2em;
|
||||
min-width: .5em;
|
||||
}
|
||||
.mathquill-rendered-math sup.limit, .mathquill-rendered-math sub.limit,
|
||||
.mathquill-rendered-math sup.nthroot {
|
||||
font-size: 80%;
|
||||
}
|
||||
.mathquill-rendered-math sup.limit, .mathquill-rendered-math sup.nthroot {
|
||||
vertical-align: .8em;
|
||||
}
|
||||
.mathquill-rendered-math sub.limit {
|
||||
vertical-align: -.6em;
|
||||
}
|
||||
|
||||
.mathquill-rendered-math .binary-operator {
|
||||
padding: 0 .2em;
|
||||
}
|
||||
.mathquill-rendered-math .unary-operator {
|
||||
padding-#{direction(left)}: .2em;
|
||||
}
|
||||
.mathquill-rendered-math sup .binary-operator,
|
||||
.mathquill-rendered-math sub .binary-operator {
|
||||
padding: 0 .1em;
|
||||
}
|
||||
.mathquill-rendered-math sup .unary-operator,
|
||||
.mathquill-rendered-math sub .unary-operator {
|
||||
padding-#{direction(left)}: .1em;
|
||||
}
|
||||
|
||||
.mathquill-rendered-math .fraction {
|
||||
font-size: 90%;
|
||||
text-align: center;
|
||||
vertical-align: -.5em;
|
||||
padding: 0 .1em;
|
||||
}
|
||||
.mathquill-rendered-math .fraction, x:-moz-any-link { /* Firefox 2 (and older?) only */
|
||||
display: -moz-groupbox; /* because display:inline-block is FUBAR in Gecko < 1.9.0 */
|
||||
}
|
||||
.mathquill-rendered-math .fraction, x:-moz-any-link, x:default { /* Firefox 3+ (Gecko 1.9.0+) */
|
||||
display: inline-block;
|
||||
}
|
||||
.mathquill-rendered-math .numerator, .mathquill-rendered-math .denominator {
|
||||
display: block;
|
||||
padding-top: .075em;
|
||||
}
|
||||
.mathquill-rendered-math .numerator {
|
||||
padding-#{direction(left)}: .1em;
|
||||
padding-#{direction(right)}: .1em;
|
||||
}
|
||||
.mathquill-rendered-math .denominator {
|
||||
border-top: 1px solid;
|
||||
float: direction(right); /* take out of normal flow to manipulate baseline */
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.mathquill-rendered-math sup .fraction, .mathquill-rendered-math sub .fraction {
|
||||
font-size: 70%;
|
||||
vertical-align: -.4em;
|
||||
}
|
||||
.mathquill-rendered-math sup .numerator, .mathquill-rendered-math sub .numerator {
|
||||
padding-bottom: 0;
|
||||
}
|
||||
.mathquill-rendered-math sup .denominator, .mathquill-rendered-math sub .denominator {
|
||||
padding-top: 0;
|
||||
}
|
||||
|
||||
.mathquill-rendered-math .latex-command-input {
|
||||
color: inherit;
|
||||
font-family: "Courier New", monospace;
|
||||
border: 1px solid gray;
|
||||
padding-#{direction(right)}: 1px;
|
||||
margin-#{direction(right)}: 1px;
|
||||
margin-#{direction(left)}: 2px;
|
||||
}
|
||||
.mathquill-rendered-math .latex-command-input.empty {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.mathquill-rendered-math .sqrt-prefix {
|
||||
padding-top: 0;
|
||||
position: relative;
|
||||
top: .1em;
|
||||
vertical-align: top;
|
||||
-webkit-transform-origin: top;
|
||||
-moz-transform-origin: top;
|
||||
-ms-transform-origin: top;
|
||||
-o-transform-origin: top;
|
||||
transform-origin: top;
|
||||
}
|
||||
.mathquill-rendered-math .sqrt-stem {
|
||||
border-top: 1px solid;
|
||||
margin-top: 1px;
|
||||
padding-#{direction(left)}: .15em;
|
||||
padding-#{direction(right)}: .2em;
|
||||
margin-#{direction(right)}: .1em;
|
||||
}
|
||||
|
||||
.mathquill-rendered-math .paren {
|
||||
padding: 0 .1em;
|
||||
vertical-align: bottom;
|
||||
-webkit-transform-origin: bottom center;
|
||||
-moz-transform-origin: bottom center;
|
||||
-ms-transform-origin: bottom center;
|
||||
-o-transform-origin: bottom center;
|
||||
transform-origin: bottom center;
|
||||
}
|
||||
|
||||
.mathquill-rendered-math .array {
|
||||
vertical-align: middle;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.mathquill-rendered-math .array > span {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.mathquill-rendered-math .non-italicized-function {
|
||||
padding-#{direction(right)}: .2em;
|
||||
}
|
||||
|
||||
/*.mathquill-rendered-math .not {
|
||||
margin-#{direction(right)}: -.75em;
|
||||
}*/
|
||||
|
||||
|
||||
/*
|
||||
* editor/toolbar styles
|
||||
*/
|
||||
.mathquill-editor {
|
||||
padding: 10px;
|
||||
display: inline-block;
|
||||
}
|
||||
.mathquill-toolbar {
|
||||
font-family: sans-serif, Arial, Verdana;
|
||||
font-size: 1em;
|
||||
margin: 0 -4px 10px;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
z-index: 101;
|
||||
}
|
||||
.mathquill-tab-bar {
|
||||
padding: direction-sides(8px 8px 2px 16px);
|
||||
margin: 0 0 -2px;
|
||||
line-height: 1.5;
|
||||
font-size: 9pt;
|
||||
list-style: none;
|
||||
overflow: hidden;
|
||||
display: block;
|
||||
background: #aaa;
|
||||
}
|
||||
.mathquill-tab-bar li {
|
||||
color: #555;
|
||||
background: #ccc;
|
||||
border-color: #999;
|
||||
border-width: direction-sides(1px 1px 0 1px);
|
||||
border-style: solid;
|
||||
-moz-border-radius-top#{direction(right)}: 4px;
|
||||
-moz-border-radius-top#{direction(left)}: 4px;
|
||||
-webkit-border-radius-top#{direction(right)}: 4px;
|
||||
-webkit-border-radius-top#{direction(left)}: 4px;
|
||||
border-top-#{direction(right)}-radius: 4px;
|
||||
border-top-#{direction(left)}-radius: 4px;
|
||||
margin: direction-sides(0 4px 0 0);
|
||||
float: direction(left);
|
||||
top: 1px;
|
||||
height: 2em;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
}
|
||||
.mathquill-tab-bar li.mathquill-tab-selected, .mathquill-tab-bar li#hover {
|
||||
background: #e8e8e8;
|
||||
border-color: #999;
|
||||
}
|
||||
.mathquill-tab-bar li a {
|
||||
padding: 0 8px;
|
||||
line-height: 2em;
|
||||
color: #000;
|
||||
text-decoration: none;
|
||||
cursor: default;
|
||||
display: block;
|
||||
}
|
||||
*:first-child+html .mathquill-tab-bar li a { /* IE7 only */
|
||||
padding: 0 7px;
|
||||
}
|
||||
.mathquill-tab-bar a span {
|
||||
padding: direction-sides(0 6px 0 0);
|
||||
line-height: inherit;
|
||||
font-weight: bold;
|
||||
}
|
||||
.mathquill-toolbar-panes {
|
||||
border-top: 1px solid #999;
|
||||
border-bottom: 1px solid #aaa;
|
||||
background: #e8e8e8;
|
||||
overflow: hidden;
|
||||
}
|
||||
.mathquill-tab-pane {
|
||||
margin: direction-sides(0 -100% 0 0);
|
||||
width: 100%;
|
||||
visibility: hidden;
|
||||
float: direction(left);
|
||||
}
|
||||
.mathquill-tab-pane-selected {
|
||||
visibility: visible;
|
||||
margin: 0;
|
||||
}
|
||||
.mathquill-tab-pane ul {
|
||||
margin: 0;
|
||||
padding: 6px 12px;
|
||||
overflow: hidden;
|
||||
line-height: 1;
|
||||
list-style: none;
|
||||
}
|
||||
.mathquill-tab-pane li {
|
||||
overflow: hidden;
|
||||
display: block;
|
||||
float: direction(left);
|
||||
height: 1.5em;
|
||||
margin: 0 -4px 3px;
|
||||
padding: 4px 6px 0;
|
||||
text-align: center;
|
||||
background: #eee;
|
||||
border-top: 1px solid #fff;
|
||||
border-bottom: 1px solid #ccc;
|
||||
}
|
||||
.mathquill-tab-pane li.mathquill-button-spacer {
|
||||
background: transparent;
|
||||
border-color: transparent;
|
||||
width: 10px;
|
||||
}
|
||||
.mathquill-tab-pane li a {
|
||||
display: block;
|
||||
font-size: 0.9em;
|
||||
width: 1.5em;
|
||||
height: 1.4em;
|
||||
}
|
||||
.mathquill-tab-pane li a:hover {
|
||||
background-color: #adcddf;
|
||||
}
|
||||
.mathquill-toolbar * {
|
||||
cursor: default !important;
|
||||
}
|
|
@ -1,9 +1,4 @@
|
|||
---
|
||||
new_equation_editor:
|
||||
state: hidden
|
||||
display_name: RCE's new and improved equation editor dialog
|
||||
description: Includes the equation editor in the @instructure/canvas-rce package
|
||||
applies_to: SiteAdmin
|
||||
buttons_and_icons_root_account:
|
||||
state: allowed
|
||||
applies_to: RootAccount
|
||||
|
|
|
@ -384,12 +384,11 @@ class RCEWrapper extends React.Component {
|
|||
|
||||
getRequiredFeatureStatuses() {
|
||||
const {
|
||||
new_equation_editor = false,
|
||||
new_math_equation_handling = false,
|
||||
rce_ux_improvements = false,
|
||||
rce_better_paste = false,
|
||||
} = this.props.features
|
||||
return {new_equation_editor, new_math_equation_handling, rce_ux_improvements, rce_better_paste}
|
||||
return {new_math_equation_handling, rce_ux_improvements, rce_better_paste}
|
||||
}
|
||||
|
||||
getRequiredConfigValues() {
|
||||
|
|
|
@ -21,8 +21,8 @@ import RCEGlobals from '../RCEGlobals'
|
|||
describe('RCEGlobals', () => {
|
||||
describe('features', () => {
|
||||
const initialFeatures = {
|
||||
new_equation_editor: true,
|
||||
new_math_equation_handling: true,
|
||||
feature_1: true,
|
||||
feature_2: true,
|
||||
}
|
||||
|
||||
const otherFeatures = {some_other_feature: true}
|
||||
|
|
|
@ -21,7 +21,6 @@ import {act, fireEvent, render, screen, waitFor} from '@testing-library/react'
|
|||
import EquationEditorModal from '../index'
|
||||
import mathml from '../mathml'
|
||||
import advancedPreference from '../advancedPreference'
|
||||
import RCEGlobals from '../../../../RCEGlobals'
|
||||
import {MathfieldElement} from 'mathlive'
|
||||
|
||||
jest.useFakeTimers()
|
||||
|
@ -81,10 +80,6 @@ jest.mock('../advancedPreference', () => {
|
|||
describe('EquationEditorModal', () => {
|
||||
let mockFn
|
||||
|
||||
beforeAll(() => {
|
||||
RCEGlobals.setFeatures({new_equation_editor: true})
|
||||
})
|
||||
|
||||
afterAll(() => {
|
||||
jest.resetAllMocks()
|
||||
})
|
||||
|
|
|
@ -134,6 +134,10 @@ const mathml = {
|
|||
},
|
||||
|
||||
isMathInElement(elem) {
|
||||
if (elem?.getAttribute('data-testid') === 'mathml-preview-element') {
|
||||
return true
|
||||
}
|
||||
|
||||
if (RCEGlobals.getFeatures()?.new_math_equation_handling) {
|
||||
// handle the change from image + hidden mathml to mathjax formatted latex
|
||||
if (elem.querySelector('.math_equation_latex,.math_equation_mml')) {
|
||||
|
@ -151,10 +155,6 @@ const mathml = {
|
|||
}
|
||||
}
|
||||
|
||||
if (RCEGlobals.getFeatures()?.new_equation_editor) {
|
||||
return elem?.getAttribute('data-testid') === 'mathml-preview-element'
|
||||
}
|
||||
|
||||
const mathElements = elem.getElementsByTagName('math')
|
||||
for (let i = 0; i < mathElements.length; i++) {
|
||||
const $el = $(mathElements[i])
|
||||
|
|
|
@ -55,9 +55,3 @@ export default function (ed, document, _trayProps) {
|
|||
)
|
||||
})
|
||||
}
|
||||
|
||||
export function oldClickCallback(ed, document) {
|
||||
const ev = document.createEvent('CustomEvent')
|
||||
ev.initCustomEvent('tinyRCE/initEquation', true, true, {ed})
|
||||
document.dispatchEvent(ev)
|
||||
}
|
||||
|
|
|
@ -18,9 +18,8 @@
|
|||
|
||||
import htmlEscape from 'escape-html'
|
||||
import formatMessage from '../../../format-message'
|
||||
import clickCallback, {oldClickCallback} from './clickCallback'
|
||||
import clickCallback from './clickCallback'
|
||||
import {IconEquationLine} from '@instructure/ui-icons/es/svg'
|
||||
import RCEGlobals from '../../RCEGlobals'
|
||||
import tinymce from 'tinymce'
|
||||
|
||||
function isEquationImage(node: Element) {
|
||||
|
@ -34,11 +33,7 @@ function isEquationImage(node: Element) {
|
|||
tinymce.PluginManager.add('instructure_equation', function (ed) {
|
||||
ed.ui.registry.addIcon('equation', IconEquationLine.src)
|
||||
|
||||
if (RCEGlobals.getFeatures()?.new_equation_editor) {
|
||||
ed.addCommand('instructureEquation', () => clickCallback(ed, document))
|
||||
} else {
|
||||
ed.addCommand('instructureEquation', () => oldClickCallback(ed, document))
|
||||
}
|
||||
ed.addCommand('instructureEquation', () => clickCallback(ed, document))
|
||||
|
||||
ed.ui.registry.addMenuItem('instructure_equation', {
|
||||
text: formatMessage('Equation'),
|
||||
|
|
|
@ -62,9 +62,6 @@ function createdMountedElement(additionalProps = {}) {
|
|||
liveRegion: () => document.getElementById('flash_screenreader_holder'),
|
||||
canUploadFiles: false,
|
||||
...trayProps(),
|
||||
features: {
|
||||
new_equation_editor: true,
|
||||
},
|
||||
...additionalProps,
|
||||
})
|
||||
)
|
||||
|
@ -99,9 +96,7 @@ function defaultProps() {
|
|||
ltiTools: [],
|
||||
editorOptions: {},
|
||||
liveRegion: () => document.getElementById('flash_screenreader_holder'),
|
||||
features: {
|
||||
new_equation_editor: true,
|
||||
},
|
||||
features: {},
|
||||
canvasOrigin: 'http://canvas.docker',
|
||||
}
|
||||
}
|
||||
|
@ -781,7 +776,7 @@ describe('RCEWrapper', () => {
|
|||
})
|
||||
|
||||
describe('is_dirty()', () => {
|
||||
it('is true if not hidden and defaultContent is not equal to getConent()', () => {
|
||||
it('is true if not hidden and defaultContent is not equal to getContent()', () => {
|
||||
editor.serializer.serialize.returns(editor.content)
|
||||
const c = createBasicElement()
|
||||
c.setCode('different')
|
||||
|
@ -789,7 +784,7 @@ describe('RCEWrapper', () => {
|
|||
assert(c.is_dirty())
|
||||
})
|
||||
|
||||
it('is false if not hidden and defaultContent is equal to getConent()', () => {
|
||||
it('is false if not hidden and defaultContent is equal to getContent()', () => {
|
||||
editor.serializer.serialize.returns(editor.content)
|
||||
const c = createBasicElement()
|
||||
editor.hidden = false
|
||||
|
|
|
@ -1,80 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2015 - present Instructure, Inc.
|
||||
*
|
||||
* This file is part of Canvas.
|
||||
*
|
||||
* Canvas is free software: you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License as published by the Free
|
||||
* Software Foundation, version 3 of the License.
|
||||
*
|
||||
* Canvas is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
* A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import $ from 'jquery'
|
||||
import EquationEditorView from '@canvas/rce/backbone/views/EquationEditorView'
|
||||
|
||||
QUnit.module('EquationEditorView', () => {
|
||||
QUnit.module('getEquationText', () => {
|
||||
test("just uses the text if it isn't really an element", assert => {
|
||||
const equation = '65 * 32'
|
||||
const elem = $('<span>')
|
||||
elem.text(equation)
|
||||
assert.equal(EquationEditorView.getEquationText(elem), '65 * 32')
|
||||
})
|
||||
test('it extracts the data-equation-content attribute from an image if thats in the span', assert => {
|
||||
const equation =
|
||||
'<img class="equation_image" title="52\\ast\\sqrt{64}" src="/equation_images/52%255Cast%255Csqrt%257B64%257D" data-equation-content="52\\ast\\sqrt{64}" alt="52\\ast\\sqrt{65}"/>'
|
||||
const elem = $('<span>')
|
||||
elem.text(equation)
|
||||
assert.equal(EquationEditorView.getEquationText(elem), '52\\ast\\sqrt{64}')
|
||||
})
|
||||
test('it extracts the alt from an image if there is no data-equation-content in the span', assert => {
|
||||
const equation =
|
||||
'<img class="equation_image" title="52\\ast\\sqrt{64}" src="/equation_images/52%255Cast%255Csqrt%257B64%257D" alt="52\\ast\\sqrt{64}" />'
|
||||
const elem = $('<span>')
|
||||
elem.text(equation)
|
||||
assert.equal(EquationEditorView.getEquationText(elem), '52\\ast\\sqrt{64}')
|
||||
})
|
||||
test('it strips MathJAx block delimiters">', assert => {
|
||||
const equation = '$$y = sqrt{x}$$'
|
||||
const elem = $('<span>')
|
||||
elem.text(equation)
|
||||
assert.equal(EquationEditorView.getEquationText(elem), 'y = sqrt{x}')
|
||||
})
|
||||
test('it strips MathJAx inline delimiters">', assert => {
|
||||
const equation = '\\(y = sqrt{x}\\)'
|
||||
const elem = $('<span>')
|
||||
elem.text(equation)
|
||||
assert.equal(EquationEditorView.getEquationText(elem), 'y = sqrt{x}')
|
||||
})
|
||||
})
|
||||
|
||||
QUnit.module('render', hooks => {
|
||||
hooks.afterEach(() => {
|
||||
document.querySelector('.ui-dialog').remove()
|
||||
})
|
||||
test('it renders into a div (because spans break KO nav)', assert => {
|
||||
const editor = {
|
||||
selection: {
|
||||
getBookmark() {
|
||||
return null
|
||||
},
|
||||
getNode() {
|
||||
return 'Node Text'
|
||||
},
|
||||
getContent() {
|
||||
return 'Editor Content.'
|
||||
},
|
||||
moveToBookmark() {},
|
||||
},
|
||||
}
|
||||
const view = new EquationEditorView(editor)
|
||||
assert.equal(view.el.nodeName, 'DIV')
|
||||
})
|
||||
})
|
||||
})
|
|
@ -1,31 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2017 - present Instructure, Inc.
|
||||
*
|
||||
* This file is part of Canvas.
|
||||
*
|
||||
* Canvas is free software: you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License as published by the Free
|
||||
* Software Foundation, version 3 of the License.
|
||||
*
|
||||
* Canvas is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
* A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import mathml from 'mathml'
|
||||
import EquationToolbarView from '@canvas/rce/backbone/views/EquationToolbarView'
|
||||
|
||||
QUnit.module('EquationToolbarView MathJax', {
|
||||
setup() {},
|
||||
teardown() {},
|
||||
})
|
||||
|
||||
test('mathjax is loaded properly', () => {
|
||||
const equationToolbarView = new EquationToolbarView()
|
||||
sandbox.mock(mathml, 'loadMathJax').expects('loadMathJax').withArgs(undefined)
|
||||
equationToolbarView.render()
|
||||
})
|
|
@ -1,50 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2017 - present Instructure, Inc.
|
||||
*
|
||||
* This file is part of Canvas.
|
||||
*
|
||||
* Canvas is free software: you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License as published by the Free
|
||||
* Software Foundation, version 3 of the License.
|
||||
*
|
||||
* Canvas is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
* A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import $ from 'jquery'
|
||||
import '@canvas/jquery/jquery.instructure_misc_helpers'
|
||||
import '@canvas/mathquill'
|
||||
|
||||
let view, container, toolbar
|
||||
|
||||
QUnit.module('MathML and MathJax test', {
|
||||
setup() {
|
||||
view = document.createElement('div')
|
||||
view.id = 'mathquill-view'
|
||||
toolbar = document.createElement('div')
|
||||
document.body.appendChild(view)
|
||||
view.appendChild(toolbar)
|
||||
container = document.createElement('div')
|
||||
view.appendChild(container)
|
||||
toolbar.className = 'mathquill-toolbar'
|
||||
$(container).mathquill('editor')
|
||||
},
|
||||
|
||||
teardown() {
|
||||
document.body.removeChild(view)
|
||||
},
|
||||
})
|
||||
|
||||
test('tab links work with url encoded characters in panel id', () => {
|
||||
const tab = toolbar.querySelector('.mathquill-tab-bar li:nth-child(2) a')
|
||||
const pane = toolbar.querySelector('.mathquill-tab-pane:nth-child(2)')
|
||||
tab.setAttribute('href', '#Græsk_tab')
|
||||
pane.id = 'Græsk_tab'
|
||||
tab.click()
|
||||
ok(/selected/.exec(pane.className))
|
||||
})
|
|
@ -37,7 +37,7 @@ describe "Stuff related to how we load stuff from CDN and use brandable_css" do
|
|||
sample_bundles = {
|
||||
"bundles/common" => false,
|
||||
"../../gems/plugins/analytics/app/stylesheets/analytics" => false, # to test that it works with plugins
|
||||
"jst/tinymce/EquationEditorView" => false, # to test that it works with handlebars-loaded css
|
||||
"jst/FindFlickrImageView" => false, # to test that it works with handlebars-loaded css
|
||||
"jst/messageStudentsDialog" => true
|
||||
}
|
||||
sample_bundles.each do |bundle_name, includes_no_variables|
|
||||
|
|
|
@ -138,14 +138,6 @@ describe "new ui" do
|
|||
expect(mce_icons.css_value("width")).to eq("16px")
|
||||
expect(mce_icons.css_value("height")).to eq("16px")
|
||||
end
|
||||
|
||||
it "does not break equation editor css", priority: "2" do
|
||||
get "/courses/#{@course.id}/assignments/new"
|
||||
wait_for_tiny(f("#assignment_description"))
|
||||
select_math_equation_from_toolbar
|
||||
wait_for_ajaximations
|
||||
expect(f(".mathquill-toolbar-panes, .mathquill-tab-bar")).to be_displayed
|
||||
end
|
||||
end
|
||||
|
||||
context "as student" do
|
||||
|
|
|
@ -1,47 +0,0 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
#
|
||||
# Copyright (C) 2011 - present Instructure, Inc.
|
||||
#
|
||||
# This file is part of Canvas.
|
||||
#
|
||||
# Canvas is free software: you can redistribute it and/or modify it under
|
||||
# the terms of the GNU Affero General Public License as published by the Free
|
||||
# Software Foundation, version 3 of the License.
|
||||
#
|
||||
# Canvas is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
# A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
# details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License along
|
||||
# with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
require_relative "../common"
|
||||
require_relative "../helpers/quizzes_common"
|
||||
require_relative "pages/rce_next_page"
|
||||
|
||||
describe "equation editor" do
|
||||
include_context "in-process server selenium tests"
|
||||
include QuizzesCommon
|
||||
include RCENextPage
|
||||
|
||||
it "keeps cursor position when clicking close" do
|
||||
course_with_teacher_logged_in
|
||||
|
||||
quiz_model(course: @course)
|
||||
get "/courses/#{@course.id}/quizzes/#{@quiz.id}/edit"
|
||||
|
||||
wait_for_tiny(f("#quiz_description"))
|
||||
type_in_tiny "textarea", "foo"
|
||||
select_math_equation_from_toolbar
|
||||
equation_editor = fj(".mathquill-editor:visible")
|
||||
expect(equation_editor).not_to be_nil
|
||||
|
||||
fj(".ui-dialog-titlebar-close:visible").click
|
||||
type_in_tiny "textarea#quiz_description", "bar"
|
||||
f(".save_quiz_button").click
|
||||
|
||||
expect(f(".description")).to include_text "foobar"
|
||||
end
|
||||
end
|
|
@ -908,66 +908,6 @@ module RCENextPage
|
|||
#=====================================================================================================================
|
||||
# Math
|
||||
|
||||
def select_squareroot_symbol
|
||||
math_square_root_button.click
|
||||
end
|
||||
|
||||
def add_squareroot_value
|
||||
editor_sqrt_textarea.send_keys("81")
|
||||
end
|
||||
|
||||
def select_math_equation_from_toolbar
|
||||
math_builder_button.click
|
||||
end
|
||||
|
||||
def click_insert_equation
|
||||
math_builder_insert_equation_button.click
|
||||
end
|
||||
|
||||
def click_page_save_button
|
||||
save_button.click
|
||||
end
|
||||
|
||||
def select_math_image
|
||||
math_image.click
|
||||
end
|
||||
|
||||
def click_edit_equation
|
||||
edit_equation_button.click
|
||||
end
|
||||
|
||||
def math_builder_button
|
||||
possibly_hidden_toolbar_button('button[aria-label="Insert Math Equation"]')
|
||||
end
|
||||
|
||||
def math_square_root_button
|
||||
f(".sqrt-prefix")
|
||||
end
|
||||
|
||||
def editor_sqrt_textarea
|
||||
f("#mathquill-container textarea")
|
||||
end
|
||||
|
||||
def math_builder_insert_equation_button
|
||||
find_button("Insert Equation")
|
||||
end
|
||||
|
||||
def math_image
|
||||
f(".equation_image")
|
||||
end
|
||||
|
||||
def edit_equation_button
|
||||
fxpath('//button[*[.="Edit Equation"]]')
|
||||
end
|
||||
|
||||
def math_dialog_exists?
|
||||
element_exists?(".math-dialog")
|
||||
end
|
||||
|
||||
def math_rendering_exists?
|
||||
element_exists?(".equation_image")
|
||||
end
|
||||
|
||||
def mathjax_element_exists_in_title?
|
||||
element_exists?(".assignment-title .MathJax_Preview")
|
||||
end
|
||||
|
|
|
@ -359,35 +359,6 @@ describe "RCE Next toolbar features", ignore_js_errors: true do
|
|||
end
|
||||
|
||||
context "math equations" do
|
||||
it "renders math equation from math modal" do
|
||||
skip "LS-1839 (1/27/2021)"
|
||||
page_title = "math_rendering"
|
||||
create_wiki_page_with_text(page_title)
|
||||
visit_existing_wiki_edit(@course, page_title)
|
||||
|
||||
select_math_equation_from_toolbar
|
||||
select_squareroot_symbol
|
||||
add_squareroot_value
|
||||
click_insert_equation
|
||||
|
||||
# Verify image in rce
|
||||
in_frame rce_page_body_ifr_id do
|
||||
expect(wiki_body).to contain_css("img.equation_image")
|
||||
end
|
||||
# Select to re-edit math equation
|
||||
in_frame rce_page_body_ifr_id do
|
||||
select_math_image
|
||||
end
|
||||
click_edit_equation
|
||||
expect(math_dialog_exists?).to eq true
|
||||
|
||||
# Save and look for the image on the saved page
|
||||
click_insert_equation
|
||||
click_page_save_button
|
||||
wait_for_ajaximations
|
||||
expect(math_rendering_exists?).to eq true
|
||||
end
|
||||
|
||||
it 'renders math equations for inline math with "\("' do
|
||||
title = "Assignment-Title with Math \\(x^2\\)"
|
||||
@assignment = @course.assignments.create!(name: title)
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
/index.js
|
File diff suppressed because it is too large
Load Diff
|
@ -1,7 +0,0 @@
|
|||
{
|
||||
"name": "@canvas/mathquill",
|
||||
"private": true,
|
||||
"version": "1.0.0",
|
||||
"author": "neme",
|
||||
"main": "./index.js"
|
||||
}
|
|
@ -16,7 +16,6 @@
|
|||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import EquationEditorView from '@canvas/rce/backbone/views/EquationEditorView'
|
||||
import loadEventListeners from '@canvas/rce/loadEventListeners'
|
||||
import 'jquery'
|
||||
import 'jqueryui/tabs'
|
||||
|
@ -75,20 +74,8 @@ describe('loadEventListeners', () => {
|
|||
jest.restoreAllMocks()
|
||||
})
|
||||
|
||||
it('initializes equation editor plugin', done => {
|
||||
window.getComputedStyle = jest.fn()
|
||||
|
||||
loadEventListeners({
|
||||
equationCB: view => {
|
||||
expect(view instanceof EquationEditorView).toBeTruthy()
|
||||
expect(view.$editor.selector).toEqual('#someId')
|
||||
done()
|
||||
},
|
||||
})
|
||||
dispatchEvent('initEquation')
|
||||
})
|
||||
|
||||
it('initializes equella plugin', done => {
|
||||
expect.assertions(1)
|
||||
window.alert = jest.fn()
|
||||
|
||||
loadEventListeners({
|
||||
|
@ -99,25 +86,13 @@ describe('loadEventListeners', () => {
|
|||
done()
|
||||
},
|
||||
})
|
||||
const event = document.createEvent('CustomEvent')
|
||||
const eventData = {
|
||||
ed: fakeEditor,
|
||||
selectNode: '<div></div>',
|
||||
}
|
||||
event.initCustomEvent('tinyRCE/initEquella', true, true, eventData)
|
||||
document.dispatchEvent(event)
|
||||
dispatchEvent('initEquella')
|
||||
})
|
||||
|
||||
it('initializes external tools plugin', () => {
|
||||
fakeEditor.addCommand = jest.fn()
|
||||
loadEventListeners()
|
||||
const event = document.createEvent('CustomEvent')
|
||||
const eventData = {
|
||||
ed: fakeEditor,
|
||||
url: 'someurl.com',
|
||||
}
|
||||
event.initCustomEvent('tinyRCE/initExternalTools', true, true, eventData)
|
||||
document.dispatchEvent(event)
|
||||
dispatchEvent('initExternalTools')
|
||||
expect(fakeEditor.addCommand).toHaveBeenCalledWith(
|
||||
'instructureExternalButton__BUTTON_ID__',
|
||||
expect.any(Function)
|
||||
|
|
|
@ -1,265 +0,0 @@
|
|||
//
|
||||
// Copyright (C) 2012 - present Instructure, Inc.
|
||||
//
|
||||
// This file is part of Canvas.
|
||||
//
|
||||
// Canvas is free software: you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Affero General Public License as published by the Free
|
||||
// Software Foundation, version 3 of the License.
|
||||
//
|
||||
// Canvas is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
// A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
// details.
|
||||
//
|
||||
// You should have received a copy of the GNU Affero General Public License along
|
||||
// with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import {useScope as useI18nScope} from '@canvas/i18n'
|
||||
import $ from 'jquery'
|
||||
import _ from 'underscore'
|
||||
import Backbone from '@canvas/backbone'
|
||||
import EquationToolbarView, {disableMathJaxMenu} from './EquationToolbarView'
|
||||
import template from '../../jst/EquationEditorView.handlebars'
|
||||
import htmlEscape from 'html-escape'
|
||||
import preventDefault from 'prevent-default'
|
||||
import * as RceCommandShim from '../../RceCommandShim'
|
||||
import 'jqueryui/dialog'
|
||||
import '@canvas/mathquill'
|
||||
|
||||
const I18n = useI18nScope('EquationEditorView')
|
||||
|
||||
export default class EquationEditorView extends Backbone.View {
|
||||
static initClass() {
|
||||
this.prototype.template = template
|
||||
|
||||
// all instances share same element
|
||||
this.prototype.el = $(document.createElement('div')).appendTo('body')[0]
|
||||
|
||||
this.prototype.els = {
|
||||
'#mathquill-view': '$mathquillView',
|
||||
'#mathquill-container': '$mathquillContainer',
|
||||
'#mathjax-view': '$mathjaxView',
|
||||
'#mathjax-editor': '$mathjaxEditor',
|
||||
'#mathjax-message': '$mathjaxMessage',
|
||||
}
|
||||
}
|
||||
|
||||
// #
|
||||
// class method
|
||||
//
|
||||
// like $.text() / Sizzle.getText(elems), except it also gets alt
|
||||
// attributes from images
|
||||
//
|
||||
// @param {jquery object} elems The collection of elements (or the
|
||||
// singular jquery element) that represents the currently selected
|
||||
// thing in the editor to turn into an equation
|
||||
static getEquationText(elems) {
|
||||
const self = this
|
||||
return _.map(elems, elem => {
|
||||
// Get the text from text nodes and CDATA nodes
|
||||
if ([3, 4].includes(elem.nodeType)) {
|
||||
if (elem.nodeValue.match(/^<img/)) {
|
||||
// if the "text" is really just an unparsed "img" node
|
||||
// then we really want the alt element
|
||||
return self.getEquationText($(elem.nodeValue))
|
||||
} else {
|
||||
// if we're editing inline LaTex, strip the delimiters
|
||||
// if the selection included them
|
||||
return elem.nodeValue.trim().replace(/^(?:\\\(|\$\$)(.*)*(?:\\\)|\$\$)$/g, '$1')
|
||||
}
|
||||
|
||||
// Get alt attributes from IMG nodes
|
||||
} else if (elem.nodeName === 'IMG' && elem.className === 'equation_image') {
|
||||
if (elem.dataset.equationContent) {
|
||||
return elem.dataset.equationContent
|
||||
} else {
|
||||
return elem.alt
|
||||
}
|
||||
|
||||
// Traverse everything else, except comment nodes
|
||||
} else if (elem.nodeType !== 8) {
|
||||
return self.getEquationText(elem.childNodes)
|
||||
}
|
||||
})
|
||||
.join('')
|
||||
.trim()
|
||||
}
|
||||
|
||||
getEquationText(elems) {
|
||||
return this.constructor.getEquationText(elems)
|
||||
}
|
||||
|
||||
initialize(editor) {
|
||||
disableMathJaxMenu(true)
|
||||
this.editor = editor
|
||||
this.$editor = $(`#${this.editor.id}`)
|
||||
if (this.isRawLaTex()) {
|
||||
this.editor.selection.select(this.editor.selection.getNode())
|
||||
}
|
||||
this.prevSelection = this.editor.selection.getBookmark()
|
||||
|
||||
if (!(this.toolbar = this.$el.data('toolbar'))) {
|
||||
const nodes = $('<span>').text(this.editor.selection.getNode())
|
||||
const equation = this.getEquationText(nodes)
|
||||
this.addToolbar(equation)
|
||||
}
|
||||
|
||||
this.cacheEls()
|
||||
this.$el.click(preventDefault(() => {}))
|
||||
return this.$el.dialog({
|
||||
minWidth: 670,
|
||||
minHeight: 290,
|
||||
resizable: false,
|
||||
title: I18n.t(
|
||||
'equation_editor_title',
|
||||
'Use the toolbars here, or Switch View to Advanced to type/paste in LaTeX'
|
||||
),
|
||||
dialogClass: 'math-dialog',
|
||||
open: () => this.initialRender(),
|
||||
close: () => this.onClose(),
|
||||
buttons: [
|
||||
{
|
||||
class: 'btn-primary',
|
||||
text: I18n.t('button.insert_equation', 'Insert Equation'),
|
||||
click: e => this.onSubmit(e),
|
||||
},
|
||||
],
|
||||
})
|
||||
}
|
||||
|
||||
isRawLaTex() {
|
||||
return this.editor.selection.getNode()?.classList?.contains('math_equation_latex')
|
||||
}
|
||||
|
||||
onClose() {
|
||||
disableMathJaxMenu(false)
|
||||
return this.restoreCaret()
|
||||
}
|
||||
|
||||
initialRender() {
|
||||
let nodes
|
||||
if (this.isRawLaTex()) {
|
||||
nodes = $('<span>').text(this.editor.selection.getNode().textContent)
|
||||
} else {
|
||||
nodes = $('<span>').text(this.editor.selection.getContent())
|
||||
}
|
||||
const equation = this.getEquationText(nodes)
|
||||
|
||||
this.$mathjaxMessage.empty()
|
||||
this.setView(this.$el.data('view'), equation)
|
||||
return this.renderEquation(this.opposite(this.$el.data('view')), '')
|
||||
}
|
||||
|
||||
addToolbar(equation) {
|
||||
this.$el.append(this.template)
|
||||
|
||||
$('#mathjax-preview').html(
|
||||
`<script type='math/tex; mode=display'>${htmlEscape(equation)}</script>`
|
||||
)
|
||||
this.toolbar = new EquationToolbarView({
|
||||
el: this.$el,
|
||||
})
|
||||
this.toolbar.render()
|
||||
|
||||
$('a.math-toggle-link').bind('click', e => this.toggleView(e))
|
||||
|
||||
this.$el.data('toolbar', this.toolbar)
|
||||
return this.$el.data('view', 'mathquill')
|
||||
}
|
||||
|
||||
opposite(view) {
|
||||
if (view === 'mathquill') {
|
||||
return 'mathjax'
|
||||
} else if (view === 'mathjax') {
|
||||
return 'mathquill'
|
||||
}
|
||||
}
|
||||
|
||||
getEquation() {
|
||||
const view = this.$el.data('view')
|
||||
if (view === 'mathquill') {
|
||||
return this.$mathquillContainer.mathquill('latex')
|
||||
} else if (view === 'mathjax') {
|
||||
return this.$mathjaxEditor.val()
|
||||
}
|
||||
}
|
||||
|
||||
toggleView(e) {
|
||||
e.preventDefault()
|
||||
const view = this.$el.data('view')
|
||||
const equation = this.getEquation()
|
||||
this.$mathjaxMessage.empty()
|
||||
return this.setView(this.opposite(view), equation)
|
||||
}
|
||||
|
||||
setView(view, equation) {
|
||||
if (view === 'mathquill') {
|
||||
this.$mathjaxView.hide()
|
||||
this.$mathquillView.show()
|
||||
setTimeout(() => {
|
||||
return this.$mathquillView.find('.mathquill-tab-bar li.mathquill-tab-selected a').focus()
|
||||
}, 200)
|
||||
} else if (view === 'mathjax') {
|
||||
this.$mathquillView.hide()
|
||||
this.$mathjaxView.show()
|
||||
this.$mathjaxView.find('.mathquill-tab-bar li.mathquill-tab-selected a').focus()
|
||||
}
|
||||
|
||||
if (!this.renderEquation(view, equation)) {
|
||||
return this.setView('mathjax', equation)
|
||||
} else {
|
||||
return this.$el.data('view', view)
|
||||
}
|
||||
}
|
||||
|
||||
renderEquation(view, equation) {
|
||||
if (view === 'mathquill') {
|
||||
this.$mathquillContainer
|
||||
.mathquill('revert')
|
||||
.addClass('mathquill-editor')
|
||||
.mathquill('editor')
|
||||
.mathquill('write', equation)
|
||||
if (
|
||||
this.$mathquillContainer.mathquill('latex').replace(/\s+/, '') !==
|
||||
equation.replace(/\s+/, '')
|
||||
) {
|
||||
this.$mathjaxMessage.text(
|
||||
I18n.t('cannot_render_equation', 'This equation cannot be rendered in Basic View.')
|
||||
)
|
||||
return false
|
||||
}
|
||||
} else if (view === 'mathjax') {
|
||||
this.$mathjaxEditor.val(equation)
|
||||
if (this.toolbar.renderPreview) {
|
||||
this.toolbar.renderPreview()
|
||||
}
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
restoreCaret() {
|
||||
return this.editor.selection.moveToBookmark(this.prevSelection)
|
||||
}
|
||||
|
||||
close() {
|
||||
this.$el.dialog('close')
|
||||
}
|
||||
|
||||
onSubmit(event) {
|
||||
event.preventDefault()
|
||||
|
||||
const text = this.getEquation()
|
||||
if (text.length === 0) {
|
||||
this.editor.selection.setContent('')
|
||||
this.close()
|
||||
return
|
||||
}
|
||||
|
||||
this.restoreCaret()
|
||||
RceCommandShim.send(this.$editor, 'insertMathEquation', text)
|
||||
this.close()
|
||||
}
|
||||
}
|
||||
EquationEditorView.initClass()
|
|
@ -1,127 +0,0 @@
|
|||
//
|
||||
// Copyright (C) 2013 - present Instructure, Inc.
|
||||
//
|
||||
// This file is part of Canvas.
|
||||
//
|
||||
// Canvas is free software: you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Affero General Public License as published by the Free
|
||||
// Software Foundation, version 3 of the License.
|
||||
//
|
||||
// Canvas is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
// A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
// details.
|
||||
//
|
||||
// You should have received a copy of the GNU Affero General Public License along
|
||||
// with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import $ from 'jquery'
|
||||
import Backbone from '@canvas/backbone'
|
||||
import template from '../../jst/EquationToolbarView.handlebars'
|
||||
import mathml from 'mathml'
|
||||
import '@canvas/mathquill'
|
||||
|
||||
export function disableMathJaxMenu(isDisabled) {
|
||||
// even with the z-index issue solved, opening the sub-menus
|
||||
// doesn't work with the mouse. Maybe the equation editor modal
|
||||
// is consuming the mouse events?
|
||||
// for now, turn it off while the editor is open.
|
||||
if (window.MathJax?.Hub) {
|
||||
window.MathJax.Hub.config.showMathMenu = !isDisabled
|
||||
window.MathJax.Hub.config.inTabOrder = !isDisabled
|
||||
}
|
||||
}
|
||||
|
||||
export default class EquationToolbarView extends Backbone.View {
|
||||
static initClass() {
|
||||
this.prototype.template = template
|
||||
|
||||
this.prototype.els = {
|
||||
'#mathjax-view .mathquill-toolbar': '$toolbar',
|
||||
'#mathjax-editor': '$matheditor',
|
||||
}
|
||||
}
|
||||
|
||||
render() {
|
||||
this.cacheEls()
|
||||
this.$toolbar.append(this.template())
|
||||
|
||||
const $tabLinks = $('#mathjax-view .mathquill-tab-bar li a')
|
||||
$tabLinks
|
||||
.click(function (e) {
|
||||
e.preventDefault()
|
||||
$('#mathjax-view .mathquill-tab-bar li').removeClass('mathquill-tab-selected')
|
||||
$tabLinks.attr('aria-selected', 'false').attr('tabindex', '-1')
|
||||
$('#mathjax-view .mathquill-tab-pane').removeClass('mathquill-tab-pane-selected')
|
||||
$(this).parent().addClass('mathquill-tab-selected')
|
||||
$(this).attr('aria-selected', 'true').attr('tabindex', 0).focus()
|
||||
$(this.href.replace(/.*#/, '#')).addClass('mathquill-tab-pane-selected')
|
||||
})
|
||||
.keydown(function (e) {
|
||||
let direction
|
||||
switch (e.keyCode) {
|
||||
case 37:
|
||||
direction = 'l'
|
||||
break
|
||||
case 39:
|
||||
direction = 'r'
|
||||
break
|
||||
default:
|
||||
return true
|
||||
}
|
||||
e.preventDefault()
|
||||
let listIndex = $tabLinks.index(this)
|
||||
// Don't fall off the right end of the list.
|
||||
// No need to worry about falling off the left end, as .get accepts negative indexes.
|
||||
if (listIndex === $tabLinks.length - 1 && direction === 'r') listIndex = -1
|
||||
if (direction === 'r') {
|
||||
listIndex++
|
||||
} else {
|
||||
listIndex--
|
||||
}
|
||||
$($tabLinks.get(listIndex)).focus().click()
|
||||
})
|
||||
|
||||
$('#mathjax-view .mathquill-tab-bar li:first-child').addClass('mathquill-tab-selected')
|
||||
|
||||
return mathml.loadMathJax(undefined, this.addMathJaxEvents.bind(this))
|
||||
}
|
||||
|
||||
addMathJaxEvents() {
|
||||
function renderPreview() {
|
||||
const jax = window.MathJax.Hub.getAllJax('mathjax-preview')[0]
|
||||
if (jax) {
|
||||
const tex = $('#mathjax-editor').val()
|
||||
return window.MathJax.Hub.Queue(['Text', jax, tex])
|
||||
}
|
||||
}
|
||||
|
||||
$('#mathjax-view a.mathquill-rendered-math')
|
||||
.mousedown(e => e.stopPropagation())
|
||||
.click(function (e) {
|
||||
e.preventDefault()
|
||||
const text = this.title + ' '
|
||||
const field = document.getElementById('mathjax-editor')
|
||||
if (document.selection) {
|
||||
const sel = document.selection.createRange()
|
||||
sel.text = text
|
||||
} else if (field.selectionStart || field.selectionStart === '0') {
|
||||
const s = field.selectionStart
|
||||
e = field.selectionEnd
|
||||
const val = field.value
|
||||
field.value = val.substring(0, s) + text + val.substring(e, val.length)
|
||||
} else {
|
||||
field.value += text
|
||||
}
|
||||
$(field).focus()
|
||||
|
||||
return renderPreview()
|
||||
})
|
||||
|
||||
this.renderPreview = renderPreview
|
||||
this.$matheditor.keyup(renderPreview)
|
||||
this.$matheditor.bind('paste', renderPreview)
|
||||
disableMathJaxMenu(true)
|
||||
}
|
||||
}
|
||||
EquationToolbarView.initClass()
|
|
@ -1,35 +0,0 @@
|
|||
<div id="mathquill-view">
|
||||
<p class="screenreader-only" role="alert">{{#t "#editor.screen_reader_tip"}}
|
||||
Screen reader users: The most accessible way to use this editor is to switch
|
||||
to the advanced view, and then either enter LaTeX directly, or use the
|
||||
toolbar to assist you in doing so. The link to switch to the advanced view
|
||||
can be found near the end of this dialog, directly before the edit field.
|
||||
{{/t}}</p>
|
||||
<div class='mathquill-toolbar'>
|
||||
</div>
|
||||
<div class='math-toggle'>
|
||||
<a href="#" class='math-toggle-link'>
|
||||
{{#t "#editor.switch_to_mathquill"}}Switch View to Advanced{{/t}}
|
||||
</a>
|
||||
</div>
|
||||
<div id="mathquill-container">
|
||||
</div>
|
||||
</div>
|
||||
<div id="mathjax-view">
|
||||
<div class='mathquill-toolbar'>
|
||||
</div>
|
||||
<div class='math-toggle'>
|
||||
<a href="#" class='math-toggle-link'>
|
||||
{{#t "#editor.switch_to_mathjax"}}Switch View to Basic{{/t}}
|
||||
</a>
|
||||
</div>
|
||||
<textarea id='mathjax-editor'
|
||||
aria-label="{{#t "#editor.mathjax_text_entry_field_label"}}Enter the equation as LaTeX.{{/t}}"
|
||||
>
|
||||
</textarea>
|
||||
<br/>
|
||||
<span id='mathjax-preview'>
|
||||
</span>
|
||||
<div id="mathjax-message">
|
||||
</div>
|
||||
</div>
|
|
@ -1,4 +0,0 @@
|
|||
{
|
||||
"brandableCSSBundle": "jst/tinymce/EquationEditorView",
|
||||
"i18nScope": "tinymce.equation_editor_view"
|
||||
}
|
|
@ -1,521 +0,0 @@
|
|||
<ul class="mathquill-tab-bar" role="tablist">
|
||||
<li class="">
|
||||
<a href="#basic_tab" aria-controls="basic_tab" aria-selected="true" role="tab"
|
||||
tabindex="0" aria-label="{{#t "#editor.tabs.basic"}}Basic{{/t}}"
|
||||
>
|
||||
<span class="mathquill-rendered-math">+</span>{{#t "#editor.tabs.basic"}}Basic{{/t}}
|
||||
</a>
|
||||
</li>
|
||||
<li class="">
|
||||
<a href="#greek_tab" aria-controls="greek_tab" aria-selected="false" role="tab"
|
||||
tabindex="-1" aria-label="{{#t "#editor.tabs.greek"}}Greek{{/t}}"
|
||||
>
|
||||
<span class="mathquill-rendered-math">π</span>{{#t "#editor.tabs.greek"}}Greek{{/t}}
|
||||
</a>
|
||||
</li>
|
||||
<li class="">
|
||||
<a href="#operators_tab" aria-controls="operators_tab" aria-selected="false" role="tab"
|
||||
tabindex="-1" aria-label="{{#t "#editor.tabs.operators"}}Operators{{/t}}"
|
||||
>
|
||||
<span class="mathquill-rendered-math" >⊕</span>{{#t "#editor.tabs.operators"}}Operators{{/t}}
|
||||
</a>
|
||||
</li>
|
||||
<li class="">
|
||||
<a href="#relationships_tab" aria-controls="relationships_tab" aria-selected="false" role="tab"
|
||||
tabindex="-1" aria-label="{{#t "#editor.tabs.relationships"}}Relationships{{/t}}"
|
||||
>
|
||||
<span class="mathquill-rendered-math">≤</span>{{#t "#editor.tabs.relationships"}}Relationships{{/t}}
|
||||
</a>
|
||||
</li>
|
||||
<li class="">
|
||||
<a href="#arrows_tab" aria-controls="arrows_tab" aria-selected="false" role="tab"
|
||||
tabindex="-1" aria-label="{{#t "#editor.tabs.arrows"}}Arrows{{/t}}"
|
||||
>
|
||||
<span class="mathquill-rendered-math">⇔</span>{{#t "#editor.tabs.arrows"}}Arrows{{/t}}
|
||||
</a>
|
||||
</li>
|
||||
<li class="">
|
||||
<a href="#delimiters_tab" aria-controls="delimiters_tab" aria-selected="false" role="tab"
|
||||
tabindex="-1" aria-label="{{#t "#editor.tabs.delimiters"}}Delimiters{{/t}}"
|
||||
>
|
||||
<span class="mathquill-rendered-math">{</span>{{#t "#editor.tabs.delimiters"}}Delimiters{{/t}}
|
||||
</a>
|
||||
</li>
|
||||
<li class="">
|
||||
<a href="#misc_tab" aria-controls="misc_tab" aria-selected="false" role="tab"
|
||||
tabindex="-1" aria-label="{{#t "#editor.tabs.misc"}}Misc{{/t}}"
|
||||
>
|
||||
<span class="mathquill-rendered-math" >∞</span>{{#t "#editor.tabs.misc"}}Misc{{/t}}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="mathquill-toolbar-panes">
|
||||
<div class="mathquill-tab-pane mathquill-tab-pane-selected" id="basic_tab" role="tabpanel">
|
||||
<ul>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="_{sub}" aria-label="_{sub}"><sub
|
||||
style="font-size: 0.6em; line-height: 3.5;">sub</sub></a></li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="^{sup}" aria-label="^{sup}"><sup style="font-size: 0.6em">sup</sup></a></li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\frac{n}{m}" aria-label="\frac{n}{m}"><span style="font-size: 0.55em; vertical-align: middle"
|
||||
class="fraction"><span class="numerator"><var>n</var></span><span
|
||||
class="denominator"><var>m</var></span><span style="width:0"></span></span></a></li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\sqrt{x}" aria-label="\sqrt{x}"><span class="block"><span class="sqrt-prefix">√</span><span
|
||||
class="sqrt-stem"> </span></span></a></li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\sqrt[n]{x}" aria-label="\sqrt[n]{x}"><span style="font-size: 0.7em"><sup
|
||||
class="nthroot"><var>n</var></sup><span class="block"><span class="sqrt-prefix">√</span><span
|
||||
class="sqrt-stem"> </span></span></span></a></li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\langle \rangle" aria-label="\langle \rangle"><span style="line-height: 1.5em"><span
|
||||
class="block"><span class="paren">⟨</span><span class="block"></span><span
|
||||
class="paren">⟩</span></span></span></a></li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\binom{n}{m}" aria-label="\binom{n}{m}"><span style="font-size: 0.48em"><span class="paren"
|
||||
style="font-size: 2.087912087912088em; ">(</span><span
|
||||
class="array"><span><var>n</var></span><span><var>m</var></span></span><span class="paren"
|
||||
style="font-size: 2.087912087912088em; ">)</span></span></a>
|
||||
</li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\begin{matrix} 1 \\ 2 \\ 3 \end{matrix}" aria-label="\begin{matrix} 1 \\ 2 \\ 3 \end{matrix}"><span class="array"
|
||||
style="vertical-align: middle; font-size: 0.4em; line-height: 0.9em"><span>1</span><span>2</span><span>3</span></span></a>
|
||||
</li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="f" aria-label="f"><span style="line-height: 1.5em"><var
|
||||
class="florin">ƒ</var><span style="display:inline-block;width:0"> </span></span></a></li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\prime" aria-label="\prime"><span style="line-height: 1.5em"><span>′</span></span></a>
|
||||
</li>
|
||||
<li class="mathquill-button-spacer"></li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="+" aria-label="+"><span style="line-height: 1.5em"><span>+</span></span></a></li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="-" aria-label="-"><span style="line-height: 1.5em"><span>−</span></span></a></li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\pm" aria-label="\pm"><span style="line-height: 1.5em"><span>±</span></span></a>
|
||||
</li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\mp" aria-label="\mp"><span style="line-height: 1.5em"><span>∓</span></span></a>
|
||||
</li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\cdot" aria-label="\cdot"><span style="line-height: 1.5em"><span
|
||||
class="binary-operator">·</span></span></a></li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="=" aria-label="="><span style="line-height: 1.5em"><span class="binary-operator">=</span></span></a>
|
||||
</li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\times" aria-label="\times"><span style="line-height: 1.5em"><span
|
||||
class="binary-operator">×</span></span></a></li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\div" aria-label="\div"><span style="line-height: 1.5em"><span
|
||||
class="binary-operator">÷</span></span></a></li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\ast" aria-label="\ast"><span style="line-height: 1.5em"><span
|
||||
class="binary-operator">∗</span></span></a></li>
|
||||
<li class="mathquill-button-spacer"></li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\therefore" aria-label="\therefore"><span style="line-height: 1.5em"><span
|
||||
class="binary-operator">∴</span></span></a></li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\because" aria-label="\because"><span style="line-height: 1.5em"><span
|
||||
class="binary-operator">∵</span></span></a></li>
|
||||
<li class="mathquill-button-spacer"></li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\sum{n}" aria-label="\sum{n}"><span style="line-height: 1.5em"><big>∑</big></span></a>
|
||||
</li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\prod{n}" aria-label="\prod{n}"><span style="line-height: 1.5em"><big>∏</big></span></a>
|
||||
</li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\coprod{n}" aria-label="\coprod{n}"><span style="line-height: 1.5em"><big>∐</big></span></a>
|
||||
</li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\int{x}" aria-label="\int{x}"><span style="line-height: 1.5em"><big>∫</big></span></a>
|
||||
</li>
|
||||
<li class="mathquill-button-spacer"></li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\mathbb{N}" aria-label="\mathbb{N}"><span style="line-height: 1.5em"><span>ℕ</span></span></a>
|
||||
</li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\mathbb{P}" aria-label="\mathbb{P}"><span style="line-height: 1.5em"><span>ℙ</span></span></a>
|
||||
</li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\mathbb{Z}" aria-label="\mathbb{Z}"><span style="line-height: 1.5em"><span>ℤ</span></span></a>
|
||||
</li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\mathbb{Q}" aria-label="\mathbb{Q}"><span style="line-height: 1.5em"><span>ℚ</span></span></a>
|
||||
</li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\mathbb{R}" aria-label="\mathbb{R}"><span style="line-height: 1.5em"><span>ℝ</span></span></a>
|
||||
</li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\mathbb{C}" aria-label="\mathbb{C}"><span style="line-height: 1.5em"><span>ℂ</span></span></a>
|
||||
</li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\mathbb{H}" aria-label="\mathbb{H}"><span style="line-height: 1.5em"><span>ℍ</span></span></a>
|
||||
</li>
|
||||
<li class="mathquill-button-spacer"></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="mathquill-tab-pane" id="greek_tab" role="tabpanel">
|
||||
<ul>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\alpha" aria-label="\alpha"><span style="line-height: 1.5em"><var>α</var></span></a>
|
||||
</li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\beta" aria-label="\beta"><span style="line-height: 1.5em"><var>β</var></span></a>
|
||||
</li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\gamma" aria-label="\gamma"><span style="line-height: 1.5em"><var>γ</var></span></a>
|
||||
</li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\delta" aria-label="\delta"><span style="line-height: 1.5em"><var>δ</var></span></a>
|
||||
</li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\epsilon" aria-label="\epsilon"><span style="line-height: 1.5em"><var>ϵ</var></span></a>
|
||||
</li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\zeta" aria-label="\zeta"><span style="line-height: 1.5em"><var>ζ</var></span></a>
|
||||
</li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\eta" aria-label="\eta"><span style="line-height: 1.5em"><var>η</var></span></a>
|
||||
</li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\theta" aria-label="\theta"><span style="line-height: 1.5em"><var>θ</var></span></a>
|
||||
</li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\iota" aria-label="\iota"><span style="line-height: 1.5em"><var>ι</var></span></a>
|
||||
</li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\kappa" aria-label="\kappa"><span style="line-height: 1.5em"><var>κ</var></span></a>
|
||||
</li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\lambda" aria-label="\lambda"><span style="line-height: 1.5em"><span
|
||||
class="nonSymbola">λ</span></span></a></li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\mu" aria-label="\mu"><span style="line-height: 1.5em"><var>μ</var></span></a></li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\nu" aria-label="\nu"><span style="line-height: 1.5em"><var>ν</var></span></a></li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\xi" aria-label="\xi"><span style="line-height: 1.5em"><var>ξ</var></span></a></li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\pi" aria-label="\pi"><span style="line-height: 1.5em"><span
|
||||
class="nonSymbola">π</span></span></a></li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\rho" aria-label="\rho"><span style="line-height: 1.5em"><var>ρ</var></span></a>
|
||||
</li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\sigma" aria-label="\sigma"><span style="line-height: 1.5em"><var>σ</var></span></a>
|
||||
</li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\tau" aria-label="\tau"><span style="line-height: 1.5em"><var>τ</var></span></a>
|
||||
</li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\upsilon" aria-label="\upsilon"><span style="line-height: 1.5em"><var>υ</var></span></a>
|
||||
</li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\phi" aria-label="\phi"><span style="line-height: 1.5em"><var>ϕ</var></span></a>
|
||||
</li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\chi" aria-label="\chi"><span style="line-height: 1.5em"><var>χ</var></span></a>
|
||||
</li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\psi" aria-label="\psi"><span style="line-height: 1.5em"><var>ψ</var></span></a>
|
||||
</li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\omega" aria-label="\omega"><span style="line-height: 1.5em"><var>ω</var></span></a>
|
||||
</li>
|
||||
<li class="mathquill-button-spacer"></li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\digamma" aria-label="\digamma"><span style="line-height: 1.5em"><var>ϝ</var></span></a>
|
||||
</li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\varepsilon" aria-label="\varepsilon"><span style="line-height: 1.5em"><var>ε</var></span></a>
|
||||
</li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\vartheta" aria-label="\vartheta"><span
|
||||
style="line-height: 1.5em"><var>ϑ</var></span></a></li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\varkappa" aria-label="\varkappa"><span
|
||||
style="line-height: 1.5em"><var>ϰ</var></span></a></li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\varpi" aria-label="\varpi"><span style="line-height: 1.5em"><var>ϖ</var></span></a>
|
||||
</li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\varrho" aria-label="\varrho"><span style="line-height: 1.5em"><var>ϱ</var></span></a>
|
||||
</li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\varsigma" aria-label="\varsigma"><span
|
||||
style="line-height: 1.5em"><var>ς</var></span></a></li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\varphi" aria-label="\varphi"><span style="line-height: 1.5em"><var>φ</var></span></a>
|
||||
</li>
|
||||
<li class="mathquill-button-spacer"></li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\Gamma" aria-label="\Gamma"><span style="line-height: 1.5em"><span>Γ</span></span></a>
|
||||
</li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\Delta" aria-label="\Delta"><span style="line-height: 1.5em"><span>Δ</span></span></a>
|
||||
</li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\Theta" aria-label="\Theta"><span style="line-height: 1.5em"><span>Θ</span></span></a>
|
||||
</li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\Lambda" aria-label="\Lambda"><span
|
||||
style="line-height: 1.5em"><span>Λ</span></span></a></li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\Xi" aria-label="\Xi"><span style="line-height: 1.5em"><span>Ξ</span></span></a>
|
||||
</li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\Pi" aria-label="\Pi"><span style="line-height: 1.5em"><span>Π</span></span></a>
|
||||
</li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\Sigma" aria-label="\Sigma"><span style="line-height: 1.5em"><span>Σ</span></span></a>
|
||||
</li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\Upsilon" aria-label="\Upsilon"><span style="line-height: 1.5em"><var
|
||||
style="font-family: serif">ϒ</var></span></a></li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\Phi" aria-label="\Phi"><span style="line-height: 1.5em"><span>Φ</span></span></a>
|
||||
</li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\Psi" aria-label="\Psi"><span style="line-height: 1.5em"><span>Ψ</span></span></a>
|
||||
</li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\Omega" aria-label="\Omega"><span style="line-height: 1.5em"><span>Ω</span></span></a>
|
||||
</li>
|
||||
<li class="mathquill-button-spacer"></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="mathquill-tab-pane" id="operators_tab" role="tabpanel">
|
||||
<ul>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\wedge" aria-label="\wedge"><span style="line-height: 1.5em"><span>∧</span></span></a>
|
||||
</li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\vee" aria-label="\vee"><span style="line-height: 1.5em"><span>∨</span></span></a>
|
||||
</li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\cup" aria-label="\cup"><span style="line-height: 1.5em"><span>∪</span></span></a>
|
||||
</li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\cap" aria-label="\cap"><span style="line-height: 1.5em"><span>∩</span></span></a>
|
||||
</li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\diamond" aria-label="\diamond"><span
|
||||
style="line-height: 1.5em"><span>◇</span></span></a></li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\bigtriangleup" aria-label="\bigtriangleup"><span
|
||||
style="line-height: 1.5em"><span>△</span></span></a></li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\ominus" aria-label="\ominus"><span
|
||||
style="line-height: 1.5em"><span>⊖</span></span></a></li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\uplus" aria-label="\uplus"><span style="line-height: 1.5em"><span>⊎</span></span></a>
|
||||
</li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\otimes" aria-label="\otimes"><span style="line-height: 1.5em"><span
|
||||
class="binary-operator">⊗</span></span></a></li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\oplus" aria-label="\oplus"><span style="line-height: 1.5em"><span
|
||||
class="binary-operator">⊕</span></span></a></li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\bigtriangledown" aria-label="\bigtriangledown"><span style="line-height: 1.5em"><span>▽</span></span></a>
|
||||
</li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\sqcap" aria-label="\sqcap"><span style="line-height: 1.5em"><span>⊓</span></span></a>
|
||||
</li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\triangleleft" aria-label="\triangleleft"><span
|
||||
style="line-height: 1.5em"><span>⊲</span></span></a></li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\sqcup" aria-label="\sqcup"><span style="line-height: 1.5em"><span>⊔</span></span></a>
|
||||
</li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\triangleright" aria-label="\triangleright"><span
|
||||
style="line-height: 1.5em"><span>⊳</span></span></a></li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\odot" aria-label="\odot"><span style="line-height: 1.5em"><span>⊙</span></span></a>
|
||||
</li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\bigcirc" aria-label="\bigcirc"><span
|
||||
style="line-height: 1.5em"><span>◯</span></span></a></li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\dagger" aria-label="\dagger"><span
|
||||
style="line-height: 1.5em"><span>†</span></span></a></li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\ddagger" aria-label="\ddagger"><span
|
||||
style="line-height: 1.5em"><span>‡</span></span></a></li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\wr" aria-label="\wr"><span style="line-height: 1.5em"><span>≀</span></span></a>
|
||||
</li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\amalg" aria-label="\amalg"><span style="line-height: 1.5em"><span>∐</span></span></a>
|
||||
</li>
|
||||
<li class="mathquill-button-spacer"></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="mathquill-tab-pane" id="relationships_tab" role="tabpanel">
|
||||
<ul>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="<" aria-label="<"><span style="line-height: 1.5em"><span
|
||||
class="binary-operator"><</span></span></a></li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title=">" aria-label=">"><span style="line-height: 1.5em"><span
|
||||
class="binary-operator">></span></span></a></li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\equiv" aria-label="\equiv"><span style="line-height: 1.5em"><span
|
||||
class="binary-operator">≡</span></span></a></li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\cong" aria-label="\cong"><span style="line-height: 1.5em"><span
|
||||
class="binary-operator">≅</span></span></a></li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\sim" aria-label="\sim"><span style="line-height: 1.5em"><span
|
||||
class="binary-operator">∼</span></span></a></li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\not\in" aria-label="\not\in"><span style="line-height: 1.5em"><span
|
||||
class="binary-operator">∉</span></span></a></li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\ne" aria-label="\ne"><span style="line-height: 1.5em"><span
|
||||
class="binary-operator">≠</span></span></a></li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\propto" aria-label="\propto"><span style="line-height: 1.5em"><span
|
||||
class="binary-operator">∝</span></span></a></li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\approx" aria-label="\approx"><span style="line-height: 1.5em"><span
|
||||
class="binary-operator">≈</span></span></a></li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\le" aria-label="\le"><span style="line-height: 1.5em"><span
|
||||
class="binary-operator">≤</span></span></a></li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\ge" aria-label="\ge"><span style="line-height: 1.5em"><span
|
||||
class="binary-operator">≥</span></span></a></li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\in" aria-label="\in"><span style="line-height: 1.5em"><span
|
||||
class="binary-operator">∈</span></span></a></li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\ni" aria-label="\ni"><span style="line-height: 1.5em"><span
|
||||
class="binary-operator">∋</span></span></a></li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\not\ni" aria-label="\not\ni"><span style="line-height: 1.5em"><span
|
||||
class="binary-operator">∌</span></span></a></li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\subset" aria-label="\subset"><span style="line-height: 1.5em"><span
|
||||
class="binary-operator">⊂</span></span></a></li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\supset" aria-label="\supset"><span style="line-height: 1.5em"><span
|
||||
class="binary-operator">⊃</span></span></a></li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\not\subset" aria-label="\not\subset"><span style="line-height: 1.5em"><span
|
||||
class="binary-operator">⊄</span></span></a></li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\not\supset" aria-label="\not\supset"><span style="line-height: 1.5em"><span
|
||||
class="binary-operator">⊅</span></span></a></li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\subseteq" aria-label="\subseteq"><span style="line-height: 1.5em"><span
|
||||
class="binary-operator">⊆</span></span></a></li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\supseteq" aria-label="\supseteq"><span style="line-height: 1.5em"><span
|
||||
class="binary-operator">⊇</span></span></a></li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\not\subseteq" aria-label="\not\subseteq"><span style="line-height: 1.5em"><span
|
||||
class="binary-operator">⊈</span></span></a></li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\not\supseteq" aria-label="\not\supseteq"><span style="line-height: 1.5em"><span
|
||||
class="binary-operator">⊉</span></span></a></li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\models" aria-label="\models"><span
|
||||
style="line-height: 1.5em"><span>⊨</span></span></a></li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\prec" aria-label="\prec"><span style="line-height: 1.5em"><span>≺</span></span></a>
|
||||
</li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\succ" aria-label="\succ"><span style="line-height: 1.5em"><span>≻</span></span></a>
|
||||
</li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\preceq" aria-label="\preceq"><span
|
||||
style="line-height: 1.5em"><span>≼</span></span></a></li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\succeq" aria-label="\succeq"><span
|
||||
style="line-height: 1.5em"><span>≽</span></span></a></li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\simeq" aria-label="\simeq"><span style="line-height: 1.5em"><span>≃</span></span></a>
|
||||
</li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\mid" aria-label="\mid"><span style="line-height: 1.5em"><span>∣</span></span></a>
|
||||
</li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\ll" aria-label="\ll"><span style="line-height: 1.5em"><span>≪</span></span></a>
|
||||
</li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\gg" aria-label="\gg"><span style="line-height: 1.5em"><span>≫</span></span></a>
|
||||
</li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\parallel" aria-label="\parallel"><span style="line-height: 1.5em"><span>∥</span></span></a>
|
||||
</li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\bowtie" aria-label="\bowtie"><span
|
||||
style="line-height: 1.5em"><span>⋈</span></span></a></li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\sqsubset" aria-label="\sqsubset"><span style="line-height: 1.5em"><span>⊏</span></span></a>
|
||||
</li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\sqsupset" aria-label="\sqsupset"><span style="line-height: 1.5em"><span>⊐</span></span></a>
|
||||
</li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\smile" aria-label="\smile"><span style="line-height: 1.5em"><span>⌣</span></span></a>
|
||||
</li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\sqsubseteq" aria-label="\sqsubseteq"><span
|
||||
style="line-height: 1.5em"><span>⊑</span></span></a></li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\sqsupseteq" aria-label="\sqsupseteq"><span
|
||||
style="line-height: 1.5em"><span>⊒</span></span></a></li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\doteq" aria-label="\doteq"><span style="line-height: 1.5em"><span>≐</span></span></a>
|
||||
</li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\frown" aria-label="\frown"><span style="line-height: 1.5em"><span>⌢</span></span></a>
|
||||
</li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\vdash" aria-label="\vdash"><span style="line-height: 1.5em"><span>⊦</span></span></a>
|
||||
</li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\dashv" aria-label="\dashv"><span style="line-height: 1.5em"><span>⊣</span></span></a>
|
||||
</li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\exists" aria-label="\exists"><span
|
||||
style="line-height: 1.5em"><span>∃</span></span></a></li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\varnothing" aria-label="\varnothing"><span style="line-height: 1.5em"><span
|
||||
class="binary-operator">∅</span></span></a></li>
|
||||
<li class="mathquill-button-spacer"></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="mathquill-tab-pane" id="arrows_tab" role="tabpanel">
|
||||
<ul>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\longleftarrow" aria-label="\longleftarrow"><span
|
||||
style="line-height: 1.5em"><span>←</span></span></a></li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\longrightarrow" aria-label="\longrightarrow"><span
|
||||
style="line-height: 1.5em"><span>→</span></span></a></li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\Longleftarrow" aria-label="\Longleftarrow"><span
|
||||
style="line-height: 1.5em"><span>⇐</span></span></a></li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\Longrightarrow" aria-label="\Longrightarrow"><span
|
||||
style="line-height: 1.5em"><span>⇒</span></span></a></li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\longleftrightarrow" aria-label="\longleftrightarrow"><span
|
||||
style="line-height: 1.5em"><span>↔</span></span></a></li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\updownarrow" aria-label="\updownarrow"><span
|
||||
style="line-height: 1.5em"><span>↕</span></span></a></li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\Longleftrightarrow" aria-label="\Longleftrightarrow"><span
|
||||
style="line-height: 1.5em"><span>⇔</span></span></a></li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\Updownarrow" aria-label="\Updownarrow"><span
|
||||
style="line-height: 1.5em"><span>⇕</span></span></a></li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\mapsto" aria-label="\mapsto"><span
|
||||
style="line-height: 1.5em"><span>↦</span></span></a></li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\nearrow" aria-label="\nearrow"><span
|
||||
style="line-height: 1.5em"><span>↗</span></span></a></li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\hookleftarrow" aria-label="\hookleftarrow"><span
|
||||
style="line-height: 1.5em"><span>↩</span></span></a></li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\hookrightarrow" aria-label="\hookrightarrow"><span
|
||||
style="line-height: 1.5em"><span>↪</span></span></a></li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\searrow" aria-label="\searrow"><span
|
||||
style="line-height: 1.5em"><span>↘</span></span></a></li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\leftharpoonup" aria-label="\leftharpoonup"><span
|
||||
style="line-height: 1.5em"><span>↼</span></span></a></li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\rightharpoonup" aria-label="\rightharpoonup"><span
|
||||
style="line-height: 1.5em"><span>⇀</span></span></a></li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\swarrow" aria-label="\swarrow"><span
|
||||
style="line-height: 1.5em"><span>↙</span></span></a></li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\leftharpoondown" aria-label="\leftharpoondown"><span style="line-height: 1.5em"><span>↽</span></span></a>
|
||||
</li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\rightharpoondown" aria-label="\rightharpoondown"><span style="line-height: 1.5em"><span>⇁</span></span></a>
|
||||
</li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\nwarrow" aria-label="\nwarrow"><span
|
||||
style="line-height: 1.5em"><span>↖</span></span></a></li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\downarrow" aria-label="\downarrow"><span style="line-height: 1.5em"><span>↓</span></span></a>
|
||||
</li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\Downarrow" aria-label="\Downarrow"><span style="line-height: 1.5em"><span>⇓</span></span></a>
|
||||
</li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\uparrow" aria-label="\uparrow"><span
|
||||
style="line-height: 1.5em"><span>↑</span></span></a></li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\Uparrow" aria-label="\Uparrow"><span
|
||||
style="line-height: 1.5em"><span>⇑</span></span></a></li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\rightarrow" aria-label="\rightarrow"><span
|
||||
style="line-height: 1.5em"><span>→</span></span></a></li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\Rightarrow" aria-label="\Rightarrow"><span
|
||||
style="line-height: 1.5em"><span>⇒</span></span></a></li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\leftarrow" aria-label="\leftarrow"><span style="line-height: 1.5em"><span>←</span></span></a>
|
||||
</li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\Leftarrow" aria-label="\Leftarrow"><span style="line-height: 1.5em"><span>⇐</span></span></a>
|
||||
</li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\leftrightarrow" aria-label="\leftrightarrow"><span
|
||||
style="line-height: 1.5em"><span>↔</span></span></a></li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\Leftrightarrow" aria-label="\Leftrightarrow"><span
|
||||
style="line-height: 1.5em"><span>⇔</span></span></a></li>
|
||||
<li class="mathquill-button-spacer"></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="mathquill-tab-pane" id="delimiters_tab" role="tabpanel">
|
||||
<ul>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\lfloor" aria-label="\lfloor"><span
|
||||
style="line-height: 1.5em"><span>⌊</span></span></a></li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\rfloor" aria-label="\rfloor"><span
|
||||
style="line-height: 1.5em"><span>⌋</span></span></a></li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\lceil" aria-label="\lceil"><span style="line-height: 1.5em"><span>⌈</span></span></a>
|
||||
</li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\rceil" aria-label="\rceil"><span style="line-height: 1.5em"><span>⌉</span></span></a>
|
||||
</li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\slash" aria-label="\slash"><span style="line-height: 1.5em"><span>/</span></span></a>
|
||||
</li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\lbrace" aria-label="\lbrace"><span
|
||||
style="line-height: 1.5em"><span>{</span></span></a></li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\rbrace" aria-label="\rbrace"><span style="line-height: 1.5em"><span>}</span></span></a>
|
||||
</li>
|
||||
<li class="mathquill-button-spacer"></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="mathquill-tab-pane" id="misc_tab" role="tabpanel">
|
||||
<ul>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\forall" aria-label="\forall"><span
|
||||
style="line-height: 1.5em"><span>∀</span></span></a></li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\ldots" aria-label="\ldots"><span style="line-height: 1.5em"><span>…</span></span></a>
|
||||
</li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\cdots" aria-label="\cdots"><span style="line-height: 1.5em"><span>⋯</span></span></a>
|
||||
</li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\vdots" aria-label="\vdots"><span style="line-height: 1.5em"><span>⋮</span></span></a>
|
||||
</li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\unicode{8944}" aria-label="\unicode{8944}"><span style="line-height: 1.5em"><span>⋰</span></span></a>
|
||||
</li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\surd" aria-label="\surd"><span style="line-height: 1.5em"><span>√</span></span></a>
|
||||
</li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\triangle" aria-label="\triangle"><span style="line-height: 1.5em"><span>▵</span></span></a>
|
||||
</li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\ell" aria-label="\ell"><span style="line-height: 1.5em"><span>ℓ</span></span></a>
|
||||
</li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\top" aria-label="\top"><span style="line-height: 1.5em"><span>⊤</span></span></a>
|
||||
</li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\flat" aria-label="\flat"><span style="line-height: 1.5em"><span>♭</span></span></a>
|
||||
</li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\natural" aria-label="\natural"><span
|
||||
style="line-height: 1.5em"><span>♮</span></span></a></li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\sharp" aria-label="\sharp"><span style="line-height: 1.5em"><span>♯</span></span></a>
|
||||
</li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\wp" aria-label="\wp"><span style="line-height: 1.5em"><span>℘</span></span></a>
|
||||
</li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\bot" aria-label="\bot"><span style="line-height: 1.5em"><span>⊥</span></span></a>
|
||||
</li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\clubsuit" aria-label="\clubsuit"><span style="line-height: 1.5em"><span>♣</span></span></a>
|
||||
</li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\diamondsuit" aria-label="\diamondsuit"><span
|
||||
style="line-height: 1.5em"><span>♢</span></span></a></li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\heartsuit" aria-label="\heartsuit"><span style="line-height: 1.5em"><span>♡</span></span></a>
|
||||
</li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\spadesuit" aria-label="\spadesuit"><span style="line-height: 1.5em"><span>♠</span></span></a>
|
||||
</li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\unicode{94}" aria-label="\unicode{94}"><span style="line-height: 1.5em"><span>^</span></span></a>
|
||||
</li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\unicode{95}" aria-label="\unicode{95}"><span
|
||||
style="line-height: 1.5em"><span>_</span></span></a></li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\backslash" aria-label="\backslash"><span style="line-height: 1.5em"><span>\</span></span></a>
|
||||
</li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\vert" aria-label="\vert"><span style="line-height: 1.5em"><span>|</span></span></a>
|
||||
</li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\perp" aria-label="\perp"><span style="line-height: 1.5em"><span>⊥</span></span></a>
|
||||
</li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\nabla" aria-label="\nabla"><span style="line-height: 1.5em"><span>∇</span></span></a>
|
||||
</li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\hbar" aria-label="\hbar"><span style="line-height: 1.5em"><span>ℏ</span></span></a>
|
||||
</li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\unicode{8491}" aria-label="\unicode{8491}"><span style="line-height: 1.5em"><span>Å</span></span></a>
|
||||
</li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\circ" aria-label="\circ"><span style="line-height: 1.5em"><span>∘</span></span></a>
|
||||
</li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\bullet" aria-label="\bullet"><span
|
||||
style="line-height: 1.5em"><span>•</span></span></a></li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\setminus" aria-label="\setminus"><span style="line-height: 1.5em"><span>∖</span></span></a>
|
||||
</li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\neg" aria-label="\neg"><span style="line-height: 1.5em"><span>¬</span></span></a>
|
||||
</li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\dots" aria-label="\dots"><span style="line-height: 1.5em"><span>…</span></span></a>
|
||||
</li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\Re" aria-label="\Re"><span style="line-height: 1.5em"><span>ℜ</span></span></a>
|
||||
</li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\Im" aria-label="\Im"><span style="line-height: 1.5em"><span>ℑ</span></span></a>
|
||||
</li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\partial" aria-label="\partial"><span
|
||||
style="line-height: 1.5em"><span>∂</span></span></a></li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\infty" aria-label="\infty"><span style="line-height: 1.5em"><span>∞</span></span></a>
|
||||
</li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\aleph" aria-label="\aleph"><span style="line-height: 1.5em"><span>ℵ</span></span></a>
|
||||
</li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="^\circ" aria-label="^\circ"><span style="line-height: 1.5em"><span>°</span></span></a>
|
||||
</li>
|
||||
<li><a href="#" class="mathquill-rendered-math" title="\angle" aria-label="\angle"><span style="line-height: 1.5em"><span>∠</span></span></a>
|
||||
</li>
|
||||
<li class="mathquill-button-spacer"></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
|
@ -1,3 +0,0 @@
|
|||
{
|
||||
"i18nScope": "tinymce.equation_toolbar_view"
|
||||
}
|
|
@ -23,7 +23,7 @@ import {showFlashError} from '@canvas/alerts/react/FlashAlert'
|
|||
const I18n = useI18nScope('loadEventListeners')
|
||||
|
||||
export default function loadEventListeners(callbacks = {}) {
|
||||
const validCallbacks = ['equationCB', 'equellaCB', 'externalToolCB']
|
||||
const validCallbacks = ['equellaCB', 'externalToolCB']
|
||||
|
||||
validCallbacks.forEach(cbName => {
|
||||
if (callbacks[cbName] === undefined) {
|
||||
|
@ -33,15 +33,6 @@ export default function loadEventListeners(callbacks = {}) {
|
|||
}
|
||||
})
|
||||
|
||||
document.addEventListener('tinyRCE/initEquation', ({detail}) => {
|
||||
import('./backbone/views/EquationEditorView')
|
||||
.then(({default: EquationEditorView}) => {
|
||||
const view = new EquationEditorView(detail.ed)
|
||||
callbacks.equationCB(view)
|
||||
})
|
||||
.catch(showFlashError(I18n.t('Something went wrong loading the equation editor')))
|
||||
})
|
||||
|
||||
document.addEventListener('tinyRCE/initEquella', e => {
|
||||
import('@canvas/tinymce-equella')
|
||||
.then(({default: initializeEquella}) => {
|
||||
|
|
Loading…
Reference in New Issue