Skip to content

Commit

Permalink
Add horizontal rule button (#3076)
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonvarga authored Jan 6, 2021
1 parent 1ba6064 commit faa8ed2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions resources/js/components/fieldtypes/bard/BardFieldtype.vue
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ import {
CodeBlock,
HardBreak,
Heading,
HorizontalRule,
OrderedList,
BulletList,
ListItem,
Expand Down Expand Up @@ -458,6 +459,7 @@ export default {
if (btns.includes('anchor')) exts.push(new Link({ vm: this }));
if (btns.includes('removeformat')) exts.push(new RemoveFormat());
if (btns.includes('image')) exts.push(new Image({ bard: this }));
if (btns.includes('horizontalrule')) exts.push(new HorizontalRule());
if (btns.includes('orderedlist') || btns.includes('unorderedlist')) {
if (btns.includes('orderedlist')) exts.push(new OrderedList());
Expand Down
1 change: 1 addition & 0 deletions resources/js/components/fieldtypes/bard/buttons.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ const availableButtons = () => [
{ name: 'image', text: __('Image'), command: 'image', args: { src: '' }, icon: 'picture-o', condition: (config) => config.container },
{ name: 'code', text: __('Inline Code'), command: 'code', svg: 'angle-brackets-bold' },
{ name: 'codeblock', text: __('Code Block'), command: 'code_block', svg: 'code-block' },
{ name: 'horizontalrule', text: __('Horizontal Rule'), command: 'horizontal_rule', svg: 'range' },
];

const addButtonHtml = (buttons) => {
Expand Down

0 comments on commit faa8ed2

Please sign in to comment.