Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • osian/sucs-site
  • kais58/sucs-site
  • imranh/sucs-site
  • foshjedi2004/sucs-site
  • gigosaurus/sucs-site
  • matstn/sucs-site
  • ripp_/sucs-site
  • eggnog/sucs-site
  • sucssite/sucs-site
  • elbows/sucs-site
  • realitykiller/sucs-site
  • crox/sucs-site
  • vectre/sucs-site
  • welshbyte/sucs-site
  • paperclipman/sucs-site
15 results
Show changes
Showing
with 0 additions and 1424 deletions
Language packs are from version 2.0.5 removed from the core but can be downloadable from the TinyMCE website.
http://tinymce.moxiecode.com/download.php
The language pack codes are based on ISO-639-1
http://www.loc.gov/standards/iso639-2/englangn.html
Try using entires if possible. å etc.
GNU LIBRARY GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1991 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
[This is the first released version of the library GPL. It is
numbered 2 because it goes with version 2 of the ordinary GPL.]
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
Licenses are intended to guarantee your freedom to share and change
free software--to make sure the software is free for all its users.
This license, the Library General Public License, applies to some
specially designated Free Software Foundation software, and to any
other libraries whose authors decide to use it. You can use it for
your libraries, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if
you distribute copies of the library, or if you modify it.
For example, if you distribute copies of the library, whether gratis
or for a fee, you must give the recipients all the rights that we gave
you. You must make sure that they, too, receive or can get the source
code. If you link a program with the library, you must provide
complete object files to the recipients so that they can relink them
with the library, after making changes to the library and recompiling
it. And you must show them these terms so they know their rights.
Our method of protecting your rights has two steps: (1) copyright
the library, and (2) offer you this license which gives you legal
permission to copy, distribute and/or modify the library.
Also, for each distributor's protection, we want to make certain
that everyone understands that there is no warranty for this free
library. If the library is modified by someone else and passed on, we
want its recipients to know that what they have is not the original
version, so that any problems introduced by others will not reflect on
the original authors' reputations.
.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that companies distributing free
software will individually obtain patent licenses, thus in effect
transforming the program into proprietary software. To prevent this,
we have made it clear that any patent must be licensed for everyone's
free use or not licensed at all.
Most GNU software, including some libraries, is covered by the ordinary
GNU General Public License, which was designed for utility programs. This
license, the GNU Library General Public License, applies to certain
designated libraries. This license is quite different from the ordinary
one; be sure to read it in full, and don't assume that anything in it is
the same as in the ordinary license.
The reason we have a separate public license for some libraries is that
they blur the distinction we usually make between modifying or adding to a
program and simply using it. Linking a program with a library, without
changing the library, is in some sense simply using the library, and is
analogous to running a utility program or application program. However, in
a textual and legal sense, the linked executable is a combined work, a
derivative of the original library, and the ordinary General Public License
treats it as such.
Because of this blurred distinction, using the ordinary General
Public License for libraries did not effectively promote software
sharing, because most developers did not use the libraries. We
concluded that weaker conditions might promote sharing better.
However, unrestricted linking of non-free programs would deprive the
users of those programs of all benefit from the free status of the
libraries themselves. This Library General Public License is intended to
permit developers of non-free programs to use free libraries, while
preserving your freedom as a user of such programs to change the free
libraries that are incorporated in them. (We have not seen how to achieve
this as regards changes in header files, but we have achieved it as regards
changes in the actual functions of the Library.) The hope is that this
will lead to faster development of free libraries.
The precise terms and conditions for copying, distribution and
modification follow. Pay close attention to the difference between a
"work based on the library" and a "work that uses the library". The
former contains code derived from the library, while the latter only
works together with the library.
Note that it is possible for a library to be covered by the ordinary
General Public License rather than by this special one.
.
GNU LIBRARY GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License Agreement applies to any software library which
contains a notice placed by the copyright holder or other authorized
party saying it may be distributed under the terms of this Library
General Public License (also called "this License"). Each licensee is
addressed as "you".
A "library" means a collection of software functions and/or data
prepared so as to be conveniently linked with application programs
(which use some of those functions and data) to form executables.
The "Library", below, refers to any such software library or work
which has been distributed under these terms. A "work based on the
Library" means either the Library or any derivative work under
copyright law: that is to say, a work containing the Library or a
portion of it, either verbatim or with modifications and/or translated
straightforwardly into another language. (Hereinafter, translation is
included without limitation in the term "modification".)
"Source code" for a work means the preferred form of the work for
making modifications to it. For a library, complete source code means
all the source code for all modules it contains, plus any associated
interface definition files, plus the scripts used to control compilation
and installation of the library.
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running a program using the Library is not restricted, and output from
such a program is covered only if its contents constitute a work based
on the Library (independent of the use of the Library in a tool for
writing it). Whether that is true depends on what the Library does
and what the program that uses the Library does.
1. You may copy and distribute verbatim copies of the Library's
complete source code as you receive it, in any medium, provided that
you conspicuously and appropriately publish on each copy an
appropriate copyright notice and disclaimer of warranty; keep intact
all the notices that refer to this License and to the absence of any
warranty; and distribute a copy of this License along with the
Library.
You may charge a fee for the physical act of transferring a copy,
and you may at your option offer warranty protection in exchange for a
fee.
.
2. You may modify your copy or copies of the Library or any portion
of it, thus forming a work based on the Library, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) The modified work must itself be a software library.
b) You must cause the files modified to carry prominent notices
stating that you changed the files and the date of any change.
c) You must cause the whole of the work to be licensed at no
charge to all third parties under the terms of this License.
d) If a facility in the modified Library refers to a function or a
table of data to be supplied by an application program that uses
the facility, other than as an argument passed when the facility
is invoked, then you must make a good faith effort to ensure that,
in the event an application does not supply such function or
table, the facility still operates, and performs whatever part of
its purpose remains meaningful.
(For example, a function in a library to compute square roots has
a purpose that is entirely well-defined independent of the
application. Therefore, Subsection 2d requires that any
application-supplied function or table used by this function must
be optional: if the application does not supply it, the square
root function must still compute square roots.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Library,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Library, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote
it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Library.
In addition, mere aggregation of another work not based on the Library
with the Library (or with a work based on the Library) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may opt to apply the terms of the ordinary GNU General Public
License instead of this License to a given copy of the Library. To do
this, you must alter all the notices that refer to this License, so
that they refer to the ordinary GNU General Public License, version 2,
instead of to this License. (If a newer version than version 2 of the
ordinary GNU General Public License has appeared, then you can specify
that version instead if you wish.) Do not make any other change in
these notices.
.
Once this change is made in a given copy, it is irreversible for
that copy, so the ordinary GNU General Public License applies to all
subsequent copies and derivative works made from that copy.
This option is useful when you wish to copy part of the code of
the Library into a program that is not a library.
4. You may copy and distribute the Library (or a portion or
derivative of it, under Section 2) in object code or executable form
under the terms of Sections 1 and 2 above provided that you accompany
it with the complete corresponding machine-readable source code, which
must be distributed under the terms of Sections 1 and 2 above on a
medium customarily used for software interchange.
If distribution of object code is made by offering access to copy
from a designated place, then offering equivalent access to copy the
source code from the same place satisfies the requirement to
distribute the source code, even though third parties are not
compelled to copy the source along with the object code.
5. A program that contains no derivative of any portion of the
Library, but is designed to work with the Library by being compiled or
linked with it, is called a "work that uses the Library". Such a
work, in isolation, is not a derivative work of the Library, and
therefore falls outside the scope of this License.
However, linking a "work that uses the Library" with the Library
creates an executable that is a derivative of the Library (because it
contains portions of the Library), rather than a "work that uses the
library". The executable is therefore covered by this License.
Section 6 states terms for distribution of such executables.
When a "work that uses the Library" uses material from a header file
that is part of the Library, the object code for the work may be a
derivative work of the Library even though the source code is not.
Whether this is true is especially significant if the work can be
linked without the Library, or if the work is itself a library. The
threshold for this to be true is not precisely defined by law.
If such an object file uses only numerical parameters, data
structure layouts and accessors, and small macros and small inline
functions (ten lines or less in length), then the use of the object
file is unrestricted, regardless of whether it is legally a derivative
work. (Executables containing this object code plus portions of the
Library will still fall under Section 6.)
Otherwise, if the work is a derivative of the Library, you may
distribute the object code for the work under the terms of Section 6.
Any executables containing that work also fall under Section 6,
whether or not they are linked directly with the Library itself.
.
6. As an exception to the Sections above, you may also compile or
link a "work that uses the Library" with the Library to produce a
work containing portions of the Library, and distribute that work
under terms of your choice, provided that the terms permit
modification of the work for the customer's own use and reverse
engineering for debugging such modifications.
You must give prominent notice with each copy of the work that the
Library is used in it and that the Library and its use are covered by
this License. You must supply a copy of this License. If the work
during execution displays copyright notices, you must include the
copyright notice for the Library among them, as well as a reference
directing the user to the copy of this License. Also, you must do one
of these things:
a) Accompany the work with the complete corresponding
machine-readable source code for the Library including whatever
changes were used in the work (which must be distributed under
Sections 1 and 2 above); and, if the work is an executable linked
with the Library, with the complete machine-readable "work that
uses the Library", as object code and/or source code, so that the
user can modify the Library and then relink to produce a modified
executable containing the modified Library. (It is understood
that the user who changes the contents of definitions files in the
Library will not necessarily be able to recompile the application
to use the modified definitions.)
b) Accompany the work with a written offer, valid for at
least three years, to give the same user the materials
specified in Subsection 6a, above, for a charge no more
than the cost of performing this distribution.
c) If distribution of the work is made by offering access to copy
from a designated place, offer equivalent access to copy the above
specified materials from the same place.
d) Verify that the user has already received a copy of these
materials or that you have already sent this user a copy.
For an executable, the required form of the "work that uses the
Library" must include any data and utility programs needed for
reproducing the executable from it. However, as a special exception,
the source code distributed need not include anything that is normally
distributed (in either source or binary form) with the major
components (compiler, kernel, and so on) of the operating system on
which the executable runs, unless that component itself accompanies
the executable.
It may happen that this requirement contradicts the license
restrictions of other proprietary libraries that do not normally
accompany the operating system. Such a contradiction means you cannot
use both them and the Library together in an executable that you
distribute.
.
7. You may place library facilities that are a work based on the
Library side-by-side in a single library together with other library
facilities not covered by this License, and distribute such a combined
library, provided that the separate distribution of the work based on
the Library and of the other library facilities is otherwise
permitted, and provided that you do these two things:
a) Accompany the combined library with a copy of the same work
based on the Library, uncombined with any other library
facilities. This must be distributed under the terms of the
Sections above.
b) Give prominent notice with the combined library of the fact
that part of it is a work based on the Library, and explaining
where to find the accompanying uncombined form of the same work.
8. You may not copy, modify, sublicense, link with, or distribute
the Library except as expressly provided under this License. Any
attempt otherwise to copy, modify, sublicense, link with, or
distribute the Library is void, and will automatically terminate your
rights under this License. However, parties who have received copies,
or rights, from you under this License will not have their licenses
terminated so long as such parties remain in full compliance.
9. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Library or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Library (or any work based on the
Library), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Library or works based on it.
10. Each time you redistribute the Library (or any work based on the
Library), the recipient automatically receives a license from the
original licensor to copy, distribute, link with or modify the Library
subject to these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
.
11. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Library at all. For example, if a patent
license would not permit royalty-free redistribution of the Library by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Library.
If any portion of this section is held invalid or unenforceable under any
particular circumstance, the balance of the section is intended to apply,
and the section as a whole is intended to apply in other circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
12. If the distribution and/or use of the Library is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Library under this License may add
an explicit geographical distribution limitation excluding those countries,
so that distribution is permitted only in or among countries not thus
excluded. In such case, this License incorporates the limitation as if
written in the body of this License.
13. The Free Software Foundation may publish revised and/or new
versions of the Library General Public License from time to time.
Such new versions will be similar in spirit to the present version,
but may differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Library
specifies a version number of this License which applies to it and
"any later version", you have the option of following the terms and
conditions either of that version or of any later version published by
the Free Software Foundation. If the Library does not specify a
license version number, you may choose any version ever published by
the Free Software Foundation.
.
14. If you wish to incorporate parts of the Library into other free
programs whose distribution conditions are incompatible with these,
write to the author to ask for permission. For software which is
copyrighted by the Free Software Foundation, write to the Free
Software Foundation; we sometimes make exceptions for this. Our
decision will be guided by the two goals of preserving the free status
of all derivatives of our free software and of promoting the sharing
and reuse of software generally.
NO WARRANTY
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.
END OF TERMS AND CONDITIONS
tinyMCE.importPluginLanguagePack('template','en,tr,he,nb,ru,ru_KOI8-R,ru_UTF-8,nn,fi,cy,es,is,pl');var TinyMCE_TemplatePlugin={getInfo:function(){return{longname:'Template plugin',author:'Your name',authorurl:'http://www.yoursite.com',infourl:'http://www.yoursite.com/docs/template.html',version:"1.0"};},initInstance:function(inst){alert("Initialization parameter:"+tinyMCE.getParam("template_someparam",false));inst.addShortcut('ctrl','t','lang_template_desc','mceTemplate');},getControlHTML:function(cn){switch(cn){case"template":return tinyMCE.getButtonHTML(cn,'lang_template_desc','{$pluginurl}/images/template.gif','mceTemplate',true);}return"";},execCommand:function(editor_id,element,command,user_interface,value){switch(command){case"mceTemplate":if(user_interface){var template=new Array();template['file']='../../plugins/template/popup.htm';template['width']=300;template['height']=200;tinyMCE.openWindow(template,{editor_id:editor_id,some_custom_arg:"somecustomdata"});tinyMCE.triggerNodeChange(false);}else{alert("execCommand: mceTemplate gets called from popup.");}return true;}return false;},handleNodeChange:function(editor_id,node,undo_index,undo_levels,visual_aid,any_selection){if(node.parentNode.nodeName=="STRONG"||node.parentNode.nodeName=="B"){tinyMCE.switchClass(editor_id+'_template','mceButtonSelected');return true;}tinyMCE.switchClass(editor_id+'_template','mceButtonNormal');},setupContent:function(editor_id,body,doc){},onChange:function(inst){},handleEvent:function(e){top.status="template plugin event: "+e.type;return true;},cleanup:function(type,content,inst){switch(type){case"get_from_editor":alert("[FROM] Value HTML string: "+content);break;case"insert_to_editor":alert("[TO] Value HTML string: "+content);break;case"get_from_editor_dom":alert("[FROM] Value DOM Element "+content.innerHTML);break;case"insert_to_editor_dom":alert("[TO] Value DOM Element: "+content.innerHTML);break;}return content;},_someInternalFunction:function(a,b){return 1;}};tinyMCE.addPlugin("template",TinyMCE_TemplatePlugin);
\ No newline at end of file
/**
* $RCSfile: editor_plugin_src.js,v $
* $Revision: 1.12 $
* $Date: 2006/02/22 20:06:23 $
*
* @author Moxiecode
* @copyright Copyright © 2004-2006, Moxiecode Systems AB, All rights reserved.
*/
/* Import plugin specific language pack */
tinyMCE.importPluginLanguagePack('template', 'en,tr,he,nb,ru,ru_KOI8-R,ru_UTF-8,nn,fi,cy,es,is,pl'); // <- Add a comma separated list of all supported languages
/****
* Steps for creating a plugin from this template:
*
* 1. Change all "template" to the name of your plugin.
* 2. Remove all the callbacks in this file that you don't need.
* 3. Remove the popup.htm file if you don't need any popups.
* 4. Add your custom logic to the callbacks you needed.
* 5. Write documentation in a readme.txt file on how to use the plugin.
* 6. Upload it under the "Plugins" section at sourceforge.
*
****/
// Singleton class
var TinyMCE_TemplatePlugin = {
/**
* Returns information about the plugin as a name/value array.
* The current keys are longname, author, authorurl, infourl and version.
*
* @returns Name/value array containing information about the plugin.
* @type Array
*/
getInfo : function() {
return {
longname : 'Template plugin',
author : 'Your name',
authorurl : 'http://www.yoursite.com',
infourl : 'http://www.yoursite.com/docs/template.html',
version : "1.0"
};
},
/**
* Gets executed when a TinyMCE editor instance is initialized.
*
* @param {TinyMCE_Control} Initialized TinyMCE editor control instance.
*/
initInstance : function(inst) {
// You can take out plugin specific parameters
alert("Initialization parameter:" + tinyMCE.getParam("template_someparam", false));
// Register custom keyboard shortcut
inst.addShortcut('ctrl', 't', 'lang_template_desc', 'mceTemplate');
},
/**
* Returns the HTML code for a specific control or empty string if this plugin doesn't have that control.
* A control can be a button, select list or any other HTML item to present in the TinyMCE user interface.
* The variable {$editor_id} will be replaced with the current editor instance id and {$pluginurl} will be replaced
* with the URL of the plugin. Language variables such as {$lang_somekey} will also be replaced with contents from
* the language packs.
*
* @param {string} cn Editor control/button name to get HTML for.
* @return HTML code for a specific control or empty string.
* @type string
*/
getControlHTML : function(cn) {
switch (cn) {
case "template":
return tinyMCE.getButtonHTML(cn, 'lang_template_desc', '{$pluginurl}/images/template.gif', 'mceTemplate', true);
}
return "";
},
/**
* Executes a specific command, this function handles plugin commands.
*
* @param {string} editor_id TinyMCE editor instance id that issued the command.
* @param {HTMLElement} element Body or root element for the editor instance.
* @param {string} command Command name to be executed.
* @param {string} user_interface True/false if a user interface should be presented.
* @param {mixed} value Custom value argument, can be anything.
* @return true/false if the command was executed by this plugin or not.
* @type
*/
execCommand : function(editor_id, element, command, user_interface, value) {
// Handle commands
switch (command) {
// Remember to have the "mce" prefix for commands so they don't intersect with built in ones in the browser.
case "mceTemplate":
// Show UI/Popup
if (user_interface) {
// Open a popup window and send in some custom data in a window argument
var template = new Array();
template['file'] = '../../plugins/template/popup.htm'; // Relative to theme
template['width'] = 300;
template['height'] = 200;
tinyMCE.openWindow(template, {editor_id : editor_id, some_custom_arg : "somecustomdata"});
// Let TinyMCE know that something was modified
tinyMCE.triggerNodeChange(false);
} else {
// Do a command this gets called from the template popup
alert("execCommand: mceTemplate gets called from popup.");
}
return true;
}
// Pass to next handler in chain
return false;
},
/**
* Gets called ones the cursor/selection in a TinyMCE instance changes. This is useful to enable/disable
* button controls depending on where the user are and what they have selected. This method gets executed
* alot and should be as performance tuned as possible.
*
* @param {string} editor_id TinyMCE editor instance id that was changed.
* @param {HTMLNode} node Current node location, where the cursor is in the DOM tree.
* @param {int} undo_index The current undo index, if this is -1 custom undo/redo is disabled.
* @param {int} undo_levels The current undo levels, if this is -1 custom undo/redo is disabled.
* @param {boolean} visual_aid Is visual aids enabled/disabled ex: dotted lines on tables.
* @param {boolean} any_selection Is there any selection at all or is there only a cursor.
*/
handleNodeChange : function(editor_id, node, undo_index, undo_levels, visual_aid, any_selection) {
// Select template button if parent node is a strong or b
if (node.parentNode.nodeName == "STRONG" || node.parentNode.nodeName == "B") {
tinyMCE.switchClass(editor_id + '_template', 'mceButtonSelected');
return true;
}
// Deselect template button
tinyMCE.switchClass(editor_id + '_template', 'mceButtonNormal');
},
/**
* Gets called when a TinyMCE editor instance gets filled with content on startup.
*
* @param {string} editor_id TinyMCE editor instance id that was filled with content.
* @param {HTMLElement} body HTML body element of editor instance.
* @param {HTMLDocument} doc HTML document instance.
*/
setupContent : function(editor_id, body, doc) {
},
/**
* Gets called when the contents of a TinyMCE area is modified, in other words when a undo level is
* added.
*
* @param {TinyMCE_Control} inst TinyMCE editor area control instance that got modified.
*/
onChange : function(inst) {
},
/**
* Gets called when TinyMCE handles events such as keydown, mousedown etc. TinyMCE
* doesn't listen on all types of events so custom event handling may be required for
* some purposes.
*
* @param {Event} e HTML editor event reference.
* @return true - pass to next handler in chain, false - stop chain execution
* @type boolean
*/
handleEvent : function(e) {
// Display event type in statusbar
top.status = "template plugin event: " + e.type;
return true; // Pass to next handler
},
/**
* Gets called when HTML contents is inserted or retrived from a TinyMCE editor instance.
* The type parameter contains what type of event that was performed and what format the content is in.
* Possible valuses for type is get_from_editor, insert_to_editor, get_from_editor_dom, insert_to_editor_dom.
*
* @param {string} type Cleanup event type.
* @param {mixed} content Editor contents that gets inserted/extracted can be a string or DOM element.
* @param {TinyMCE_Control} inst TinyMCE editor instance control that performes the cleanup.
* @return New content or the input content depending on action.
* @type string
*/
cleanup : function(type, content, inst) {
switch (type) {
case "get_from_editor":
alert("[FROM] Value HTML string: " + content);
// Do custom cleanup code here
break;
case "insert_to_editor":
alert("[TO] Value HTML string: " + content);
// Do custom cleanup code here
break;
case "get_from_editor_dom":
alert("[FROM] Value DOM Element " + content.innerHTML);
// Do custom cleanup code here
break;
case "insert_to_editor_dom":
alert("[TO] Value DOM Element: " + content.innerHTML);
// Do custom cleanup code here
break;
}
return content;
},
// Private plugin internal methods
/**
* This is just a internal plugin method, prefix all internal methods with a _ character.
* The prefix is needed so they doesn't collide with future TinyMCE callback functions.
*
* @param {string} a Some arg1.
* @param {string} b Some arg2.
* @return Some return.
* @type string
*/
_someInternalFunction : function(a, b) {
return 1;
}
};
// Adds the plugin class to the list of available TinyMCE plugins
tinyMCE.addPlugin("template", TinyMCE_TemplatePlugin);
// UK lang variables
/* Remember to namespace the language parameters lang_<your plugin>_<some name> */
tinyMCE.addToLang('',{
template_title : 'This is just a template popup',
template_desc : 'This is just a template button'
});
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>{$lang_template_title}</title>
<script language="javascript" type="text/javascript" src="../../tiny_mce_popup.js"></script>
<script language="javascript" type="text/javascript">
<!--
function init() {
var inst = tinyMCE.selectedInstance;
var elm = inst.getFocusElement();
alert("Got a window argument from plugin: " + tinyMCE.getWindowArg('some_custom_arg'));
// Set the form item value to the selected node element name
document.forms[0].nodename.value = elm.nodeName;
}
function insertSomething() {
// Execute the mceTemplate command without UI this time
tinyMCEPopup.execCommand('mceTemplate');
// Close the dialog
tinyMCEPopup.close();
}
//-->
</script>
<base target="_self" />
</head>
<body onload="tinyMCEPopup.executeOnLoad('init();');">
<form onsubmit="insert();return false;">
<h3>{$lang_template_title}</h3>
<!-- Gets filled with the selected elements name -->
<div style="margin-top: 10px; margin-bottom: 10px">
The selected element name: <input type="text" name="nodename" />
</div>
<div class="mceActionPanel">
<div style="float: left">
<input type="button" id="insert" name="insert" value="{$lang_insert}" onclick="insertSomething();" />
</div>
<div style="float: right">
<input type="button" id="cancel" name="cancel" value="{$lang_cancel}" onclick="tinyMCEPopup.close();" />
</div>
</div>
</form>
</body>
</html>
This is a template/tutorial plugin that where created to help you in the development of own plugins for TinyMCE.
\ No newline at end of file
input.radio {
border: 1px none #000000;
background-color: transparent;
vertical-align: middle;
}
.panel_wrapper div.current {
height: 80px;
}
#width {
width: 50px;
vertical-align: middle;
}
#width2 {
width: 50px;
vertical-align: middle;
}
#size {
width: 100px;
}
tinyMCE.importPluginLanguagePack('advhr','en,tr,de,sv,zh_cn,cs,fa,fr_ca,fr,pl,pt_br,nl,da,he,nb,hu,ru,ru_KOI8-R,ru_UTF-8,nn,fi,es,cy,is,zh_tw,zh_tw_utf8,sk');var TinyMCE_AdvancedHRPlugin={getInfo:function(){return{longname:'Advanced HR',author:'Moxiecode Systems',authorurl:'http://tinymce.moxiecode.com',infourl:'http://tinymce.moxiecode.com/tinymce/docs/plugin_advhr.html',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion}},getControlHTML:function(cn){switch(cn){case"advhr":return tinyMCE.getButtonHTML(cn,'lang_insert_advhr_desc','{$pluginurl}/images/advhr.gif','mceAdvancedHr');}return"";},execCommand:function(editor_id,element,command,user_interface,value){switch(command){case"mceAdvancedHr":var template=new Array();template['file']='../../plugins/advhr/rule.htm';template['width']=250;template['height']=160;template['width']+=tinyMCE.getLang('lang_advhr_delta_width',0);template['height']+=tinyMCE.getLang('lang_advhr_delta_height',0);var size="",width="",noshade="";if(tinyMCE.selectedElement!=null&&tinyMCE.selectedElement.nodeName.toLowerCase()=="hr"){tinyMCE.hrElement=tinyMCE.selectedElement;if(tinyMCE.hrElement){size=tinyMCE.hrElement.getAttribute('size')?tinyMCE.hrElement.getAttribute('size'):"";width=tinyMCE.hrElement.getAttribute('width')?tinyMCE.hrElement.getAttribute('width'):"";noshade=tinyMCE.hrElement.getAttribute('noshade')?tinyMCE.hrElement.getAttribute('noshade'):"";}tinyMCE.openWindow(template,{editor_id:editor_id,size:size,width:width,noshade:noshade,mceDo:'update'});}else{if(tinyMCE.isMSIE){tinyMCE.execInstanceCommand(editor_id,'mceInsertContent',false,'<hr />');}else{tinyMCE.openWindow(template,{editor_id:editor_id,inline:"yes",size:size,width:width,noshade:noshade,mceDo:'insert'});}}return true;}return false;},handleNodeChange:function(editor_id,node,undo_index,undo_levels,visual_aid,any_selection){if(node==null)return;do{if(node.nodeName=="HR"){tinyMCE.switchClass(editor_id+'_advhr','mceButtonSelected');return true;}}while((node=node.parentNode));tinyMCE.switchClass(editor_id+'_advhr','mceButtonNormal');return true;}};tinyMCE.addPlugin("advhr",TinyMCE_AdvancedHRPlugin);
\ No newline at end of file
/**
* $RCSfile: editor_plugin_src.js,v $
* $Revision: 1.19 $
* $Date: 2006/02/10 16:29:37 $
*
* @author Moxiecode
* @copyright Copyright 2004-2006, Moxiecode Systems AB, All rights reserved.
*/
/* Import plugin specific language pack */
tinyMCE.importPluginLanguagePack('advhr', 'en,tr,de,sv,zh_cn,cs,fa,fr_ca,fr,pl,pt_br,nl,da,he,nb,hu,ru,ru_KOI8-R,ru_UTF-8,nn,fi,es,cy,is,zh_tw,zh_tw_utf8,sk');
var TinyMCE_AdvancedHRPlugin = {
getInfo : function() {
return {
longname : 'Advanced HR',
author : 'Moxiecode Systems',
authorurl : 'http://tinymce.moxiecode.com',
infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_advhr.html',
version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
}
},
getControlHTML : function(cn) {
switch (cn) {
case "advhr":
return tinyMCE.getButtonHTML(cn, 'lang_insert_advhr_desc', '{$pluginurl}/images/advhr.gif', 'mceAdvancedHr');
}
return "";
},
/**
* Executes the mceAdvanceHr command.
*/
execCommand : function(editor_id, element, command, user_interface, value) {
// Handle commands
switch (command) {
case "mceAdvancedHr":
var template = new Array();
template['file'] = '../../plugins/advhr/rule.htm'; // Relative to theme
template['width'] = 250;
template['height'] = 160;
template['width'] += tinyMCE.getLang('lang_advhr_delta_width', 0);
template['height'] += tinyMCE.getLang('lang_advhr_delta_height', 0);
var size = "", width = "", noshade = "";
if (tinyMCE.selectedElement != null && tinyMCE.selectedElement.nodeName.toLowerCase() == "hr") {
tinyMCE.hrElement = tinyMCE.selectedElement;
if (tinyMCE.hrElement) {
size = tinyMCE.hrElement.getAttribute('size') ? tinyMCE.hrElement.getAttribute('size') : "";
width = tinyMCE.hrElement.getAttribute('width') ? tinyMCE.hrElement.getAttribute('width') : "";
noshade = tinyMCE.hrElement.getAttribute('noshade') ? tinyMCE.hrElement.getAttribute('noshade') : "";
}
tinyMCE.openWindow(template, {editor_id : editor_id, size : size, width : width, noshade : noshade, mceDo : 'update'});
} else {
if (tinyMCE.isMSIE) {
tinyMCE.execInstanceCommand(editor_id, 'mceInsertContent', false,'<hr />');
} else {
tinyMCE.openWindow(template, {editor_id : editor_id, inline : "yes", size : size, width : width, noshade : noshade, mceDo : 'insert'});
}
}
return true;
}
// Pass to next handler in chain
return false;
},
handleNodeChange : function(editor_id, node, undo_index, undo_levels, visual_aid, any_selection) {
if (node == null)
return;
do {
if (node.nodeName == "HR") {
tinyMCE.switchClass(editor_id + '_advhr', 'mceButtonSelected');
return true;
}
} while ((node = node.parentNode));
tinyMCE.switchClass(editor_id + '_advhr', 'mceButtonNormal');
return true;
}
};
tinyMCE.addPlugin("advhr", TinyMCE_AdvancedHRPlugin);
function init() {
var formObj = document.forms[0];
formObj.width.value = tinyMCE.getWindowArg('width');
formObj.size.value = tinyMCE.getWindowArg('size');
formObj.insert.value = tinyMCE.getLang('lang_' + tinyMCE.getWindowArg('mceDo'),'Insert',true);
if (tinyMCE.getWindowArg('noshade')) {
formObj.noshade.checked = true;
}
if (tinyMCE.getWindowArg('width').lastIndexOf('%')!=-1) {
formObj.width2.value = "%";
formObj.width.value = formObj.width.value.substring(0,formObj.width.value.length-1);
}
}
function insertHR() {
var formObj = document.forms[0];
var width = formObj.width.value;
var size = formObj.size.value;
var html = '<hr';
if (size!='' && size!=0) {
html += ' size="' + size + '"';
}
if (width!='' && width!=0) {
html += ' width="' + width;
if (formObj.width2.value=='%') {
html += '%';
}
html += '"';
}
if (formObj.noshade.checked==true) {
html += ' noshade="noshade"';
}
html += ' />';
tinyMCEPopup.execCommand("mceInsertContent", true, html);
tinyMCEPopup.close();
}
function cancelAction() {
tinyMCEPopup.close();
}
// UK lang variables
tinyMCE.addToLang('',{
insert_advhr_desc : 'Horizontale rule',
insert_advhr_width : 'Width',
insert_advhr_size : 'Height',
insert_advhr_noshade : 'No shadow'
});
Check the TinyMCE documentation for details on this plugin.
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>{$lang_insert_advhr_desc}</title>
<script language="javascript" type="text/javascript" src="../../tiny_mce_popup.js"></script>
<script language="javascript" type="text/javascript" src="jscripts/rule.js"></script>
<script language="javascript" type="text/javascript" src="../../utils/mctabs.js"></script>
<link href="css/advhr.css" rel="stylesheet" type="text/css" />
<base target="_self" />
</head>
<body onload="tinyMCEPopup.executeOnLoad('init();');">
<form onsubmit="insertHR();return false;" action="#">
<div class="tabs">
<ul>
<li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{$lang_insert_advhr_desc}</a></span></li>
</ul>
</div>
<div class="panel_wrapper">
<div id="general_panel" class="panel current">
<table border="0" cellpadding="4" cellspacing="0">
<tr>
<td><label for="width">{$lang_insert_advhr_width}</label></td>
<td nowrap="nowrap">
<input id="width" name="width" type="text" value="" />
<select name="width2" id="width2">
<option value="">px</option>
<option value="%">%</option>
</select>
</td>
</tr>
<tr>
<td><label for="size">{$lang_insert_advhr_size}</label></td>
<td><select id="size" name="size">
<option value="">Normal</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
</select></td>
</tr>
<tr>
<td><label for="noshade">{$lang_insert_advhr_noshade}</label></td>
<td><input type="checkbox" name="noshade" id="noshade" class="radio" /></td>
</tr>
</table>
</div>
</div>
<div class="mceActionPanel">
<div style="float: left">
<input type="button" id="insert" name="insert" value="{$lang_insert}" onclick="insertHR();" />
</div>
<div style="float: right">
<input type="button" id="cancel" name="cancel" value="{$lang_cancel}" onclick="tinyMCEPopup.close();" />
</div>
</div>
</form>
</body>
</html>
/* CSS file for advimage plugin popup */
.mceImageList {
width: 280px;
}
.mceActionPanel {
margin-top: 7px;
}
.alignPreview {
border: 1px solid black;
width: 140px;
height: 140px;
overflow: hidden;
padding: 5px;
}
.checkbox {
border: 0;
}
.panel_wrapper div.current {
height: 305px;
}
#prev {
margin: 0;
border: 1px
solid black;
width: 99%;
height: 150px;
overflow: auto;
}
#align, #classlist {
width: 150px;
}
#width, #height {
vertical-align: middle;
width: 50px;
text-align: center;
}
#vspace, #hspace, #border {
vertical-align: middle;
width: 30px;
text-align: center;
}
#classlist {
width: 180px;
}
input {
width: 280px;
}
#constrain, #onmousemovecheck {
width: auto;
}
#id, #dir, #lang, #usemap, #longdesc {
width: 200px;
}
tinyMCE.importPluginLanguagePack('advimage','en,tr,de,sv,zh_cn,cs,fa,fr_ca,fr,pl,pt_br,nl,he,nb,ru,ru_KOI8-R,ru_UTF-8,nn,cy,es,is,zh_tw,zh_tw_utf8,sk,da');var TinyMCE_AdvancedImagePlugin={getInfo:function(){return{longname:'Advanced image',author:'Moxiecode Systems',authorurl:'http://tinymce.moxiecode.com',infourl:'http://tinymce.moxiecode.com/tinymce/docs/plugin_advimage.html',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion};},getControlHTML:function(cn){switch(cn){case"image":return tinyMCE.getButtonHTML(cn,'lang_image_desc','{$themeurl}/images/image.gif','mceAdvImage');}return"";},execCommand:function(editor_id,element,command,user_interface,value){switch(command){case"mceAdvImage":var template=new Array();template['file']='../../plugins/advimage/image.htm';template['width']=480;template['height']=380;template['width']+=tinyMCE.getLang('lang_advimage_delta_width',0);template['height']+=tinyMCE.getLang('lang_advimage_delta_height',0);var inst=tinyMCE.getInstanceById(editor_id);var elm=inst.getFocusElement();if(elm!=null&&tinyMCE.getAttrib(elm,'class').indexOf('mceItem')!=-1)return true;tinyMCE.openWindow(template,{editor_id:editor_id,inline:"yes"});return true;}return false;},cleanup:function(type,content){switch(type){case"insert_to_editor_dom":var imgs=content.getElementsByTagName("img");for(var i=0;i<imgs.length;i++){var onmouseover=tinyMCE.cleanupEventStr(tinyMCE.getAttrib(imgs[i],'onmouseover'));var onmouseout=tinyMCE.cleanupEventStr(tinyMCE.getAttrib(imgs[i],'onmouseout'));if((src=this._getImageSrc(onmouseover))!=""){if(tinyMCE.getParam('convert_urls'))src=tinyMCE.convertRelativeToAbsoluteURL(tinyMCE.settings['base_href'],src);imgs[i].setAttribute('onmouseover',"this.src='"+src+"';");}if((src=this._getImageSrc(onmouseout))!=""){if(tinyMCE.getParam('convert_urls'))src=tinyMCE.convertRelativeToAbsoluteURL(tinyMCE.settings['base_href'],src);imgs[i].setAttribute('onmouseout',"this.src='"+src+"';");}}break;case"get_from_editor_dom":var imgs=content.getElementsByTagName("img");for(var i=0;i<imgs.length;i++){var onmouseover=tinyMCE.cleanupEventStr(tinyMCE.getAttrib(imgs[i],'onmouseover'));var onmouseout=tinyMCE.cleanupEventStr(tinyMCE.getAttrib(imgs[i],'onmouseout'));if((src=this._getImageSrc(onmouseover))!=""){if(tinyMCE.getParam('convert_urls'))src=eval(tinyMCE.settings['urlconverter_callback']+"(src, null, true);");imgs[i].setAttribute('onmouseover',"this.src='"+src+"';");}if((src=this._getImageSrc(onmouseout))!=""){if(tinyMCE.getParam('convert_urls'))src=eval(tinyMCE.settings['urlconverter_callback']+"(src, null, true);");imgs[i].setAttribute('onmouseout',"this.src='"+src+"';");}}break;}return content;},handleNodeChange:function(editor_id,node,undo_index,undo_levels,visual_aid,any_selection){if(node==null)return;do{if(node.nodeName=="IMG"&&tinyMCE.getAttrib(node,'class').indexOf('mceItem')==-1){tinyMCE.switchClass(editor_id+'_advimage','mceButtonSelected');return true;}}while((node=node.parentNode));tinyMCE.switchClass(editor_id+'_advimage','mceButtonNormal');return true;},_getImageSrc:function(s){var sr,p=-1;if(!s)return"";if((p=s.indexOf('this.src='))!=-1){sr=s.substring(p+10);sr=sr.substring(0,sr.indexOf('\''));return sr;}return"";}};tinyMCE.addPlugin("advimage",TinyMCE_AdvancedImagePlugin);
\ No newline at end of file
/**
* $RCSfile: editor_plugin_src.js,v $
* $Revision: 1.30 $
* $Date: 2006/02/10 16:29:37 $
*
* @author Moxiecode
* @copyright Copyright 2004-2006, Moxiecode Systems AB, All rights reserved.
*/
/* Import plugin specific language pack */
tinyMCE.importPluginLanguagePack('advimage', 'en,tr,de,sv,zh_cn,cs,fa,fr_ca,fr,pl,pt_br,nl,he,nb,ru,ru_KOI8-R,ru_UTF-8,nn,cy,es,is,zh_tw,zh_tw_utf8,sk,da');
var TinyMCE_AdvancedImagePlugin = {
getInfo : function() {
return {
longname : 'Advanced image',
author : 'Moxiecode Systems',
authorurl : 'http://tinymce.moxiecode.com',
infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_advimage.html',
version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
};
},
getControlHTML : function(cn) {
switch (cn) {
case "image":
return tinyMCE.getButtonHTML(cn, 'lang_image_desc', '{$themeurl}/images/image.gif', 'mceAdvImage');
}
return "";
},
execCommand : function(editor_id, element, command, user_interface, value) {
switch (command) {
case "mceAdvImage":
var template = new Array();
template['file'] = '../../plugins/advimage/image.htm';
template['width'] = 480;
template['height'] = 380;
// Language specific width and height addons
template['width'] += tinyMCE.getLang('lang_advimage_delta_width', 0);
template['height'] += tinyMCE.getLang('lang_advimage_delta_height', 0);
var inst = tinyMCE.getInstanceById(editor_id);
var elm = inst.getFocusElement();
if (elm != null && tinyMCE.getAttrib(elm, 'class').indexOf('mceItem') != -1)
return true;
tinyMCE.openWindow(template, {editor_id : editor_id, inline : "yes"});
return true;
}
return false;
},
cleanup : function(type, content) {
switch (type) {
case "insert_to_editor_dom":
var imgs = content.getElementsByTagName("img");
for (var i=0; i<imgs.length; i++) {
var onmouseover = tinyMCE.cleanupEventStr(tinyMCE.getAttrib(imgs[i], 'onmouseover'));
var onmouseout = tinyMCE.cleanupEventStr(tinyMCE.getAttrib(imgs[i], 'onmouseout'));
if ((src = this._getImageSrc(onmouseover)) != "") {
if (tinyMCE.getParam('convert_urls'))
src = tinyMCE.convertRelativeToAbsoluteURL(tinyMCE.settings['base_href'], src);
imgs[i].setAttribute('onmouseover', "this.src='" + src + "';");
}
if ((src = this._getImageSrc(onmouseout)) != "") {
if (tinyMCE.getParam('convert_urls'))
src = tinyMCE.convertRelativeToAbsoluteURL(tinyMCE.settings['base_href'], src);
imgs[i].setAttribute('onmouseout', "this.src='" + src + "';");
}
}
break;
case "get_from_editor_dom":
var imgs = content.getElementsByTagName("img");
for (var i=0; i<imgs.length; i++) {
var onmouseover = tinyMCE.cleanupEventStr(tinyMCE.getAttrib(imgs[i], 'onmouseover'));
var onmouseout = tinyMCE.cleanupEventStr(tinyMCE.getAttrib(imgs[i], 'onmouseout'));
if ((src = this._getImageSrc(onmouseover)) != "") {
if (tinyMCE.getParam('convert_urls'))
src = eval(tinyMCE.settings['urlconverter_callback'] + "(src, null, true);");
imgs[i].setAttribute('onmouseover', "this.src='" + src + "';");
}
if ((src = this._getImageSrc(onmouseout)) != "") {
if (tinyMCE.getParam('convert_urls'))
src = eval(tinyMCE.settings['urlconverter_callback'] + "(src, null, true);");
imgs[i].setAttribute('onmouseout', "this.src='" + src + "';");
}
}
break;
}
return content;
},
handleNodeChange : function(editor_id, node, undo_index, undo_levels, visual_aid, any_selection) {
if (node == null)
return;
do {
if (node.nodeName == "IMG" && tinyMCE.getAttrib(node, 'class').indexOf('mceItem') == -1) {
tinyMCE.switchClass(editor_id + '_advimage', 'mceButtonSelected');
return true;
}
} while ((node = node.parentNode));
tinyMCE.switchClass(editor_id + '_advimage', 'mceButtonNormal');
return true;
},
/**
* Returns the image src from a scripted mouse over image str.
*
* @param {string} s String to get real src from.
* @return Image src from a scripted mouse over image str.
* @type string
*/
_getImageSrc : function(s) {
var sr, p = -1;
if (!s)
return "";
if ((p = s.indexOf('this.src=')) != -1) {
sr = s.substring(p + 10);
sr = sr.substring(0, sr.indexOf('\''));
return sr;
}
return "";
}
};
tinyMCE.addPlugin("advimage", TinyMCE_AdvancedImagePlugin);
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>{$lang_insert_image_title}</title>
<script language="javascript" type="text/javascript" src="../../tiny_mce_popup.js"></script>
<script language="javascript" type="text/javascript" src="../../utils/mctabs.js"></script>
<script language="javascript" type="text/javascript" src="../../utils/form_utils.js"></script>
<script language="javascript" type="text/javascript" src="jscripts/functions.js"></script>
<link href="css/advimage.css" rel="stylesheet" type="text/css" />
<base target="_self" />
</head>
<body id="advimage" onload="tinyMCEPopup.executeOnLoad('init();');" style="display: none">
<form onsubmit="insertAction();return false;" action="#">
<div class="tabs">
<ul>
<li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{$lang_advimage_tab_general}</a></span></li>
<li id="appearance_tab"><span><a href="javascript:mcTabs.displayTab('appearance_tab','appearance_panel');" onmousedown="return false;">{$lang_advimage_tab_appearance}</a></span></li>
<li id="advanced_tab"><span><a href="javascript:mcTabs.displayTab('advanced_tab','advanced_panel');" onmousedown="return false;">{$lang_advimage_tab_advanced}</a></span></li>
</ul>
</div>
<div class="panel_wrapper">
<div id="general_panel" class="panel current">
<fieldset>
<legend>{$lang_advimage_general}</legend>
<table class="properties">
<tr>
<td class="column1"><label id="srclabel" for="src">{$lang_insert_image_src}</label></td>
<td colspan="2"><table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><input name="src" type="text" id="src" value="" onchange="showPreviewImage(this.value);" /></td>
<td id="srcbrowsercontainer">&nbsp;</td>
</tr>
</table></td>
</tr>
<tr id="imagelistsrcrow">
<td class="column1"><label for="imagelistsrc">{$lang_image_list}</label></td>
<td colspan="2" id="imagelistsrccontainer">&nbsp;</td>
</tr>
<tr>
<td class="column1"><label id="altlabel" for="alt">{$lang_insert_image_alt}</label></td>
<td colspan="2"><input id="alt" name="alt" type="text" value="" /></td>
</tr>
<tr>
<td class="column1"><label id="titlelabel" for="title">{$lang_advimage_title}</label></td>
<td colspan="2"><input id="title" name="title" type="text" value="" /></td>
</tr>
</table>
</fieldset>
<fieldset>
<legend>{$lang_advimage_preview}</legend>
<div id="prev"></div>
</fieldset>
</div>
<div id="appearance_panel" class="panel">
<fieldset>
<legend>{$lang_advimage_tab_appearance}</legend>
<table border="0" cellpadding="4" cellspacing="0">
<tr>
<td class="column1"><label id="alignlabel" for="align">{$lang_insert_image_align}</label></td>
<td><select id="align" name="align" onchange="changeAppearance();">
<option value="">{$lang_insert_image_align_default}</option>
<option value="baseline">{$lang_insert_image_align_baseline}</option>
<option value="top">{$lang_insert_image_align_top}</option>
<option value="middle">{$lang_insert_image_align_middle}</option>
<option value="bottom">{$lang_insert_image_align_bottom}</option>
<option value="texttop">{$lang_insert_image_align_texttop}</option>
<option value="absmiddle">{$lang_insert_image_align_absmiddle}</option>
<option value="absbottom">{$lang_insert_image_align_absbottom}</option>
<option value="left">{$lang_insert_image_align_left}</option>
<option value="right">{$lang_insert_image_align_right}</option>
</select>
</td>
<td rowspan="6" valign="top">
<div class="alignPreview">
<img id="alignSampleImg" src="images/sample.gif" alt="{$lang_advimage_example_img}" />
Lorem ipsum, Dolor sit amet, consectetuer adipiscing loreum ipsum edipiscing elit, sed diam
nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.Loreum ipsum
edipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam
erat volutpat.
</div>
</td>
</tr>
<tr>
<td class="column1"><label id="widthlabel" for="width">{$lang_insert_image_dimensions}</label></td>
<td nowrap="nowrap">
<input name="width" type="text" id="width" value="" size="5" maxlength="5" onchange="changeHeight();" /> x
<input name="height" type="text" id="height" value="" size="5" maxlength="5" onchange="changeWidth();" /> px
</td>
</tr>
<tr>
<td>&nbsp;</td>
<td><table border="0" cellpadding="0" cellspacing="0">
<tr>
<td><input id="constrain" type="checkbox" name="constrain" class="checkbox" /></td>
<td><label id="constrainlabel" for="constrain">{$lang_advimage_constrain_proportions}</label></td>
</tr>
</table></td>
</tr>
<tr>
<td class="column1"><label id="vspacelabel" for="vspace">{$lang_insert_image_vspace}</label></td>
<td><input name="vspace" type="text" id="vspace" value="" size="3" maxlength="3" onchange="changeAppearance();updateStyle();" />
</td>
</tr>
<tr>
<td class="column1"><label id="hspacelabel" for="hspace">{$lang_insert_image_hspace}</label></td>
<td><input name="hspace" type="text" id="hspace" value="" size="3" maxlength="3" onchange="changeAppearance();updateStyle();" /></td>
</tr>
<tr>
<td class="column1"><label id="borderlabel" for="border">{$lang_insert_image_border}</label></td>
<td><input id="border" name="border" type="text" value="" size="3" maxlength="3" onchange="changeAppearance();updateStyle();" /></td>
</tr>
<tr>
<td><label id="classlabel" for="classlist">{$lang_class_name}</label></td>
<td colspan="2">
<select id="classlist" name="classlist">
<option value="" selected>{$lang_not_set}</option>
</select>
</td>
</tr>
<tr>
<td class="column1"><label id="stylelabel" for="style">{$lang_advimage_style}</label></td>
<td colspan="2"><input id="style" name="style" type="text" value="" onchange="styleUpdated();" /></td>
</tr>
<!-- <tr>
<td class="column1"><label id="classeslabel" for="classes">{$lang_advimage_classes}</label></td>
<td colspan="2"><input id="classes" name="classes" type="text" value="" onchange="selectByValue(this.form,'classlist',this.value,true);" /></td>
</tr> -->
</table>
</fieldset>
</div>
<div id="advanced_panel" class="panel">
<fieldset>
<legend>{$lang_advimage_swap_image}</legend>
<input type="checkbox" id="onmousemovecheck" name="onmousemovecheck" class="checkbox" onclick="changeMouseMove();" />
<label id="onmousemovechecklabel" for="onmousemovecheck">{$lang_advimage_alt_image}</label>
<table border="0" cellpadding="4" cellspacing="0" width="100%">
<tr>
<td class="column1"><label id="onmouseoversrclabel" for="onmouseoversrc">{$lang_advimage_mouseover}</label></td>
<td><table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><input id="onmouseoversrc" name="onmouseoversrc" type="text" value="" /></td>
<td id="onmouseoversrccontainer">&nbsp;</td>
</tr>
</table></td>
</tr>
<tr id="imagelistoverrow">
<td class="column1"><label for="imagelistover">{$lang_image_list}</label></td>
<td id="imagelistovercontainer">&nbsp;</td>
</tr>
<tr>
<td class="column1"><label id="onmouseoutsrclabel" for="onmouseoutsrc">{$lang_advimage_mouseout}</label></td>
<td class="column2"><table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><input id="onmouseoutsrc" name="onmouseoutsrc" type="text" value="" /></td>
<td id="onmouseoutsrccontainer">&nbsp;</td>
</tr>
</table></td>
</tr>
<tr id="imagelistoutrow">
<td class="column1"><label for="imagelistout">{$lang_image_list}</label></td>
<td id="imagelistoutcontainer">&nbsp;</td>
</tr>
</table>
</fieldset>
<fieldset>
<legend>{$lang_advimage_misc}</legend>
<table border="0" cellpadding="4" cellspacing="0">
<tr>
<td class="column1"><label id="idlabel" for="id">{$lang_advimage_id}</label></td>
<td><input id="id" name="id" type="text" value="" /></td>
</tr>
<tr>
<td class="column1"><label id="dirlabel" for="dir">{$lang_advimage_langdir}</label></td>
<td>
<select id="dir" name="dir" onchange="changeAppearance();">
<option value="">{$lang_not_set}</option>
<option value="ltr">{$lang_advimage_ltr}</option>
<option value="rtl">{$lang_advimage_rtl}</option>
</select>
</td>
</tr>
<tr>
<td class="column1"><label id="langlabel" for="lang">{$lang_advimage_langcode}</label></td>
<td>
<input id="lang" name="lang" type="text" value="" />
</td>
</tr>
<tr>
<td class="column1"><label id="usemaplabel" for="usemap">{$lang_advimage_image_map}</label></td>
<td>
<input id="usemap" name="usemap" type="text" value="" />
</td>
</tr>
<tr>
<td class="column1"><label id="longdesclabel" for="longdesc">{$lang_advimage_long_desc}</label></td>
<td><table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><input id="longdesc" name="longdesc" type="text" value="" /></td>
<td id="longdesccontainer">&nbsp;</td>
</tr>
</table></td>
</tr>
</table>
</fieldset>
</div>
</div>
<div class="mceActionPanel">
<div style="float: left">
<input type="button" id="insert" name="insert" value="{$lang_insert}" onclick="insertAction();" />
</div>
<div style="float: right">
<input type="button" id="cancel" name="cancel" value="{$lang_cancel}" onclick="cancelAction();" />
</div>
</div>
</form>
</body>
</html>