mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-29 09:59:48 +02:00
Merge branch 'master' of github.com:ianstormtaylor/slate
This commit is contained in:
@@ -284,8 +284,10 @@ class Content extends React.Component {
|
||||
|
||||
throw err
|
||||
}
|
||||
|
||||
const allowEdit = el.isContentEditable || el.closest('[data-slate-void]')
|
||||
return (
|
||||
el.isContentEditable &&
|
||||
allowEdit &&
|
||||
(el === element || el.closest('[data-slate-editor]') === element)
|
||||
)
|
||||
}
|
||||
|
@@ -436,8 +436,10 @@ class ElementInterface {
|
||||
*/
|
||||
|
||||
getDecorations(stack) {
|
||||
const decorations = stack.find('decorateNode', this)
|
||||
const list = Decoration.createList(decorations || [])
|
||||
const allDecorations = stack
|
||||
.map('decorateNode', this)
|
||||
.map(decorations => Decoration.createList(decorations))
|
||||
const list = List(allDecorations).flatten(true)
|
||||
return list
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user