rich.toggleFormat(attr, 0, 300); var tf = new textformat(); tf.font = "Futura"; tf.size = 32; rich.setTextFormat(tf, 0, 300); var tf = new textformat(); tf.color = red; tf.size = 18; rich.setTextFormat(tf, 0, 300); var tf = new textformat(); tf.color = blue; tf.italic = true; tf.font = 'Times'; rich.setTextFormat(tf, 0, 300); parent.rich.applyTextAttr("size", this.value, 0, 300); See the richinputtext api documentation for an explanation. Set default format to... Move insertion point to... var tf = new textformat(); tf.color = red; tf.size = 18; rich.setDefaultFormat(tf); var insertionpoint = this.trick.slider.getValue(); if (this.trick.trickcheckbox.getValue()) { this.forceFormatAt(insertionpoint); } this.rich.setSelection(insertionpoint + 1, insertionpoint +1); var tf = new textformat(); tf.color = blue; tf.italic = true; tf.font = 'Times'; rich.setDefaultFormat(tf); var insertionpoint = this.trick.slider.getValue(); if (this.trick.trickcheckbox.getValue()) { this.forceFormatAt(insertionpoint); } this.rich.setSelection(insertionpoint + 1, insertionpoint +1); // Insert some text this.rich.replaceText(index, index, 'AZ'); // Format the text we just inserted this.rich.setTextFormat(this.rich.defaultformat, index, index+2); // Now if you put the insertion point between the A and Z, you'll // get the format specified in default format.