de
developer.yahoo/yui/editor/
si tienen un var js: [b] html [/ b] cómo asignarlo a php var $ htmlPhp (es el contenido del textarea - var incluye código HTML (tags))?
Obtener los datos desde el Editor
Hay un par de maneras de obtener los datos del editor. La primera manera es dejar que el editor lo haga por usted mediante el establecimiento de la opción de configuración handleSubmit.
Ajuste de la opción de configuración handleSubmit, el Editor intento de unirse a su pare no presentar formas evento. Entonces será llamar a su método saveHTML, a continuación, proceder con el envÃo del formulario.
El modo manual, es para llamar al método saveHTML ti mismo. De este modo:
var myEditor = new YAHOO.widget.Editor('msgpost');myEditor.render(); //Inside an event handler after the Editor is renderedYAHOO.util.Event.on('somebutton', 'click', function() { //Put the HTML back into the text area myEditor.saveHTML(); //The var html will now have the contents of the textarea var html = myEditor.get('element').value;});
var myEditor = new YAHOO.widget.Editor('msgpost');
myEditor.render();
//Inside an event handler after the Editor is rendered
YAHOO.util.Event.on('somebutton', 'click', function() {
//Put the HTML back into the text area
myEditor.saveHTML();
//The var html will now have the contents of the textarea
var [b]html [/b]= myEditor.get('element').value;
});
- var myEditor = new YAHOO.widget.Editor('msgpost');myEditor.render(); //Inside an event handler after the Editor is renderedYAHOO.util.Event.on('somebutton', 'click', function() { //Put the HTML back into the text area myEditor.saveHTML(); //The var html will now have the contents of the textarea var html = myEditor.get('element').value;});
- var myEditor = new YAHOO.widget.Editor('msgpost');
- myEditor.render();
-
- //Inside an event handler after the Editor is rendered
- YAHOO.util.Event.on('somebutton', 'click', function() {
- //Put the HTML back into the text area
- myEditor.saveHTML();
-
- //The var html will now have the contents of the textarea
- var [b]html [/b]= myEditor.get('element').value;
- });