Kind Editor Documentation

Editor Attributes For Customization

Editor Attributes
The following atributes can be passed in when KE.showorKE.init is called.
  1. id
    ID of TEXTAREA. Must be specified.
    Type:String
  2. items
    Tool bar items. "-" for a new line.
    Type:Array
    Default:
    ['source', 'fullscreen', 'undo', 'redo', 'print', 'cut', 'copy', 'paste',
    'plainpaste', 'wordpaste', 'justifyleft', 'justifycenter', 'justifyright',
    'justifyfull', 'insertorderedlist', 'insertunorderedlist', 'indent', 'outdent', 'subscript',
    'superscript', 'selectall', '-',
    'title', 'fontname', 'fontsize', 'textcolor', 'bgcolor', 'bold',
    'italic', 'underline', 'strikethrough', 'removeformat', 'image',
    'flash', 'media', 'table', 'hr', 'emoticons', 'link', 'unlink', 'about']
             
  3. width
    Editor width, ending with "px" or "%". Inline width style of TEXTAREA will be ignored if this attribute is set.
    Type:String
  4. height
    Editor width, ending with "px". Inline height style of TEXTAREA will be ignored if this attribute is set
    Type:String
  5. minWidth
    Editor minimun width in px.
    Type:Int
    Default:200
  6. minHeight
    Editor minimun height in px.
    Type:Int
    Default:100
  7. filterMode
    Only HTML tags/attributes name defined in htmlTags will be accepted when set to true, or false to accept all tags.
    Type:Boolean
    Default:false
  8. htmlTags
    HTML tags/attributes names to be accepted. Keys for HTML tag names, values HTML attributes. Ones starting with "." for style names.
    Type:Object
    Default:
    {
            font
    : ['color', 'size', 'face', '.background-color'],
            span
    : ['style'],
            div
    : ['class', 'align', 'style'],
            table
    : ['class', 'border', 'cellspacing', 'cellpadding', 'width', 'height', 'align', 'style'],
           
    'td,th': ['class', 'align', 'valign', 'width', 'height', 'colspan', 'rowspan', 'bgcolor', 'style'],
            a
    : ['class', 'href', 'target', 'name', 'style'],
            embed
    : ['src', 'width', 'height', 'type', 'loop', 'autostart', 'quality',
    'style', 'align', 'allowscriptaccess', '/'],
            img
    : ['src', 'width', 'height', 'border', 'alt', 'title', 'align', 'style', '/'],
            hr
    : ['class', '/'],
            br
    : ['/'],
           
    'p,ol,ul,li,blockquote,h1,h2,h3,h4,h5,h6' : ['align', 'style'],
           
    'tbody,tr,strong,b,sub,sup,em,i,u,strike' : []
    }
             
    Note: This attribute works only when filterMode is set to true.
  9. resizeMode
    Could be 2 or 1 or 0. 2 for that width and height are both resizable, 1 for height, 0 for none.
    Type:Int
    Default:2
  10. skinType
    Theme name. Could be "default" or "office".
    Type:String
    Default:oxygen
  11. wyswygMode
    True for WYSIWYG view or false for code view.
    Type:Boolean
    Default:true
  12. autoOnsubmitMode
    If it's set to true, HTML generated by kind editor will be filled back into TEXTAREA when onsubmit of form is fired.
    Type:Boolean
    Default:true
  13. cssPath
    Css path for editor.
    Type:String
    Default:""(empty)
  14. skinsPath
    Theme path for css and images files.
    Type:String
    Default: KE.scriptPath + 'skins/'
  15. pluginsPath
    Path of plugins.
    Type:String
    Default:KE.scriptPath + 'plugins/'
  16. minChangeSize
    Only after more than minChangeSize charactors change, a snapshot  will be taken and put into redo/undo stack.
    Type: Int
    Default:5
  17. loadStyleMode
    To load css file automatically or not. True for yes, false for no.
    Type:Boolean
    Default: true
  18. urlType
    URL type. Could be relative/absolute/domain. Relative for relative path, absolute for absolute path, domain for absolute path with domain name.
    Type:Boolean
    Default:relative
  19. newlineTag
    Tag for new line when end user presses "Enter" key.
    Type:Boolean
    Default:br
Sample:
KE.show({
    id
: "content_1",
    width
: "70%",
    height
: "200px",
    filterMode
: false, //no filter applied on raw HTML
    resizeMode
: 1 //height resizable only
});