-
+
{children}
diff --git a/app/components/Editor/components/Heading.js b/app/components/Editor/components/Heading.js
index 29a7ccc37..72e97e0ac 100644
--- a/app/components/Editor/components/Heading.js
+++ b/app/components/Editor/components/Heading.js
@@ -14,6 +14,7 @@ type Props = {
editor: Editor,
readOnly: boolean,
component?: string,
+ attributes: Object,
};
function Heading(props: Props) {
@@ -25,6 +26,7 @@ function Heading(props: Props) {
readOnly,
children,
component = 'h1',
+ attributes,
...rest
} = props;
const parentIsDocument = parent instanceof Document;
@@ -39,7 +41,7 @@ function Heading(props: Props) {
emoji && title.match(new RegExp(`^${emoji}\\s`));
return (
- +
{children}
{showPlaceholder &&
{props.children}
+ {props.children}
),
'horizontal-rule': HorizontalRule,
- 'bulleted-list': (props: Props) => {props.children}
,
- 'ordered-list': (props: Props) => {props.children}
,
- 'todo-list': (props: Props) => {props.children}
,
- 'table-row': (props: Props) => {props.children} ,
- 'table-head': (props: Props) => {props.children} ,
- 'table-cell': (props: Props) => {props.children} ,
+ 'bulleted-list': (props: Props) => (
+ {props.children}
+ ),
+ 'ordered-list': (props: Props) => (
+ {props.children}
+ ),
+ 'todo-list': (props: Props) => (
+ {props.children}
+ ),
+ 'table-row': (props: Props) => (
+ {props.children}
+ ),
+ 'table-head': (props: Props) => (
+ {props.children}
+ ),
+ 'table-cell': (props: Props) => (
+ {props.children}
+ ),
code: Code,
image: Image,
link: Link,
diff --git a/app/components/Editor/transforms.js b/app/components/Editor/transforms.js
index 35ef03e9b..d404c570f 100644
--- a/app/components/Editor/transforms.js
+++ b/app/components/Editor/transforms.js
@@ -1,6 +1,6 @@
// @flow
import EditList from './plugins/EditList';
-import type { State } from './types';
+import type { State, Transform } from './types';
const { transforms } = EditList;
@@ -10,9 +10,12 @@ type Options = {
append?: string | Object,
};
-export function splitAndInsertBlock(state: State, options: Options) {
+export function splitAndInsertBlock(
+ transform: Transform,
+ state: State,
+ options: Options
+) {
const { type, wrapper, append } = options;
- let transform = state.transform();
const { document } = state;
const parent = document.getParent(state.startBlock.key);