hum... so it's not possible to make one rich text editor in flash using textArea and As3...
I've made my own a couple of years ago, but is as2 and I wanted to use as3
I'm trying this code and get this error
function funcoes_botoes(e:MouseEvent, b:String) : void {
trace(b);
if(b == "bold_btn") {
tf.textField.getTextFormat(tf.selectionBeginIndex, tf.selectionEndIndex);
trace("caretIndex:", tf.textField.caretIndex);
trace("selectionBeginIndex:", tf.textField.selectionBeginIndex);
trace("selectionEndIndex:", tf.textField.selectionEndIndex);
//
var fn:TextFormat = new TextFormat;
//
if (fn.bold) {
fn.bold = false;
} else {
fn.bold = true;
}
tf.textField.setTextFormat( fn, tf.textField.selectionBeginIndex, tf.textField.selectionEndIndex);
}
}
and the error
Error #2006: The supplied index is out of bounds.