Added support for block quotes
This commit is contained in:
@ -304,7 +304,9 @@ const StyledEditor = styled(Editor)`
|
||||
|
||||
blockquote {
|
||||
border-left: 3px solid #efefef;
|
||||
margin: 1.2em 0;
|
||||
padding-left: 10px;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
table {
|
||||
|
@ -89,6 +89,7 @@ class BlockToolbar extends Component {
|
||||
switch (type) {
|
||||
case 'heading1':
|
||||
case 'heading2':
|
||||
case 'block-quote':
|
||||
case 'code':
|
||||
return this.insertBlock({ type });
|
||||
case 'horizontal-rule':
|
||||
@ -159,6 +160,7 @@ class BlockToolbar extends Component {
|
||||
{this.renderBlockButton('ordered-list', OrderedListIcon)}
|
||||
{this.renderBlockButton('todo-list', TodoListIcon)}
|
||||
<Separator />
|
||||
{this.renderBlockButton('block-quote', Heading2Icon)}
|
||||
{this.renderBlockButton('code', CodeIcon)}
|
||||
{this.renderBlockButton('horizontal-rule', HorizontalRuleIcon)}
|
||||
{this.renderBlockButton('image', ImageIcon)}
|
||||
|
@ -92,6 +92,7 @@ class FormattingToolbar extends Component {
|
||||
<Separator />
|
||||
{this.renderBlockButton('heading1', Heading1Icon)}
|
||||
{this.renderBlockButton('heading2', Heading2Icon)}
|
||||
{this.renderBlockButton('block-quote', Heading2Icon)}
|
||||
<Separator />
|
||||
<ToolbarButton onMouseDown={this.handleCreateLink}>
|
||||
<LinkIcon light />
|
||||
|
@ -9,6 +9,7 @@ const schema = {
|
||||
heading4: { marks: [''] },
|
||||
heading5: { marks: [''] },
|
||||
heading6: { marks: [''] },
|
||||
'block-quote': { marks: [''] },
|
||||
table: {
|
||||
nodes: [{ types: ['table-row', 'table-head', 'table-cell'] }],
|
||||
},
|
||||
@ -31,6 +32,7 @@ const schema = {
|
||||
'heading4',
|
||||
'heading5',
|
||||
'heading6',
|
||||
'block-quote',
|
||||
'code',
|
||||
'horizontal-rule',
|
||||
'image',
|
||||
|
Reference in New Issue
Block a user