This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//import refetchMediaCards from './refetch-media-cards' //refetch media cards is our logic for rehosting images and refetching embeds. Totally up to you what to do here | |
function refetchMediaCards(item) { | |
return Promise.resolve(item); | |
} | |
export async function convertHTMLToMobiledoc(post, domContext) { | |
try { | |
return domContext.evaluate(postObject => window.tzrPostContentToMobiledoc(postObject), post) | |
.then((bodies) => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MyCustomElement { | |
constructor(id) { | |
let html = this.getHtml(id); | |
let temporaryContainer = document.createElement('div'); | |
temporaryContainer.innerHTML = html.trim(); | |
this.element = temporaryContainer.firstChild; | |
} | |
getElement() { | |
return this.element; |
NewerOlder