mirror of
https://github.com/Ionaru/easy-markdown-editor
synced 2025-10-08 13:32:12 -06:00
Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
2996b67ec9 | ||
|
1708e40c42 | ||
|
f1e229f5b8 | ||
|
a602d3b826 |
10
CHANGELOG.md
10
CHANGELOG.md
@ -5,6 +5,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|||||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||||
|
|
||||||
<!-- ## [Unreleased] -->
|
<!-- ## [Unreleased] -->
|
||||||
|
## [2.20.0] - 2025-03-04
|
||||||
|
### Added
|
||||||
|
- Support for `marked` extensions (Thanks to [@codingjoe], [#611], [#514]).
|
||||||
|
|
||||||
## [2.19.0] - 2025-02-18
|
## [2.19.0] - 2025-02-18
|
||||||
### Added
|
### Added
|
||||||
- `updateStatusBar` type to typescript definitions (Thanks to [@borodean], [#519]).
|
- `updateStatusBar` type to typescript definitions (Thanks to [@borodean], [#519]).
|
||||||
@ -268,6 +272,8 @@ Project forked from [SimpleMDE](https://github.com/sparksuite/simplemde-markdown
|
|||||||
- Cursor not always showing in "text" mode over the edit field
|
- Cursor not always showing in "text" mode over the edit field
|
||||||
|
|
||||||
<!-- Linked issues -->
|
<!-- Linked issues -->
|
||||||
|
[#611]: https://github.com/Ionaru/easy-markdown-editor/issues/611
|
||||||
|
[#514]: https://github.com/Ionaru/easy-markdown-editor/issues/514
|
||||||
[#493]: https://github.com/Ionaru/easy-markdown-editor/issues/493
|
[#493]: https://github.com/Ionaru/easy-markdown-editor/issues/493
|
||||||
[#478]: https://github.com/Ionaru/easy-markdown-editor/issues/478
|
[#478]: https://github.com/Ionaru/easy-markdown-editor/issues/478
|
||||||
[#399]: https://github.com/Ionaru/easy-markdown-editor/issues/399
|
[#399]: https://github.com/Ionaru/easy-markdown-editor/issues/399
|
||||||
@ -438,9 +444,11 @@ Project forked from [SimpleMDE](https://github.com/sparksuite/simplemde-markdown
|
|||||||
[@robinvandernoord]: https://github.com/robinvandernoord
|
[@robinvandernoord]: https://github.com/robinvandernoord
|
||||||
[@p1gp1g]: https://github.com/p1gp1g
|
[@p1gp1g]: https://github.com/p1gp1g
|
||||||
[@mayraamaral]: https://github.com/mayraamaral
|
[@mayraamaral]: https://github.com/mayraamaral
|
||||||
|
[@codingjoe]: https://github.com/codingjoe
|
||||||
|
|
||||||
<!-- Linked versions -->
|
<!-- Linked versions -->
|
||||||
[Unreleased]: https://github.com/Ionaru/easy-markdown-editor/compare/2.19.0...HEAD
|
[Unreleased]: https://github.com/Ionaru/easy-markdown-editor/compare/2.20.0...HEAD
|
||||||
|
[2.20.0]: https://github.com/Ionaru/easy-markdown-editor/compare/2.19.0...2.20.0
|
||||||
[2.19.0]: https://github.com/Ionaru/easy-markdown-editor/compare/2.18.0...2.19.0
|
[2.19.0]: https://github.com/Ionaru/easy-markdown-editor/compare/2.18.0...2.19.0
|
||||||
[2.18.0]: https://github.com/Ionaru/easy-markdown-editor/compare/2.17.0...2.18.0
|
[2.18.0]: https://github.com/Ionaru/easy-markdown-editor/compare/2.17.0...2.18.0
|
||||||
[2.17.0]: https://github.com/Ionaru/easy-markdown-editor/compare/2.16.1...2.17.0
|
[2.17.0]: https://github.com/Ionaru/easy-markdown-editor/compare/2.16.1...2.17.0
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
# EasyMDE - Markdown Editor
|
# EasyMDE - Markdown Editor
|
||||||
|
|
||||||
[](https://www.npmjs.com/package/easymde)
|
[](https://www.npmjs.com/package/easymde)
|
||||||
[](https://www.npmjs.com/package/easymde/v/next)
|
[](https://www.npmjs.com/package/easymde/v/next)
|
||||||
|
[](https://www.npmjs.com/package/easymde/v/v3-alpha)
|
||||||
[](https://github.com/Ionaru/easy-markdown-editor/actions?query=branch%3Amaster)
|
[](https://github.com/Ionaru/easy-markdown-editor/actions?query=branch%3Amaster)
|
||||||
|
|
||||||
> This repository is a fork of
|
> This repository is a fork of
|
||||||
|
24
cypress/e2e/5-marked-options/index.html
Normal file
24
cypress/e2e/5-marked-options/index.html
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>Default</title>
|
||||||
|
<link rel="stylesheet" href="../../../dist/easymde.min.css">
|
||||||
|
<script src="../../../dist/easymde.min.js"></script>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<textarea id="textarea"></textarea>
|
||||||
|
<script>
|
||||||
|
const easyMDE = new EasyMDE({
|
||||||
|
renderingConfig: {
|
||||||
|
markedOptions: {
|
||||||
|
headerPrefix: 'header-prefix-',
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
18
cypress/e2e/5-marked-options/marked-options.cy.js
Normal file
18
cypress/e2e/5-marked-options/marked-options.cy.js
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
/// <reference types="cypress" />
|
||||||
|
|
||||||
|
describe('Marked options', () => {
|
||||||
|
beforeEach(() => {
|
||||||
|
cy.visit(__dirname + '/index.html');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('must apply the markedOptions to the markdown parser', () => {
|
||||||
|
cy.get('.EasyMDEContainer').should('be.visible');
|
||||||
|
cy.get('#textarea').should('not.be.visible');
|
||||||
|
|
||||||
|
cy.get('.EasyMDEContainer .CodeMirror').type('# Title{enter}');
|
||||||
|
|
||||||
|
cy.previewOn();
|
||||||
|
|
||||||
|
cy.get('.EasyMDEContainer .editor-preview').should('contain.html', '<h1 id="header-prefix-title">Title</h1>');
|
||||||
|
});
|
||||||
|
});
|
4
package-lock.json
generated
4
package-lock.json
generated
@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "easymde",
|
"name": "easymde",
|
||||||
"version": "2.19.0",
|
"version": "2.20.0",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "easymde",
|
"name": "easymde",
|
||||||
"version": "2.19.0",
|
"version": "2.20.0",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@types/codemirror": "^5.60.10",
|
"@types/codemirror": "^5.60.10",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "easymde",
|
"name": "easymde",
|
||||||
"version": "2.19.0",
|
"version": "2.20.0",
|
||||||
"description": "A simple, beautiful, and embeddable JavaScript Markdown editor that easy to use. Features include autosaving and spell checking.",
|
"description": "A simple, beautiful, and embeddable JavaScript Markdown editor that easy to use. Features include autosaving and spell checking.",
|
||||||
"files": [
|
"files": [
|
||||||
"dist/**/*",
|
"dist/**/*",
|
||||||
|
@ -2045,7 +2045,7 @@ EasyMDE.prototype.markdown = function (text) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Set options
|
// Set options
|
||||||
marked.setOptions(markedOptions);
|
marked.use(markedOptions);
|
||||||
|
|
||||||
// Convert the markdown to HTML
|
// Convert the markdown to HTML
|
||||||
var htmlText = marked.parse(text);
|
var htmlText = marked.parse(text);
|
||||||
|
2
types/easymde.d.ts
vendored
2
types/easymde.d.ts
vendored
@ -101,7 +101,7 @@ declare namespace EasyMDE {
|
|||||||
interface RenderingOptions {
|
interface RenderingOptions {
|
||||||
codeSyntaxHighlighting?: boolean;
|
codeSyntaxHighlighting?: boolean;
|
||||||
hljs?: any;
|
hljs?: any;
|
||||||
markedOptions?: marked.MarkedOptions;
|
markedOptions?: marked.MarkedExtension;
|
||||||
sanitizerFunction?: (html: string) => string;
|
sanitizerFunction?: (html: string) => string;
|
||||||
singleLineBreaks?: boolean;
|
singleLineBreaks?: boolean;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user