Ver Mensaje Individual
  #2 (permalink)  
Antiguo 20/06/2008, 15:10
Avatar de Panino5001
Panino5001
Me alejo de Omelas
 
Fecha de Ingreso: mayo-2004
Ubicación: -34.637167,-58.462984
Mensajes: 5.148
Antigüedad: 20 años
Puntos: 834
Respuesta: fckeditor formatear html

En lugar de colocar la identificación del audio de esa manera, podrías usar algo como esto:
iconoAltavoz.gif?audio=algo.mp3
iconoAltavoz.gif?audio=algo2.mp3
iconoAltavoz.gif?audio=algo3.mp3
Luego, cuando tomes el contenido html podrás obtener el valor del archivo de audio, que es un tema que tendrás que plantear con el leguaje de servidor que uses o de otra forma, usando expresiones regulares o lo que sea.
Pero desde javascript, podés insertar una imagen fácilmente usando esto:
Código PHP:
var myf document.getElementById("FCKeditor1___Frame");myf myf.contentWindow.document || myf.contentDocument;var myf2=myf.getElementById('xEditingArea').getElementsByTagName('iframe')[0].contentWindow.document || myf.getElementById('xEditingArea').getElementsByTagName('iframe')[0].contentDocument;myf2.execCommand('InsertImage'false'iconoAltavoz.gif?audio=algo.mp3'); 
Podés ver un ejemplo en marcha yendo a la página demo del fck editor:
http://www.fckeditor.net/demo
y, tras colocar lo que sigue en la barra de direcciones del navegador, hacer click en el botón ir:
Código PHP:
javascript:var myf document.getElementById("FCKeditor1___Frame");myf myf.contentWindow.document || myf.contentDocument;var myf2=myf.getElementById('xEditingArea').getElementsByTagName('iframe')[0].contentWindow.document || myf.getElementById('xEditingArea').getElementsByTagName('iframe')[0].contentDocument;myf2.execCommand('InsertImage'false'http://www.forosdelweb.com/customavatars/avatar65984_1.gif?audio=algo.mp3');void(0); 

Última edición por Panino5001; 22/06/2008 a las 14:56