mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-24 06:35:49 +03:00
Fixed issues with special formats not closing properly in <KoenigBasicHtmlInput>
no issue - added missing special markup definitions for formats that are allowed via markdown text expansions
This commit is contained in:
parent
72ce1648a2
commit
c4643314f3
@ -14,9 +14,21 @@ import {getLinkMarkupFromRange} from '../utils/markup-utils';
|
||||
import {registerBasicInputTextExpansions} from '../options/text-expansions';
|
||||
import {run} from '@ember/runloop';
|
||||
|
||||
// TODO: extract core to share functionality between this and `{{koenig-editor}}`
|
||||
|
||||
const UNDO_DEPTH = 50;
|
||||
|
||||
// TODO: extract core to share functionality between this and `{{koenig-editor}}`
|
||||
// markups that should not be continued when typing and reverted to their
|
||||
// text expansion style when backspacing over final char of markup
|
||||
const SPECIAL_MARKUPS = {
|
||||
S: '~~',
|
||||
CODE: {
|
||||
char: '`',
|
||||
replace: false
|
||||
},
|
||||
SUP: '^',
|
||||
SUB: '~'
|
||||
};
|
||||
|
||||
export default Component.extend({
|
||||
// public attrs
|
||||
@ -74,7 +86,7 @@ export default Component.extend({
|
||||
|
||||
init() {
|
||||
this._super(...arguments);
|
||||
this.SPECIAL_MARKUPS = [];
|
||||
this.SPECIAL_MARKUPS = SPECIAL_MARKUPS;
|
||||
this._lastSetHtml = this.html;
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user