)
+ if (nextLeaf === null || currentLeaf.parent !== nextLeaf.parent) {
+ quill.insertEmbed(range.index, 'smartBreak', true, 'user')
+ }
+
+ // Now that we've inserted a line break, move the cursor forward
+ quill.setSelection(range.index + 1, 'silent')
+ }
+ }
+ }
+ }
+}
diff --git a/components/Editor/index.tsx b/components/Editor/index.tsx
index 2d6d7509c0..9186529944 100644
--- a/components/Editor/index.tsx
+++ b/components/Editor/index.tsx
@@ -1,17 +1,27 @@
import classNames from 'classnames'
import _debounce from 'lodash/debounce'
+import _get from 'lodash/get'
+import _includes from 'lodash/includes'
import React from 'react'
+import { QueryResult } from 'react-apollo'
import ReactQuill, { Quill } from 'react-quill'
+import UserList from '~/components/Dropdown/UserList'
+import { Query } from '~/components/GQL'
+import {
+ SearchUsers,
+ SearchUsers_search_edges_node_User
+} from '~/components/GQL/queries/__generated__/SearchUsers'
+import SEARCH_USERS from '~/components/GQL/queries/searchUsers'
import { LanguageConsumer } from '~/components/Language'
+import { Spinner } from '~/components/Spinner'
import contentStyles from '~/common/styles/utils/content.article.css'
import bubbleStyles from '~/common/styles/vendors/quill.bubble.css'
import { translate } from '~/common/utils'
import { EditorDraft } from './__generated__/EditorDraft'
-import blots from './blots'
-import * as config from './config'
+import * as config from './configs/default'
import SideToolbar from './SideToolbar'
import styles from './styles.css'
@@ -27,16 +37,14 @@ interface State {
show: boolean
top: number
}
+ search: string
+ mentionInstance: any
}
-/**
- * Register Custom Blots
- */
-blots.register()
-
class Editor extends React.Component