Skip to content

Commit

Permalink
Merge pull request #963 from ubyssey/Pagebreakembed
Browse files Browse the repository at this point in the history
PagebreakAdded
  • Loading branch information
davidkao0902 authored Jun 3, 2020
2 parents 1d2d2ee + b856c00 commit 58d60cb
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 5 deletions.
4 changes: 4 additions & 0 deletions dispatch/modules/content/embeds.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,9 @@ def prepare_data(self, data):
'credit': data.get('credit', None)
}

class PageBreakEmbed(AbstractTemplateEmbed):
TEMPLATE = 'embeds/pagebreak.html'

class GalleryEmbed(AbstractTemplateEmbed):
TEMPLATE = 'embeds/gallery.html'

Expand Down Expand Up @@ -161,3 +164,4 @@ def prepare_data(self, data):
embeds.register('video', VideoEmbed)
embeds.register('image', ImageEmbed)
embeds.register('gallery', GalleryEmbed)
embeds.register('pagebreak', PageBreakEmbed)
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ import {
WidgetEmbed,
PollEmbed,
PodcastEmbed,
InteractiveMapEmbed
InteractiveMapEmbed,
PageBreakEmbed
} from '../../vendor/dispatch-editor'

const embeds = [
Expand All @@ -24,7 +25,8 @@ const embeds = [
WidgetEmbed,
PollEmbed,
PodcastEmbed,
InteractiveMapEmbed
InteractiveMapEmbed,
PageBreakEmbed
]

export default class ArticleContentEditor extends React.Component {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import React from 'react'
import { TextInput } from '../../../components/inputs'

import * as Form from '../../../components/Form'

function PageBreakEmbedComponent(props) {
return (
<div className='page-break'>
<Form.Container>
<Form.Input label='Page break'>
</Form.Input>
</Form.Container>
</div>
)
}


export default {
type: 'pagebreak',
component: PageBreakEmbedComponent,
}

Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import WidgetEmbed from './WidgetEmbed'
import PollEmbed from './PollEmbed'
import PodcastEmbed from './PodcastEmbed'
import InteractiveMapEmbed from './InteractiveMapEmbed'
import PageBreakEmbed from './PageBreakEmbed'

export {
ImageEmbed,
Expand All @@ -17,5 +18,6 @@ export {
WidgetEmbed,
PollEmbed,
PodcastEmbed,
InteractiveMapEmbed
InteractiveMapEmbed,
PageBreakEmbed
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ import {
WidgetEmbed,
PollEmbed,
PodcastEmbed,
InteractiveMapEmbed
InteractiveMapEmbed,
PageBreakEmbed
} from './embeds'

import {
Expand All @@ -34,5 +35,6 @@ export {
WidgetEmbed,
PollEmbed,
PodcastEmbed,
InteractiveMapEmbed
InteractiveMapEmbed,
PageBreakEmbed
}

0 comments on commit 58d60cb

Please sign in to comment.