Skip to content

Commit

Permalink
Start working on rich paste filtering
Browse files Browse the repository at this point in the history
  • Loading branch information
thibaudcolas committed Mar 10, 2017
1 parent 153c558 commit e2feca2
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions lib/api/behavior.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,22 @@ export default {

blockTypes.filter(block => block.element)
.forEach((block) => {
renderMap[block.type] = { element: block.element };
renderMap[block.type] = {
element: block.element,
};
});

return DefaultDraftBlockRenderMap.merge(Map(renderMap));
renderMap['header-two'] = {
element: 'h2',
aliasedElements: ['h3', 'blockquote'],
};


const t = DefaultDraftBlockRenderMap.merge(Map(renderMap)).delete('header-three').delete('blockquote');

// delete t['header-three'];
// console.log(t.toJS());
return t;
},

/**
Expand Down

0 comments on commit e2feca2

Please sign in to comment.