18 lines
328 B
JavaScript
18 lines
328 B
JavaScript
![]() |
import { ofType } from 'redux-epic';
|
||
|
|
||
|
import {
|
||
|
types,
|
||
|
updateFile,
|
||
|
|
||
|
keySelector
|
||
|
} from './';
|
||
|
|
||
|
export default function editorEpic(actions, { getState }) {
|
||
|
return actions::ofType(types.classicEditorUpdated)
|
||
|
.pluck('payload')
|
||
|
.map(content => updateFile({
|
||
|
content,
|
||
|
key: keySelector(getState())
|
||
|
}));
|
||
|
}
|