Skip to content

Commit

Permalink
Merge branch 'article-embeds' into release/2.7
Browse files Browse the repository at this point in the history
  • Loading branch information
petrjasek committed Dec 22, 2023
2 parents 9a03d5f + e2fb5c0 commit 056e0f6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions apps/content_types/content_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,10 @@ class ContentTypesResource(superdesk.Resource):
"type": "boolean",
"default": False,
},
"embeddable": {
"type": "boolean",
"default": False,
},
"created_by": superdesk.Resource.rel("users", nullable=True),
"updated_by": superdesk.Resource.rel("users", nullable=True),
"init_version": {"type": "integer"},
Expand Down
3 changes: 3 additions & 0 deletions superdesk/editor_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
TABLE = "TABLE"
MULTI_LINE_QUOTE = "MULTI-LINE_QUOTE"
IMAGE = "IMAGE"
ARTICLE_EMBED = "ARTICLE_EMBED"

EDITOR_STATE = "draftjsState"
ENTITY_MAP = "entityMap"
Expand Down Expand Up @@ -314,6 +315,8 @@ def __init__(self, content_editor):
TABLE: self.render_table,
MULTI_LINE_QUOTE: self.render_table,
IMAGE: self.render_image,
# TODO: needs to be fixed. I added this for now to simply avoid it from crashing.
ARTICLE_EMBED: lambda props: DOM.create_element("hr"),
},
}
)
Expand Down

0 comments on commit 056e0f6

Please sign in to comment.