mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-24 19:33:02 +03:00
🐛 Fixed pasting html into a KoenigBasicHtmlInput
refs https://github.com/TryGhost/Team/issues/1245 - Several inputs where dismissing the content when pasting HTML without the expected input tag - The inputs where: the caption of the feature image; the email footer; the caption in the bookmark, code, embed, gallery, image, video cards; the callout card title; the product card header and description; the toggle header - This makes sure the wrapper html tag is the expected one. Co-authored-by: - Kevin Ansfield (@kevinansfield)
This commit is contained in:
parent
773d43697c
commit
b03f72c59e
@ -363,6 +363,11 @@ export default Component.extend({
|
||||
}
|
||||
// -----------------------------------------------------------------
|
||||
|
||||
// convert first section to the expected tag type (might be a heading, blockquote, etc)
|
||||
if (pastedPost.sections.head) {
|
||||
pastedPost.sections.head.tagName = this.defaultTag;
|
||||
}
|
||||
|
||||
// same as default
|
||||
editor.run((postEditor) => {
|
||||
const newPosition = postEditor.insertPost(position, pastedPost);
|
||||
|
Loading…
Reference in New Issue
Block a user