You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/mathfield/09-integration.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ simplest way to use mathfields is by loading the library from a CDN.
8
8
9
9
In this section we'll discuss other options for adding a mathfield to a web page.
10
10
11
-
## Using Mathfields with JavaScript Modules
11
+
## Using JavaScript Modules
12
12
13
13
In addition to `MathfieldElement`, the Mathfield library provide some functions
14
14
such as `renderMathInDocument()`.
@@ -61,7 +61,7 @@ keyboard shortcuts, use custom macros and more.
61
61
The section below discuss additional options to load the library for more
62
62
complex configurations.
63
63
64
-
<h2id='npm'>Using NPM</h2>
64
+
## Using NPM
65
65
66
66
If you need...
67
67
@@ -97,7 +97,7 @@ Make sure the contents of the `/fonts/` and `/sounds/` folder are copied to
97
97
your build output directory.
98
98
:::
99
99
100
-
## Using `<script>`Tags
100
+
## Using a `<script>`Tag
101
101
102
102
If you need to support browsers that don't support JavaScript modules, you
103
103
can use a `<script>` tag to load a UMD version of the library.
@@ -134,7 +134,7 @@ The version of the library currently loaded can be obtained with:
134
134
console.log(MathfieldElement.version);
135
135
```
136
136
137
-
<h2id='files'>Library Files</h2>
137
+
## Library Files
138
138
139
139
If you need to incorporate the library files directly into your project
140
140
(for example if you are building a standalone application), you can obtain
@@ -159,7 +159,7 @@ and may be useful for debugging.
159
159
|`dist/mathlive-static.css`| A stylesheet which can be used when the MathLive library is not loaded to display markup that has been rendered by the MathLive library previously. Rarely needed. |
160
160
|`dist/types`| The TypeScript declaration files. Not needed at runtime. |
161
161
162
-
<h2id='fonts-folder'> Controlling the Location of the <kbd>fonts</kbd> Folder</h2>
162
+
Controlling the Location of the `fonts` Folder
163
163
164
164
In order to display mathfields correctly a set of specialized math fonts must
165
165
be available. These fonts are provided as part of the library in a directory called `fonts`.
@@ -189,7 +189,7 @@ path from the JavaScript directory to the fonts directory is `../assets/mathlive
189
189
The `MathfieldElement.soundsDirectory` property can similarly be set to point
190
190
to the sound file assets.
191
191
192
-
<h2id='asset-pipeline'>Integrating with a Bundler or an Asset Pipeline</h2>
192
+
## Integrating with a Bundler or an Asset Pipeline
193
193
194
194
In some cases, simply pointing MathLive to the directory where the fonts can
195
195
be located might not be enough. For example, some bundlers, such as WebPack,
@@ -259,7 +259,7 @@ Learn more about the attributes, properties, methods and events <kbd>ENTER</kbd>
259
259
Learn more about the <strong>Lifecycle</strong> of the mathfield web component.
(Note that this example is moot, as the `htmlData` command already sanitizes its input.)
76
76
77
77
78
-
## Restricting Commands That Modify the DOM
78
+
## Restricting Commands That Could Modify the DOM
79
79
80
80
81
-
Some commands modify the DOM and pose a higher risk of XSS attacks. For instance, `\htmlData{}{}` and `\href{}{}` allow the insertion of HTML attributes. While both commands sanitize their input to prevent harmful attributes, you may want to disable them for added security.
81
+
Some commands modify the DOM and pose a higher risk of XSS attacks.
82
+
For instance, `\htmlData{}{}` and `\href{}{}` allow the insertion of HTML
83
+
attributes. While both commands sanitize their input to prevent harmful
84
+
attributes, you may want to disable or restrict them for added security.
0 commit comments