diff --git a/app/assets/javascripts/01-types.js b/app/assets/javascripts/01-types.js index e5bd259..c57a9cd 100644 --- a/app/assets/javascripts/01-types.js +++ b/app/assets/javascripts/01-types.js @@ -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 diff --git a/app/assets/javascripts/02-editor.js b/app/assets/javascripts/02-editor.js index 638e55c..5bded20 100644 --- a/app/assets/javascripts/02-editor.js +++ b/app/assets/javascripts/02-editor.js @@ -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)