Ghost/ghost/admin/lib/koenig-editor/addon/options/atoms.js
Kevin Ansfield 34e34618c3 Added soft-break support to callout card editor
refs https://github.com/TryGhost/Team/issues/1206

- added `@allowBr` argument to `<KoenigBasicHtmlInput>` and used it in the callout card
  - when enabled, adds `soft-break` atom and parser, enables `<br>` support in `cleanBasicHtml()`
2021-11-19 10:10:23 +00:00

21 lines
509 B
JavaScript

// Atoms are effectively read-only inline cards
// Full docs: https://github.com/bustle/mobiledoc-kit/blob/master/ATOMS.md
// import createComponentAtom from '../utils/create-component-atom';
export const ATOM_COMPONENT_MAP = {};
// soft-return is triggered by SHIFT+ENTER and allows for line breaks
// without creating paragraphs
export const softReturn = {
name: 'soft-return',
type: 'dom',
render() {
return document.createElement('br');
}
};
export default [
softReturn
];