mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-21 18:01:36 +03:00
dec1250bbf
refs https://github.com/TryGhost/Ghost/issues/9311 - pressing <kbd>Shift+Enter</kbd> will create a `soft-return` atom that adds a `<br>` element to the doc - emulates many rich-text editors that have a similar functionality where it's desirable to add line breaks rather than starting new paragraphs
15 lines
393 B
JavaScript
15 lines
393 B
JavaScript
// Atoms are effectively read-only inline cards
|
|
// Full docs: https://github.com/bustle/mobiledoc-kit/blob/master/ATOMS.md
|
|
|
|
export default [
|
|
// soft-return is triggered by SHIFT+ENTER and allows for line breaks
|
|
// without creating paragraphs
|
|
{
|
|
name: 'soft-return',
|
|
type: 'dom',
|
|
render() {
|
|
return document.createElement('br');
|
|
}
|
|
}
|
|
];
|