mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-08-10 18:39:22 +08:00
README/CHANGELOG: Format in prettier
Formatted with prettier 2.3.0
This commit is contained in:
parent
2738046886
commit
fef1e16907
101
CHANGELOG.md
101
CHANGELOG.md
@ -1,164 +1,163 @@
|
||||
Changelog
|
||||
=========
|
||||
# Changelog
|
||||
|
||||
## [27.1.3](https://github.com/isaul32/ckeditor5-math/compare/v27.1.2...27.1.3) (2021-05-16)
|
||||
|
||||
* #41: Prevent inserting empty equations, thank you @Jules-Bertholet.
|
||||
- #41: Prevent inserting empty equations, thank you @Jules-Bertholet.
|
||||
|
||||
## [27.1.2](https://github.com/isaul32/ckeditor5-math/compare/v27.1.1...v27.1.2) (2021-03-29)
|
||||
|
||||
* #38: You can now boot into a development instance with `yarn start` (supports
|
||||
live reload)
|
||||
* #40 (fixed #39): Support for upcasting Quill style tags
|
||||
- #38: You can now boot into a development instance with `yarn start` (supports
|
||||
live reload)
|
||||
- #40 (fixed #39): Support for upcasting Quill style tags
|
||||
|
||||
## [27.1.1](https://github.com/isaul32/ckeditor5-math/compare/v27.1.0...v27.1.1) (2021-03-29)
|
||||
|
||||
* Update dependencies for CKEditor 27.1.0 ([Release
|
||||
notes](https://github.com/ckeditor/ckeditor5/releases/tag/v27.1.0))
|
||||
- Update dependencies for CKEditor 27.1.0 ([Release
|
||||
notes](https://github.com/ckeditor/ckeditor5/releases/tag/v27.1.0))
|
||||
|
||||
## [27.1.0](https://github.com/isaul32/ckeditor5-math/compare/v27.0.1...v27.1.0) (2021-03-29)
|
||||
|
||||
* #33: New optional config variables: `previewClassName` and `popupClassName` as an array
|
||||
of classes, this makes it easier to style the preview:
|
||||
- #33: New optional config variables: `previewClassName` and `popupClassName` as an array
|
||||
of classes, this makes it easier to style the preview:
|
||||
|
||||
```javascript
|
||||
{
|
||||
"math": {
|
||||
"popupClassName": ["myeditor"],
|
||||
"previewClassName": ["myeditor"]
|
||||
}
|
||||
}
|
||||
```
|
||||
```javascript
|
||||
{
|
||||
"math": {
|
||||
"popupClassName": ["myeditor"],
|
||||
"previewClassName": ["myeditor"]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
This assures the preview appended to `document.body` and the popup both are
|
||||
accessible via `.myeditor`.
|
||||
This assures the preview appended to `document.body` and the popup both are
|
||||
accessible via `.myeditor`.
|
||||
|
||||
## [27.0.1](https://github.com/isaul32/ckeditor5-math/compare/v27.0.0...v27.0.1) (2021-03-29)
|
||||
|
||||
* Typo fix from #32.
|
||||
- Typo fix from #32.
|
||||
|
||||
## [27.0.0](https://github.com/isaul32/ckeditor5-math/compare/v26.0.0...v27.0.0) (2021-03-29)
|
||||
|
||||
* Update dependencies.
|
||||
- Update dependencies.
|
||||
|
||||
## [26.0.0](https://github.com/isaul32/ckeditor5-math/compare/v25.0.0...v26.0.0) (2021-03-04)
|
||||
|
||||
* Update dependencies.
|
||||
- Update dependencies.
|
||||
|
||||
## [25.0.0](https://github.com/isaul32/ckeditor5-math/compare/v24.0.1...v25.0.0) (2021-03-02)
|
||||
|
||||
* Update dependencies.
|
||||
- Update dependencies.
|
||||
|
||||
## [24.0.1](https://github.com/isaul32/ckeditor5-math/compare/24.0.0...v24.0.1) (2021-02-28)
|
||||
|
||||
* Fix balloon view position.
|
||||
- Fix balloon view position.
|
||||
|
||||
## [24.0.0](https://github.com/isaul32/ckeditor5-math/compare/v23.3.0...24.0.0) (2020-12-12)
|
||||
|
||||
* Update dependencies.
|
||||
- Update dependencies.
|
||||
|
||||
## [23.3.0](https://github.com/isaul32/ckeditor5-math/compare/23.2.2...v23.3.0) (2020-11-07)
|
||||
|
||||
* Add autoformat support. ([3354872](https://github.com/isaul32/ckeditor5-math/commit/3354872))
|
||||
- Add autoformat support. ([3354872](https://github.com/isaul32/ckeditor5-math/commit/3354872))
|
||||
|
||||
## [23.2.2](https://github.com/isaul32/ckeditor5-math/compare/v23.2.1...23.2.2) (2020-11-03)
|
||||
|
||||
* Fix placeholder handling. ([dc288ea](https://github.com/isaul32/ckeditor5-math/commit/dc288ea))
|
||||
* Fix selection after entering inline expression. ([2fea2e2](https://github.com/isaul32/ckeditor5-math/commit/2fea2e2))
|
||||
- Fix placeholder handling. ([dc288ea](https://github.com/isaul32/ckeditor5-math/commit/dc288ea))
|
||||
- Fix selection after entering inline expression. ([2fea2e2](https://github.com/isaul32/ckeditor5-math/commit/2fea2e2))
|
||||
|
||||
## [23.2.1](https://github.com/isaul32/ckeditor5-math/compare/v23.2.0...v23.2.1) (2020-10-18)
|
||||
|
||||
* Fix math editing button for balloon editor. ([3629401](https://github.com/isaul32/ckeditor5-math/commit/3629401))
|
||||
- Fix math editing button for balloon editor. ([3629401](https://github.com/isaul32/ckeditor5-math/commit/3629401))
|
||||
|
||||
## [23.2.0](https://github.com/isaul32/ckeditor5-math/compare/v23.1.0...v23.2.0) (2020-10-18)
|
||||
|
||||
* Add math editing button for balloon editor. ([aa0392c](https://github.com/isaul32/ckeditor5-math/commit/aa0392c))
|
||||
- Add math editing button for balloon editor. ([aa0392c](https://github.com/isaul32/ckeditor5-math/commit/aa0392c))
|
||||
|
||||
## [23.1.0](https://github.com/isaul32/ckeditor5-math/compare/v23.0.0...v23.1.0) (2020-10-11)
|
||||
|
||||
* Add typesetting auto load feature. ([a665b64](https://github.com/isaul32/ckeditor5-math/commit/a665b64))
|
||||
- Add typesetting auto load feature. ([a665b64](https://github.com/isaul32/ckeditor5-math/commit/a665b64))
|
||||
|
||||
## [23.0.0](https://github.com/isaul32/ckeditor5-math/compare/v22.0.0...v23.0.0) (2020-10-02)
|
||||
|
||||
* Update dependencies.
|
||||
- Update dependencies.
|
||||
|
||||
## [22.0.0](https://github.com/isaul32/ckeditor5-math/compare/v21.0.0...v22.0.0) (2020-08-29)
|
||||
|
||||
* Seperate schema to display and inline.
|
||||
- Seperate schema to display and inline.
|
||||
|
||||
### Bug fixes
|
||||
|
||||
* Fix writer. ([7d0cd01](https://github.com/isaul32/ckeditor5-math/commit/7d0cd01))
|
||||
- Fix writer. ([7d0cd01](https://github.com/isaul32/ckeditor5-math/commit/7d0cd01))
|
||||
|
||||
### Other changes
|
||||
|
||||
* Update dependencies.
|
||||
- Update dependencies.
|
||||
|
||||
## [21.0.0](https://github.com/isaul32/ckeditor5-math/compare/v20.0.0...v21.0.0) (2020-08-03)
|
||||
|
||||
* Update dependencies.
|
||||
- Update dependencies.
|
||||
|
||||
## [20.0.0](https://github.com/isaul32/ckeditor5-math/compare/v19.0.0...v20.0.0) (2020-07-13)
|
||||
|
||||
* Update dependencies.
|
||||
- Update dependencies.
|
||||
|
||||
## [19.0.0](https://github.com/isaul32/ckeditor5-math/compare/v18.0.1...v19.0.0) (2020-05-12)
|
||||
|
||||
* Update dependencies.
|
||||
- Update dependencies.
|
||||
|
||||
## [18.0.1](https://github.com/isaul32/ckeditor5-math/compare/v18.0.0...v18.0.1) (2020-04-05)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
* Fix spacebar before formula bug in Firefox. [isaul32/ckeditor5-math#2](https://github.com/isaul32/ckeditor5-math/issues/2). ([9d15010](https://github.com/isaul32/ckeditor5-math/commit/9d15010))
|
||||
- Fix spacebar before formula bug in Firefox. [isaul32/ckeditor5-math#2](https://github.com/isaul32/ckeditor5-math/issues/2). ([9d15010](https://github.com/isaul32/ckeditor5-math/commit/9d15010))
|
||||
|
||||
## [18.0.0](https://github.com/isaul32/ckeditor5-math/compare/v17.0.1...v18.0.0) (2020-03-30)
|
||||
|
||||
* Update dependencies.
|
||||
- Update dependencies.
|
||||
|
||||
## [17.0.1](https://github.com/isaul32/ckeditor5-math/compare/v17.0.0...v17.0.1) (2020-02-27)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
* Fix missing dependencies.
|
||||
- Fix missing dependencies.
|
||||
|
||||
## [17.0.0](https://github.com/isaul32/ckeditor5-math/compare/v1.0.3...v17.0.0) (2020-02-27)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
* Fix dependencies resolving problem. Closes [isaul32/ckeditor5-math#1](https://github.com/isaul32/ckeditor5-math/issues/1). ([7d40a2c](https://github.com/isaul32/ckeditor5-math/commit/7d40a2c))
|
||||
- Fix dependencies resolving problem. Closes [isaul32/ckeditor5-math#1](https://github.com/isaul32/ckeditor5-math/issues/1). ([7d40a2c](https://github.com/isaul32/ckeditor5-math/commit/7d40a2c))
|
||||
|
||||
## [1.0.3](https://github.com/isaul32/ckeditor5-math/compare/v1.0.2...v1.0.3) (2019-10-11)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
* Fix preview flickering effect. ([70fefa8](https://github.com/isaul32/ckeditor5-math/commit/70fefa8))
|
||||
- Fix preview flickering effect. ([70fefa8](https://github.com/isaul32/ckeditor5-math/commit/70fefa8))
|
||||
|
||||
* Fix disabled eslint lines. ([1f96286](https://github.com/isaul32/ckeditor5-math/commit/1f96286))
|
||||
- Fix disabled eslint lines. ([1f96286](https://github.com/isaul32/ckeditor5-math/commit/1f96286))
|
||||
|
||||
### Other changes
|
||||
|
||||
* Update some tests.
|
||||
- Update some tests.
|
||||
|
||||
* Update readme.
|
||||
- Update readme.
|
||||
|
||||
## [1.0.2](https://github.com/isaul32/ckeditor5-math/compare/v1.0.1...v1.0.2) (2019-10-07)
|
||||
|
||||
### Other changes
|
||||
|
||||
* Update readme.
|
||||
- Update readme.
|
||||
|
||||
* Add unique identifier for math preview. ([8b6804c](https://github.com/isaul32/ckeditor5-math/commit/98815fc))
|
||||
- Add unique identifier for math preview. ([8b6804c](https://github.com/isaul32/ckeditor5-math/commit/98815fc))
|
||||
|
||||
## [1.0.1](https://github.com/isaul32/ckeditor5-math/compare/v1.0.0...v1.0.1) (2019-10-04)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
* Fix preview rendering bug. ([070f84e](https://github.com/isaul32/ckeditor5-math/commit/070f84e))
|
||||
- Fix preview rendering bug. ([070f84e](https://github.com/isaul32/ckeditor5-math/commit/070f84e))
|
||||
|
||||
### Other changes
|
||||
|
||||
* Remove paste from office dependency. ([8b6804c](https://github.com/isaul32/ckeditor5-math/commit/8b6804c))
|
||||
- Remove paste from office dependency. ([8b6804c](https://github.com/isaul32/ckeditor5-math/commit/8b6804c))
|
||||
|
||||
## [1.0.0](https://github.com/isaul32/ckeditor5-math/compare/v1.0.0...v1.0.0) (2019-10-03)
|
||||
|
||||
|
122
README.md
122
README.md
@ -2,59 +2,66 @@
|
||||
|
||||
ckeditor5-math is a TeX-based mathematical plugin for CKEditor 5. You can use it to insert, edit, and view mathematical equations and formulas. This plugin supports [MathJax], [KaTeX] and custom typesetting engines.
|
||||
|
||||
[MathJax]: https://www.mathjax.org/
|
||||
[KaTeX]: https://katex.org/
|
||||
[mathjax]: https://www.mathjax.org/
|
||||
[katex]: https://katex.org/
|
||||
|
||||
## Table of contents
|
||||
- [Features](#features)
|
||||
- [Demos](#demos)
|
||||
- [Screenshots](#screenshots)
|
||||
- [Requirements](#requirements)
|
||||
- [Examples](#examples)
|
||||
- [Installation](#installation)
|
||||
* [Styles for Lark theme](#styles-for-lark-theme)
|
||||
- [Configuration & Usage](#configuration--usage)
|
||||
* [Plugin options](#plugin-options)
|
||||
* [Available typesetting engines](#available-typesetting-engines)
|
||||
* [Supported input and output formats](#supported-input-and-output-formats)
|
||||
- [Paste support](#paste-support)
|
||||
* [From plain text](#from-plain-text)
|
||||
- [Autoformat support](#autoformat-support)
|
||||
- [Preview workaround](#preview-workaround)
|
||||
|
||||
- [Features](#features)
|
||||
- [Demos](#demos)
|
||||
- [Screenshots](#screenshots)
|
||||
- [Requirements](#requirements)
|
||||
- [Examples](#examples)
|
||||
- [Installation](#installation)
|
||||
- [Styles for Lark theme](#styles-for-lark-theme)
|
||||
- [Configuration & Usage](#configuration--usage)
|
||||
- [Plugin options](#plugin-options)
|
||||
- [Available typesetting engines](#available-typesetting-engines)
|
||||
- [Supported input and output formats](#supported-input-and-output-formats)
|
||||
- [Paste support](#paste-support)
|
||||
- [From plain text](#from-plain-text)
|
||||
- [Autoformat support](#autoformat-support)
|
||||
- [Preview workaround](#preview-workaround)
|
||||
|
||||
## Features
|
||||
- TeX syntax
|
||||
- Inline and display equations
|
||||
- Preview view
|
||||
- Multiple typesetting engines
|
||||
- Have multiple input and output format
|
||||
- Paste support
|
||||
- from plain text
|
||||
- Autoformat support
|
||||
|
||||
- TeX syntax
|
||||
- Inline and display equations
|
||||
- Preview view
|
||||
- Multiple typesetting engines
|
||||
- Have multiple input and output format
|
||||
- Paste support
|
||||
- from plain text
|
||||
- Autoformat support
|
||||
|
||||
# Demos
|
||||
- [Classic editor with MathJax](https://jsfiddle.net/isaul32/qktj9h7x/)
|
||||
- [Classic editor with KaTex](https://jsfiddle.net/isaul32/3wjrkLdv/)
|
||||
- [Balloon block editor with KaTex](https://jsfiddle.net/isaul32/q01mu8kp/)
|
||||
|
||||
- [Classic editor with MathJax](https://jsfiddle.net/isaul32/qktj9h7x/)
|
||||
- [Classic editor with KaTex](https://jsfiddle.net/isaul32/3wjrkLdv/)
|
||||
- [Balloon block editor with KaTex](https://jsfiddle.net/isaul32/q01mu8kp/)
|
||||
|
||||
## Screenshots
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
## Requirements
|
||||
|
||||
- Use same major version as your CKEditor 5 build
|
||||
- Use same major version as your CKEditor 5 build
|
||||
|
||||
If you get duplicated modules error, you have mismatching versions.
|
||||
|
||||
## Examples
|
||||
|
||||
[Link to examples repository](https://github.com/isaul32/ckeditor5-math-examples)
|
||||
|
||||
## Installation
|
||||
|
||||
Use official classic or inline build as a base:
|
||||
- [CKEditor 5 classic editor build](https://github.com/ckeditor/ckeditor5-build-classic)
|
||||
- [CKEditor 5 inline editor build](https://github.com/ckeditor/ckeditor5-build-inline)
|
||||
|
||||
- [CKEditor 5 classic editor build](https://github.com/ckeditor/ckeditor5-build-classic)
|
||||
- [CKEditor 5 inline editor build](https://github.com/ckeditor/ckeditor5-build-inline)
|
||||
|
||||
Install plugin with NPM or Yarn
|
||||
|
||||
@ -77,7 +84,7 @@ InlineEditor.builtinPlugins = [
|
||||
];
|
||||
```
|
||||
|
||||
__Add math button to toolbar__
|
||||
**Add math button to toolbar**
|
||||
|
||||
```js
|
||||
InlineEditor.defaultConfig = {
|
||||
@ -89,12 +96,15 @@ InlineEditor.defaultConfig = {
|
||||
}
|
||||
};
|
||||
```
|
||||
|
||||
### Styles for Lark theme
|
||||
__Copy theme/ckeditor5-math folder__ from [https://github.com/isaul32/ckeditor5/tree/master/packages/ckeditor5-theme-lark](https://github.com/isaul32/ckeditor5/tree/master/packages/ckeditor5-theme-lark) to your lark theme repository
|
||||
|
||||
**Copy theme/ckeditor5-math folder** from [https://github.com/isaul32/ckeditor5/tree/master/packages/ckeditor5-theme-lark](https://github.com/isaul32/ckeditor5/tree/master/packages/ckeditor5-theme-lark) to your lark theme repository
|
||||
|
||||
## Configuration & Usage
|
||||
|
||||
### Plugin options
|
||||
|
||||
```js
|
||||
InlineEditor.defaultConfig = {
|
||||
// ...
|
||||
@ -111,20 +121,24 @@ InlineEditor.defaultConfig = {
|
||||
```
|
||||
|
||||
### Available typesetting engines
|
||||
__MathJax__
|
||||
- Tested with __latest 2.7__
|
||||
- Has experimental (__CHTML__, __SVG__) support for __3.0.0__ or newer version
|
||||
|
||||
**MathJax**
|
||||
|
||||
- Tested with **latest 2.7**
|
||||
- Has experimental (**CHTML**, **SVG**) support for **3.0.0** or newer version
|
||||
|
||||
[<img src="https://www.mathjax.org/badge/badge-square.svg" width="130" alt="KaTeX">](https://www.mathjax.org/)
|
||||
|
||||
__KaTeX__
|
||||
- Tested with version __0.12.0__
|
||||
**KaTeX**
|
||||
|
||||
- Tested with version **0.12.0**
|
||||
|
||||
[<img src="https://katex.org/img/katex-logo-black.svg" width="130" alt="KaTeX">](https://katex.org/)
|
||||
|
||||
__Custom typesetting__
|
||||
**Custom typesetting**
|
||||
|
||||
Custom typesetting is possible to implement with engine config. For example, custom typesetting feature can be used when use back end rendering.
|
||||
|
||||
```js
|
||||
InlineEditor.defaultConfig = {
|
||||
// ...
|
||||
@ -135,14 +149,16 @@ InlineEditor.defaultConfig = {
|
||||
}
|
||||
}
|
||||
```
|
||||
- __equation__ is equation in TeX format without delimiters.
|
||||
- __element__ is DOM element reserved for rendering.
|
||||
- __display__ is boolean. Typesetting should be inline when false.
|
||||
- __preview__ is boolean. Rendering in preview when true.
|
||||
|
||||
- **equation** is equation in TeX format without delimiters.
|
||||
- **element** is DOM element reserved for rendering.
|
||||
- **display** is boolean. Typesetting should be inline when false.
|
||||
- **preview** is boolean. Rendering in preview when true.
|
||||
|
||||
### Supported input and output formats
|
||||
|
||||
Supported input and output formats are:
|
||||
|
||||
```html
|
||||
<!-- MathJax style http://docs.mathjax.org/en/v2.7-latest/advanced/model.html#how-mathematics-is-stored-in-the-page -->
|
||||
<script type="math/tex">\sqrt{\frac{a}{b}}</script>
|
||||
@ -156,7 +172,8 @@ Supported input and output formats are:
|
||||
### Paste support
|
||||
|
||||
#### From plain text
|
||||
Paste TeX equations with __delimiters__. For example:
|
||||
|
||||
Paste TeX equations with **delimiters**. For example:
|
||||
|
||||
```latex
|
||||
\[ x=\frac{-b\pm\sqrt{b^2-4ac}}{2a} \]
|
||||
@ -171,9 +188,11 @@ or
|
||||
### Autoformat support
|
||||
|
||||
#### Inline mode
|
||||
|
||||
Ctrl+M can be used to add easily math formulas in inline mode.
|
||||
|
||||
#### Display mode
|
||||
|
||||
Autoformat for math can be used to add formula in display mode on a new line by adding `\[` or `$$`. This feature requires additional autoformat plugin to be added.
|
||||
|
||||
Add following lines into your build
|
||||
@ -189,13 +208,14 @@ InlineEditor.builtinPlugins = [
|
||||
```
|
||||
|
||||
## Preview workaround
|
||||
|
||||
`.ck-reset_all *` css rules from ckeditor5-ui and ckeditor5-theme-lark break rendering in preview mode.
|
||||
|
||||
My solution for this is use rendering element outside of CKEditor DOM and place it to right place by using absolute position. Alternative solution could be using iframe, but then typesetting engine's scripts and styles have to copy to child document.
|
||||
|
||||
## Development
|
||||
|
||||
Contributions, improvements and bug fixes are welcome. To aid in this, try out
|
||||
Contributions, improvements and bug fixes are welcome. To aid in this, try out
|
||||
our developer environment w/ live reload support and [CKEditor 5 inspector].
|
||||
|
||||

|
||||
|
||||
To enter a development loop with hot reload support:
|
||||
|
||||
- `git clone https://github.com/isaul32/ckeditor5-math.git`
|
||||
- `cd ckeditor5-math`
|
||||
- `yarn`
|
||||
- `yarn start`
|
||||
- http://localhost:8080
|
||||
- `git clone https://github.com/isaul32/ckeditor5-math.git`
|
||||
- `cd ckeditor5-math`
|
||||
- `yarn`
|
||||
- `yarn start`
|
||||
- http://localhost:8080
|
||||
|
||||
[CKEditor 5 inspector]: https://ckeditor.com/docs/ckeditor5/latest/framework/guides/development-tools.html#ckeditor-5-inspector
|
||||
[ckeditor 5 inspector]: https://ckeditor.com/docs/ckeditor5/latest/framework/guides/development-tools.html#ckeditor-5-inspector
|
||||
|
Loading…
x
Reference in New Issue
Block a user