Should the editor check for non-edit fields. It should be noted that this technique is not perfect. If the user does the right things, they will still be able to make changes.
Such as highlighting an element below and above the content and hitting a toolbar button or a shortcut key.
Default Value: false
Should the editor animate window movements
Default Value: false unless Animation is found, then true
Remove the scrollbars from the edit area and resize it to fit the content. It will not go any lower than the current config height.
Default Value: false
The URL for the image placeholder to put in when inserting an image.
Default Value: The yahooapis.com address for the current release + 'assets/blankimage.png'
container
- private HTMLElement
Used when dynamically creating the Editor from Javascript with no default textarea.
We will create one and place it in this container. If no container is passed we will append to document.body.
Default Value: false
css
- String
The Base CSS used to format the content of the editor
Default Value:
html {
height: 95%;
}
body {
height: 100%;
padding: 7px; background-color: #fff; font:13px/1.22 arial,helvetica,clean,sans-serif;*font-size:small;*font:x-small;
}
a {
color: blue;
text-decoration: underline;
cursor: pointer;
}
.warning-localfile {
border-bottom: 1px dashed red !important;
}
.yui-busy {
cursor: wait !important;
}
img.selected { //Safari image selection
border: 2px dotted #808080;
}
img {
cursor: pointer !important;
border: none;
}
This will toggle the editor's disabled state. When the editor is disabled, designMode is turned off and a mask is placed over the iframe so no interaction can take place.
All Toolbar buttons are also disabled so they cannot be used.
Default Value: false
Toggle the display of the current Dom path below the editor
Default Value: false
drag
- {Boolean/String}
Set this config to make the Editor draggable, pass 'proxy' to make use YAHOO.util.DDProxy.
The outter wrapper for the entire editor.
Default Value: null
Internal config for the editors container
Default Value: false
Extra user defined css to load after the default SimpleEditor CSS
Default Value: ''
Should we focus the window when the content is ready?
Default Value: false
Config handles if the editor will attach itself to the textareas parent form's submit handler.
If it is set to true, the editor will attempt to attach a submit listener to the textareas parent form.
Then it will trigger the editors save handler and place the new content back into the text area before the form is submitted.
Default Value: false
The height of the editor iframe container, not including the toolbar..
Default Value: Best guessed size of the textarea, for best results use CSS to style the height of the textarea or pass it in as an argument
html
- String
The default HTML to be written to the iframe document before the contents are loaded (Note that the DOCTYPE attr will be added at render item)
Default Value: This HTML requires a few things if you are to override:
{TITLE}, {CSS}, {HIDDEN_CSS}, {EXTRA_CSS}
and {CONTENT}
need to be there, they are passed to YAHOO.lang.substitute to be replace with other strings.
onload="document.body._rteLoaded = true;"
: the onload statement must be there or the editor will not finish loading.
<html>
<head>
<title>{TITLE}</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<style>
{CSS}
</style>
<style>
{HIDDEN_CSS}
</style>
<style>
{EXTRA_CSS}
</style>
</head>
<body onload="document.body._rteLoaded = true;">
{CONTENT}
</body>
</html>
iframe
- private HTMLElement
Internal config for holding the iframe element.
Default Value: null
If true, selection is not required for: fontname, fontsize, forecolor, backcolor.
Default Value: false
Should the Editor limit the allowed execCommands to the ones available in the toolbar. If true, then execCommand and keyboard shortcuts will fail if they are not defined in the toolbar.
Default Value: false
Should we try to adjust the markup for the following types: semantic, css, default or xhtml
Default Value: "semantic"
The max number of undo levels to store.
Default Value: 30
Do we wrap the nodeChange method in a timeout for performance, default: true.
Default Value: true
The number of seconds that need to be in between nodeChange processing
Default Value: 3
A reference to the panel we are using for windows.
Default Value: false
Process the inital textarea data as if it was plain text. Accounting for spaces, tabs and line feeds.
Default Value: false
If true, the editor uses
tags instead of
tags. (Use Shift + Enter to get a
)
Default Value: false
Should we remove linebreaks and extra spaces on cleanup
Default Value: false
Set this to true to make the Editor Resizable with YAHOO.util.Resize. The default config is available: myEditor._resizeConfig
Animation will be ignored while performing this resize to allow for the dynamic change in size of the toolbar.
saveEl
- HTMLElement
When save HTML is called, this element will be updated as well as the source of data.
Default Value: element
textarea
- private HTMLElement
Internal config for holding the textarea element (replaced with element).
Default Value: null
The default toolbar config.
Internal config for the toolbars container
Default Value: false
The width of the editor container.
Default Value: Best guessed size of the textarea, for best results use CSS to style the width of the textarea or pass it in as an argument