Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * JBoss, Home of Professional Open Source
   * Copyright 2010, Red Hat, Inc. and individual contributors
   * by the @authors tag. See the copyright.txt in the distribution for a
   * full listing of individual contributors.
   *
   * This is free software; you can redistribute it and/or modify it
   * under the terms of the GNU Lesser General Public License as
   * published by the Free Software Foundation; either version 2.1 of
  * the License, or (at your option) any later version.
  *
  * This software is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  * Lesser General Public License for more details.
  *
  * You should have received a copy of the GNU Lesser General Public
  * License along with this software; if not, write to the Free
  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
  */
 package org.richfaces.component;
 
 import  javax.faces.component.UIComponent;
 import  javax.faces.component.UIInput;
 

The <rich:editor> component is used for creating a WYSIWYG editor on a page.

Author(s):
Lukas Fryc
 
 @JsfComponent(type = ., family = ., generate = "org.richfaces.component.UIEditor", renderer = @JsfRenderer(type = "org.richfaces.EditorRenderer"), facets = @Facet(name = "config", description = @Description("Detailed configuration of editor in JSON format")), tag = @Tag(name = "editor"), attributes = "core-props.xml")
 public abstract class AbstractEditor extends UIInput {
     public static final String COMPONENT_TYPE = "org.richfaces.Editor";
     public static final String COMPONENT_FAMILY = "org.richfaces.Editor";

    

Used to change the configuration of the toolbar's button set. There are two configurations available: basic (default), full (enables all of the features).

It is also possible to define a custom toolbar using the CKEditor toolbar configuration in a config facet

Default is basic

 
     @Attribute(defaultValue = "Basic")
     public abstract String getToolbar();

    

Set the skin of the richfaces editor. Bundled skins include: richfaces, kama, v2, office2003

Default is richfaces

 
     @Attribute(defaultValue = "richfaces")
     public abstract String getSkin();

    
Used to switch the editor into a read-only mode.
 
     @Attribute(defaultValue = "false")
     public abstract boolean isReadonly();

    
The width of the editor
 
     @Attribute(defaultValue = .)
     public abstract String getWidth();

    
The hieght of the editor
 
     @Attribute(defaultValue = .)
     public abstract String getHeight();

    
Code describing the language used in the generated markup for this component.
 
     @Attribute
     public abstract String getLang();

    
The client-side script method to be called once the editor is initialized and ready to be handle user interaction
 
     @Attribute(events = @EventName("init"))
     public abstract String getOninit();

    
The client-side script method to be called when the editor loses focus
 
    @Attribute(events = @EventName("blur"))
    public abstract String getOnblur();

    
The client-side script method to be called when the editor receives focus
    @Attribute(events = @EventName("focus"))
    public abstract String getOnfocus();

    
The client-side script method to be called on blur event when editor content has been changed after previous focus
    @Attribute(events = @EventName(value = "change", defaultEvent = true))
    public abstract String getOnchange();

    
The client-side script method to be called immediately after the editor content has been changed
    @Attribute(events = @EventName("dirty"))
    public abstract String getOndirty();

    
Detailed configuration of editor in JSON format
    @Attribute
    public abstract UIComponent getConfig();
New to GrepCode? Check out our FAQ X