5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-06-18 11:52:21 +00:00

cargar la imagen de placeholder

This commit is contained in:
f 2020-11-18 13:38:24 -03:00
parent aabd6f1a5b
commit 434bb4a6f1
2 changed files with 4 additions and 3 deletions

View file

@ -87,7 +87,7 @@ const blocks = {
selector: "IMG",
createFn: editorEl => {
const el = document.createElement("IMG")
el.src = "/public/placeholder.png"
el.src = "/placeholder.png"
el.alt = ""
return el
},
@ -118,7 +118,7 @@ const blocks = {
selector: "VIDEO",
createFn: editorEl => {
const el = document.createElement("VIDEO")
el.poster = "/public/placeholder.png"
el.poster = "/placeholder.png"
// Para poder seleccionar el video tenemos que sacarle los
// controles, pero queremos poder verlos para reproducir el video.
// Al hacer click le damos los controles y al salir se los sacamos

View file

@ -330,7 +330,7 @@ function cleanNode (node, contentEl) {
if (child.getAttribute("hspace")) child.removeAttribute("hspace")
if (child.align.length) child.removeAttribute("align")
if (child.name.length) child.removeAttribute("name")
if (!child.src.length) child.src = "/public/placeholder.png"
if (!child.src.length) child.src = "/placeholder.png"
} else if (child.tagName === "FONT") {
moveChildren(child, child.parentElement, child.nextSiling)
child.parentElement.removeChild(child)
@ -429,6 +429,7 @@ function setupEditor (editorEl) {
const editorBtn = id => editorEl.querySelector(`*[data-button="${id}"]`)
// XXX: Por qué está duplicada de types.js esta función?
const tagNameSetFn = tagName => el => {
const newEl = document.createElement(tagName)
moveChildren(el, newEl, null)