2
0
forked from Wavyzz/dolibarr

fckeditor updated to version 2.6

This commit is contained in:
Regis Houssin
2008-05-02 09:23:36 +00:00
parent 985d0f468f
commit 9e416ee936
278 changed files with 9384 additions and 3744 deletions

View File

@@ -1,7 +1,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- <!--
* FCKeditor - The text editor for Internet - http://www.fckeditor.net * FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben * Copyright (C) 2003-2008 Frederico Caldeira Knabben
* *
* == BEGIN LICENSE == * == BEGIN LICENSE ==
* *
@@ -32,7 +32,7 @@
<h1> <h1>
FCKeditor Documentation</h1> FCKeditor Documentation</h1>
<p> <p>
You can find the official documentation for FCKeditor online, at <a href="http://wiki.fckeditor.net/"> You can find the official documentation for FCKeditor online, at <a href="http://docs.fckeditor.net/">
http://wiki.fckeditor.net/</a>.</p> http://docs.fckeditor.net/</a>.</p>
</body> </body>
</html> </html>

View File

@@ -1,7 +1,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- <!--
* FCKeditor - The text editor for Internet - http://www.fckeditor.net * FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben * Copyright (C) 2003-2008 Frederico Caldeira Knabben
* *
* == BEGIN LICENSE == * == BEGIN LICENSE ==
* *
@@ -32,7 +32,8 @@
<h1> <h1>
FCKeditor Upgrade</h1> FCKeditor Upgrade</h1>
<p> <p>
Please check the following URL for notes regarding upgrade: <a href="http://wiki.fckeditor.net/Developer%27s_Guide/Upgrade"> Please check the following URL for notes regarding upgrade:<br />
http://wiki.fckeditor.net/Developer%27s_Guide/Upgrade</a></p> <a href="http://docs.fckeditor.net/FCKeditor_2.x/Developers_Guide/Installation/Upgrading">
http://docs.fckeditor.net/FCKeditor_2.x/Developers_Guide/Installation/Upgrading</a></p>
</body> </body>
</html> </html>

View File

@@ -1,7 +1,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- <!--
* FCKeditor - The text editor for Internet - http://www.fckeditor.net * FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben * Copyright (C) 2003-2008 Frederico Caldeira Knabben
* *
* == BEGIN LICENSE == * == BEGIN LICENSE ==
* *
@@ -21,431 +21,271 @@
--> -->
<html xmlns="http://www.w3.org/1999/xhtml"> <html xmlns="http://www.w3.org/1999/xhtml">
<head> <head>
<title>FCKeditor - What's New?</title> <title>FCKeditor ChangeLog - What's New?</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css"> <style type="text/css">
body { font-family: arial, verdana, sans-serif } body { font-family: arial, verdana, sans-serif }
p { margin-left: 20px } p { margin-left: 20px }
h1 { border-bottom: solid 1px gray; padding-bottom: 20px }
</style> </style>
</head> </head>
<body> <body>
<h1>
FCKeditor ChangeLog - What's New?</h1>
<h3> <h3>
Version 2.5 Beta</h3> Version 2.6</h3>
<p>
No changes. The stabilization of the 2.6 RC was completed successfully, as expected.</p>
<h3>
Version 2.6 RC</h3>
<p> <p>
New Features and Improvements:</p> New Features and Improvements:</p>
<ul> <ul>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/624">#624</a>] [<a <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2017">#2017</a>] The FCKeditorAPI.Instances
target="_blank" href="http://dev.fckeditor.net/ticket/634">#634</a>] [<a target="_blank" object can now be used to access all FCKeditor instances available in the page.</li>
href="http://dev.fckeditor.net/ticket/1300">#1300</a>] [<a target="_blank" href="http://dev.fckeditor.net/ticket/1301">#1301</a>] <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1980">#1980</a>] <span
Official compatibility support with <strong>Opera 9.50</strong> and <strong>Safari 3</strong> style="color: #ff0000">Attention:</span> By default, the editor now produces &lt;strong&gt;
(WebKit based browsers actually). These browsers are still in Beta, but we are confident and &lt;em&gt; instead of &lt;b&gt; and &lt;i&gt;.</li>
that we'll have amazing results as soon as they get stable. We are continuously
collaborating with Opera Software and Apple to bring a wonderful FCKeditor experience
over their browser platforms.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/494">#494</a>] Introduced
the <strong>new Style System</strong>. We are not anymore relaying on browser features
to apply and remove styles, which guarantees that the editor will <strong>behave in
the same way in all browsers</strong>. It is an incredibly flexible system,
which aims to fit all developer's needs, from Flash content or HTML4 to XHTML 1.0
Strict or XHTML 1.1:
<ul>
<li>All basic formatting features, like Bold and Italic, can be precisely controlled
by using the configuration file (<b>CoreStyles</b> setting). It means that now,
the Bold button, for example, can produce &lt;b&gt;, &lt;strong&gt;, &lt;span class...&gt;,
&lt;span style...&gt; or anything the developer prefers.</li>
<li>Again with the <b>CoreStyles</b> setting, each block format, font, size, and even
the color pickers can precisely reflect end developer's needs.</li>
<li>Because of the above changes, font sizes are much more flexible. <b>Any kind of
font unit</b> can be used, including a mix of units.</li>
<li>All styles, including toolbar bottom styles, are precisely controlled when being
applied to the document. FCKeditor uses an element table derived from the <b>W3C XHTML
DTDs</b> to precisely create the elements, guarantee standards compliant code.</li>
<li><b>No more &lt;font&gt; tags</b>... well... actually, the system is so flexible
that it is up to you to use them or not.</li>
<li>It is possible to configure FCKeditor to produce a truly <b>semantic aware </b>and<b>
XHTML 1.1 compliant </b>code. Check out sample14.html.</li>
<li>It's also possible to precisely control which inline elements must be removed with
the &quot;Remove All&quot; button, by using the &quot;<b>RemoveFormatTags</b>&quot;
setting.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1231">#1231</a>]
[<a target="_blank" href="http://dev.fckeditor.net/ticket/160">#160</a>] Paragraph
<b>indentation</b> and <b>justification</b> now uses style attributes and don't
create unnecessary elements, and &lt;blockquote&gt; is not anymore used for it.
Now, even CSS classes can be used to indent or align text.</li>
<li>All paragraph formatting features work well when EnterMode=br.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/172">#172</a>]
All paragraph formatting features work well when list items too.</li>
</ul>
</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1197">#1197</a>]
[<a target="_blank" href="http://dev.fckeditor.net/ticket/132">#132</a>] The toolbar
now presents a <strong>new button for Blockquote</strong>. The indentation button
will not anymore be used for that.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/125">#125</a>] Table's
<strong>columns size can now be changed by dragging on cell borders</strong>, with
the "dragresizetable" plugin. </li>
<li>The EditorAreaCSS config option can now also be set to a string of paths separated
by commas.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/212">#212</a>] New "<strong>Show
Blocks</strong>" command button in toolbar to show block details in the editing
area. </li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/915">#915</a>] The <strong>
undo/redo system has been revamped</strong> to work the same across Internet Explorer
and Gecko-based browsers (e.g. Firefox). A number of critical bugs in the undo/redo
system are also fixed. </li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/194">#194</a>] The editor
now uses the <strong>Data Processor</strong> technology, which makes it possible
to handle different input formats. A sample of it may be found at "editor/plugins/bbcode/_sample",
that shows some simple BBCode support. </li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/145">#145</a>] The "htaccess.txt"
file has been renamed to ".htaccess" as it doesn't bring security concerns, being
active out of the box.</li>
<li>File Browser and Quick Upload changes:
<ul>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/163">#163</a>] <span
style="color: #ff0000"><strong>Attention:</strong></span> The default connector
in fckconfig.js has been changed from ASP to PHP. If you are using ASP remember
to change the _FileBrowserLanguage and _QuickUploadLanguage settings in your fckconfig.js.
[<a target="_blank" href="http://dev.fckeditor.net/ticket/454">#454</a>] The file
browser and upload connectors have been unified so they can reuse the same configuration
settings.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/865">#865</a>] The ASP
and PHP connectors have been improved so it's easy to select the location of the
destination folder for each file type, and it's no longer necessary to use the "file",
"image", "flash" subfolders<br />
<span style="color: #ff0000"><strong>Attention:</strong></span> The location of
all the connectors have been changed in the fckconfig.js file. Please check your
settings to match the current ones. Also review carefully the config file for your
server language. </li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/688">#688</a>] Now the
Perl quick upload is available. </li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/575">#575</a>] The Python
connector has been rewritten as a WSGI app to be fully compatible with the latest
python frameworks and servers. The QuickUpload feature has been added as well as
all the features available in the PHP connector. Thanks to Mariano Reingart.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/561">#561</a>] The ASP
connector provides an AbsolutePath setting so it's possible to set the url to a
full domain or a relative path and specify that way the physical folder where the
files are stored..</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/333">#333</a>] The Quick
Upload now can use the same ServerPath parameter as the full connector.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/199">#199</a>] The AllowedCommands
configuration setting is available in the asp and php connectors so it's possible
to disallow the upload of files (although the "select file" button will still be
available in the file browser).</li>
</ul>
</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/100">#100</a>] A new configuration
directive "FCKConfig.EditorAreaStyles" has been implemented to allow setting editing
area styles from JavaScript. </li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/102">#102</a>] HTML code
generated by the "Paste As Plain Text" feature now obeys the EnterMode setting.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1266">#1266</a>] Introducing
the HtmlEncodeOutput setting to instruct the editor to HTML-encode some characters
(&amp;, &lt; and &gt;) in the posted data.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/357">#357</a>] Added a
"Remove Anchor" option in the context menu for anchors. </li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1060">#1060</a>] Compatibility
checks with Firefox 3.0 Alpha. </li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/817">#817</a>]
[<a target="_blank" href="http://dev.fckeditor.net/ticket/1077">#1077</a>] New "Merge
Down/Right" commands for merging tables cells in non-Gecko browsers.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1288">#1288</a>] The "More
Colors..." button in color selector popup has been made optional and configurable
by the <strong>EnableMoreFontColors</strong> option. </li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/356">#356</a>] The <strong>
Find and Replace</strong> dialogs are now unified into a single dialog with tabs.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/549">#549</a>] Added a 'None'
option to the FCKConfig.ToolbarLocation option to allow for hidden toolbars.
</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1313">#1313</a>] An XHTML 1.1 target
editor sample has been created as sample14.html. </li>
<li>The ASP, ColdFusion and PHP integration have been aligned to our standards.</li>
</ul> </ul>
<p> <p>
Fixed Bugs:</p> Fixed Bugs:</p>
<ul> <ul>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/71">#71</a>] [<a target="_blank" <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1924">#1924</a>] The dialog
href="http://dev.fckeditor.net/ticket/243">#243</a>] [<a target="_blank" href="http://dev.fckeditor.net/ticket/267">#267</a>] close button is now correctly positioned in IE in RTL languages.</li>
The editor now takes care to not create invalid nested block elements, like creating <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1933">#1933</a>] Placeholder
&lt;form&gt; or &lt;hr&gt; inside &lt;p&gt;. &nbsp;</li> dialog will now display the placeholder value correctly in IE.</li>
<li>[<a target="_blank" href="https://sourceforge.net/tracker/?func=detail&aid=1511298&group_id=75348&atid=543655">SF <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/957">#957</a>] Pressing
Patch 1511298</a>] The CF Component failed on CFMX 6.0</li> Enter or typing after a placeholder with the placeholder plugin will no longer generate
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/639">#639</a>] If the colored text.</li>
FCKConfig.DefaultLinkTarget setting was missing in fckconfig.js the links has target="undefined".</li> <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1952">#1952</a>] Fixed
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/497">#497</a>] Fixed EMBED an issue in FCKTools.FixCssUrls that, other than wrong, was breaking Opera.</li>
attributes handling in IE.</li> <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1695">#1695</a>] Removed
<li>[<a target="_blank" href="https://sourceforge.net/tracker/?func=detail&aid=1315722&group_id=75348&atid=543655">SF Ctrl-Tab hotkey for Source mode and allowed Ctrl-T to work in Firefox.</li>
Patch 1315722</a>] Avoid getting a cached version of the folder contents after uploading <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1666">#1666</a>] Fixed
a file</li> permission denied errors during opening popup menus in IE6 under domain relaxation
<li>[<a target="_blank" href="https://sourceforge.net/tracker/?func=detail&aid=1386086&group_id=75348&atid=543655">SF mode.</li>
Patch 1386086</a>] The php connector has been protected so mkdir doesn't fail if <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1934">#1934</a>] Fixed
there are double slashes.</li> JavaScript errors when calling Selection.EnsureSelection() in dialogs.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/943">#943</a>] The PHP <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1920">#1920</a>] Fixed
connector now specifies that the included files are relative to the current path.</li> SSL warning message when opening image and flash dialogs under HTTPS in IE6.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/560">#560</a>] The PHP <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1955">#1955</a>] [<a
connector will work better if the connector or the userfiles folder is a symlink.</li> target="_blank" href="http://dev.fckeditor.net/ticket/1981">#1981</a>] [<a target="_blank"
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/784">#784</a>] Fixed a href="http://dev.fckeditor.net/ticket/1985">#1985</a>] [<a target="_blank" href="http://dev.fckeditor.net/ticket/1989">#1989</a>]
non initialized $php_errormsg in the PHP connector.</li> Fixed XHTML source formatting errors in non-IE browsers.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/802">#802</a>] The replace <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2000">#2000</a>] The #
dialog will now advance its searching position correctly and is able to search for character is now properly encoded in file names returned by the File Browser.</li>
strings spanning across multiple inline tags.</li> <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1945">#1945</a>] New folders
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/944">#944</a>] The _samples and file names are now properly sanitized against control characters. </li>
didn't work directly from the Mac filesystem.</li> <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1944">#1944</a>] Backslash
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/946">#946</a>] Toolbar character is now disallowed in current folder path.</li>
images didn't show in non-IE browsers if the path contained a space.</li> <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1055">#1055</a>] Added
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/291">#291</a>] [<a logic to override JavaScript errors occurring inside the editing frame due to user
target="_blank" href="http://dev.fckeditor.net/ticket/395">#395</a>] [<a target="_blank" added JavaScript code.</li>
href="http://dev.fckeditor.net/ticket/932">#932</a>] Clicking outside the editor <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1647">#1647</a>] Hitting
it was possible to paste or apply formatting to the rest of the page in IE.</li> ENTER on list items containing block elements will now create new list item elements,
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/137">#137</a>] Fixed FCKConfig.TabSpaces instead of adding further blocks to the same list item.</li>
being ignored, and weird behaviors when pressing tab in edit source mode.</li> <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1411">#1411</a>] Label
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/268">#268</a>] Fixed special only combos now get properly grayed out when moving to source view.</li>
XHTML characters present in event attribute values being converted inappropriately <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2009">#2009</a>] Fixed
when switching to source view.</li> an important bug regarding styles removal on styled text boundaries, introduced
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/272">#272</a>] The toolbar with the 2.6 Beta 1. </li>
was cut sometimes in IE to just one row if there are multiple instances of the editor.</li> <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2011">#2011</a>] Internal
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/515">#515</a>] Tables CSS &lt;style&gt; tags where being outputted when FullPage=true.</li>
in Firefox didn't inherit font styles properly in Standards mode.</li> <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2016">#2016</a>] The Link
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/321">#321</a>] If FCKeditor dialog now properly selects the first field when opening it to modify mailto or
is initially hidden in Firefox it will no longer be necessary to call the oEditor.MakeEditable() anchor links. This problem was also throwing an error in IE.</li>
function.</li> <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2021">#2021</a>] The caret
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/299">#299</a>] The 'Browse will no longer remain behind in the editing area when the placeholder dialog is
Server' button in the Image and Flash dialogs was a little too high.</li> opened.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/931">#931</a>] The BodyId <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2024">#2024</a>] Fixed
and BodyClass configuration settings weren't applied in the preview window.</li> JavaScript error in IE when the user tries to open dialogs in Source mode.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/583">#583</a>] The "noWrap" <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1853">#1853</a>] Setting
attribute for table cells was getting an empty value in Firefox. Thanks to geirhelge.</li> ShiftEnterMode to p or div now works correctly when EnterMode is br.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/141">#141</a>] Fixed incorrect <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1838">#1838</a>] Fixed
startup focus in Internet Explorer after page reloads. </li> the issue where context menus sometimes don't disappear after selecting an option.
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/143">#143</a>] Fixed browser
lockup when the user writes &lt;!--{PS..x}&gt; into the editor in source mode. </li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/174">#174</a>] Fixed incorrect
positioning of FCKeditor in full screen mode. </li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/978">#978</a>] Fixed a
SpellerPages error with ColdFusion when no suggestions where available for a word.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/977">#977</a>] The "shape"
attribute of &lt;area&gt; had its value changed to uppercase in IE.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/996">#996</a>] "OnPaste"
event listeners will now get executed only once.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/289">#289</a>] Removed
debugging popups from page load regarding JavaScript and CSS loading errors.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/328">#328</a>] [<a
target="_blank" href="http://dev.fckeditor.net/ticket/346">#346</a>] [<a target="_blank"
href="http://dev.fckeditor.net/ticket/404">#404</a>] Fixed a number of problems
regarding &lt;pre&gt; blocks:
<ol>
<li>Leading whitespaces and line breaks in &lt;pre&gt; blocks are trimmed when the user
switches between editor mode and source mode;</li>
<li>Pressing Enter inside a &lt;pre&gt; block would split the block into two, but the
expected behavior is simply inserting a line break;</li>
<li>Simple line breaks inside &lt;pre&gt; blocks entered in source mode are being turned
into &lt;br&gt; tags when the user switches to editor mode and back.</li>
</ol>
</li> </li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/581">#581</a>] Fixed the <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2028">#2028</a>] Fixed
issue where the "Maximize the editor size" toolbar button stops working if any of JavaScript error when EnterMode=br and user tries to insert a page break.</li>
the following occurs: <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2002">#2002</a>] Fixed
<ol> the issue where the maximize editor button does not vertically expand the editing
<li>There exists a form input whose name or id is "style" in FCKeditor's host form;</li> area in Firefox.</li>
<li>There exists a form input whose name or id is "className" in FCKeditor's host form;</li> <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1842">#1842</a>] PHP integration:
<li>There exists a form and a form input whose name of id is "style" in the editing fixed filename encoding problems in file browser.</li>
frame.</li> <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1832">#1832</a>] Calling
</ol> FCK.InsertHtml() in non-IE browsers would now activate the document processor as
</li> expected.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/183">#183</a>] Fixed the <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1998">#1998</a>] The native
issue when FCKeditor is being executed in a custom application with the WebBrowser XMLHttpRequest class is now used in IE, whenever it is available.</li>
ActiveX control, hiding the WebBrowser control would incorrectly invoke FCKeditor's <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1792">#1792</a>] In IE,
cleanup routines, causing FCKeditor to stop working.</li> the browser was able to enter in an infinite loop when working with multiple editors
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/539">#539</a>] Fixed the in the same page. </li>
issue where right clicking on a table inside the editing frame in Firefox would <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1948">#1948</a>] Some
cause the editor the scroll to the top of the document.</li> CSS rules are reset to dialog elements to avoid conflict with the page CSS.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/523">#523</a>] Fixed the <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1965">#1965</a>] IE was
issue where, under certain circumstances, FCKeditor would obtain focus at startup having problems with SpellerPages, causing some errors to be thrown when completing
even though FCKConfig.StartupFocus is set to false. </li> the spell checking in some situations.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/393">#393</a>] Fixed the <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2042">#2042</a>] The FitWindow
issue where if an inline tag is at the end of the document, the user would have command was throwing an error if executed in an editor where its relative button
no way of escaping from the inline tag if he continues typing at the end of the is not present in the toolbar.</li>
document. FCKeditor's behaviors regarding inline tags has been made to be more like <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/922">#922</a>] Implemented
MS Word's: a generic document processor for &lt;OBJECT&gt; and &lt;EMBED&gt; tags.</li>
<ol> <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1831">#1831</a>] Fixed
<li>If the caret is moved to the end of a hyperlink by the keyboard, then hyperlink the issue where the placeholder icon for &lt;EMBED&gt; tags does not always show
mode is disabled. </li> up in IE7.</li>
<li>If the caret is moved to the end of other styled inline tags by any key other than <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2049">#2049</a>] Fixed
the End key (like bold text or italic text), the original bold/italic/... modes a deleted cursor CSS attribute in the minified CSS inside fck_dialog_common.js.</li>
would continue to be effective. </li> <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1806">#1806</a>] In IE,
<li>If the caret is moved to the end of other styled inline tags by the End key, all the caret will not any more move to the previous line when selecting a Format style
style tag modes (e.g. bold, italic, underline, etc.) would be canceled. This is inside an empty paragraph.</li>
not consistent with MS Word, but provides a convenient way for the user to escape <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1990">#1990</a>] In IE,
the inline tag at the end of a line.</li> dialogs using API calls which deals with the selection, like InsertHtml now can
</ol> be sure the selection will be placed in the correct position.</li>
</li> <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1997">#1997</a>] With
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/338">#338</a>] Fixed the IE, the first character of table captions where being lost on table creation.</li>
issue where the configuration directive FCKConfig.ForcePasteAsPlainText is ignored <li>The selection and cursor position was not being properly handled when creating some
when new contents are pasted into the editor via drag-and drop from outside of the elements like forms and tables.</li>
editor. </li> <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/662">#662</a>] In the
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1026">#1026</a>] Fixed Perl sample files, the GetServerPath function will now calculate the path properly.</li>
the issue where the cursor or selection positions are not restored with undo/redo </ul>
commands correctly in IE, under some circumstances. </li> <h3>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1160">#1160</a>] [<a Version 2.6 Beta 1</h3>
target="_blank" href="http://dev.fckeditor.net/ticket/1184">#1184</a>] Home, End <p>
and Tab keys are working properly for numeric fields in dialogs. </li> New Features and Improvements:</p>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/68">#68</a>] The style <ul>
system now properly handles Format styles when EnterMode=br.</li> <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/35">#35</a>] <strong>New
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/525">#525</a>] The union (and cool!) floating dialog system</strong>, avoiding problems with popup blockers
if successive DIVs will work properly now if EnterMode!=div.</li> and enhancing the editor usability.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1227">#1227</a>] The color <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1886">#1886</a>] <strong>
commands used an unnecessary temporary variable. Thanks to Matthias Miller</li> Adobe AIR</strong> compatibility.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/67">#67</a>] [<a target="_blank" <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/123">#123</a>] Full support
href="http://dev.fckeditor.net/ticket/277">#277</a>] [<a target="_blank" href="http://dev.fckeditor.net/ticket/427">#427</a>] for <strong>document.domain</strong> with automatic domain detection.</li>
[<a target="_blank" href="http://dev.fckeditor.net/ticket/428">#428</a>] [<a target="_blank" <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1622">#1622</a>] New <strong>
href="http://dev.fckeditor.net/ticket/965">#965</a>] [<a target="_blank" href="http://dev.fckeditor.net/ticket/1178">#1178</a>] inline CSS cache</strong> feature, making it possible to avoid downloading the CSS
[<a target="_blank" href="http://dev.fckeditor.net/ticket/1267">#1267</a>] The list files for the editing area and skins. For that, it is enough to set the EditorAreaCSS,
insertion/removal/indent/outdent logic in FCKeditor has been rewritten, such that: SkinEditorCSS and SkinDialogCSS to string values in the format "/absolute/path/for/urls/|&lt;minified
<ol> CSS styles". All internal CSS links are already using this feature. </li>
<li>Text separated by &lt;br&gt; will always be treated as separate items during list <li>New language file for <strong>Canadian French</strong>.</li>
insertion regardless of browser;</li>
<li>List removal will now always obey the FCKConfig.EnterMode setting;</li>
<li>List indentation will be XHTML 1.1 compliant - all child elements under an &lt;ol&gt;
or &lt;ul&gt; must be &lt;li&gt; nodes;</li>
<li>IE editor hacks like &lt;ul type=&quot;1&quot;&gt; will no longer appear;</li>
<li>Excessive &lt;div&gt; nodes are no longer inserted into list items due to alignment
changes.</li>
</ol>
</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/205">#205</a>] Fixed the
issue where visible &gt;br&lt; tags at the end of paragraphs are incorrectly removed
after switching to and from source mode.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1050">#1050</a>] Fixed
a minor PHP/XML incompatibility bug in editor/dialog/fck_docprops.html.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/462">#462</a>] Fixed an
algorithm bug in switching from source mode to WYSIWYG mode which causes the browser
to spin up and freeze for broken HTML code inputs.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1019">#1019</a>] Table
command buttons are now disabled when the current selection is not inside a table.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/135">#135</a>] Fixed the
issue where context menus are misplaced in FCKeditor when FCKeditor is created inside
a &gt;div&lt; node with scrolling. </li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1067">#1067</a>] Fixed
the issue where context menus are misplaced in Safari when FCKeditor is scrolled
down.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1081">#1081</a>] Fixed
the issue where undoing table deletion in IE7 would cause JavaScript errors.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1061">#1061</a>] Fixed
the issue where backspace and delete cannot delete special characters in Firefox
under some circumstances.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/403">#403</a>] Fixed the
issue where switching to and from source mode in full page mode under IE would add
excessive line breaks to &lt;style&gt; blocks.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/121">#121</a>] Fixed the
issue where maximizing FCKeditor inside a frameset would resize FCKeditor to the
whole window's size instead of just the container frame's size.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1093">#1093</a>] Fixed
the issue where pressing Enter inside an inline tag would not create a new paragraph
correctly.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1089">#1089</a>] Fixed
the issue where pressing Enter inside a &lt;pre&gt; block do not generate visible
line breaks in IE.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/332">#332</a>] Hitting
Enter when the caret is at the end of a hyperlink will no longer continue the link
at the new paragraph.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1121">#1121</a>] Hitting
Enter with FCKConfig.EnterMode=br will now scroll the document correctly when the
new lines have exceeded the lower boundary of the editor frame.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1063">#1063</a>] [<a
target="_blank" href="http://dev.fckeditor.net/ticket/1084">#1084</a>] [<a target="_blank"
href="http://dev.fckeditor.net/ticket/1092">#1092</a>] Fixed a few Norwegian
language translation errors.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1148">#1148</a>] Fixed
the issue where the &quot;Automatic&quot; and &quot;More Colors...&quot; buttons
in the color selection panel are not centered in Safari.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1187">#1187</a>] Fixed
the issue where the &quot;Paste as plain text&quot; command cannot be undone in
non-IE browsers.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1222">#1222</a>] Ctrl-Backspace
operations will now save undo snapshots in all browsers.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1223">#1223</a>] Fixed
the issue where the insert link dialog would save multiple undo snapshots for a
single operation.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/247">#247</a>] Fixed the
issue where deleting everything in the document in IE would create an empty &lt;p&gt;
block in the document regardless of EnterMode setting. </li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1280">#1280</a>] Fixed
the issue where opening a combo box will cause the editor frames to lose focus when
there are multiple editors in the same document.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/363">#363</a>] Fixed the
issue where the Find dialog does not work under Opera.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/50">#50</a>] Fixed the
issue where the Paste button is always disabled in Safari.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/389">#389</a>] Pasting
text with comments from Word won't generate errors in IE, thanks to the idea from
Swift.</li>
<li>The pasting area in the Paste from Word dialog is focused on initial load</li>
<li>Some fixes related to html comment handling in the Word clean up routine</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1303">#1303</a>] &lt;col&gt;
is correctly treated as an empty element.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/969">#969</a>] Removed
unused files (fcknumericfield.htc and moz-bindings.xml).</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1166">#1166</a>] Fixed
the issue where &lt;meta&gt; tags are incorrectly outputted with closing tags in
full page mode.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1200">#1200</a>] Fixed
the issue where context menus sometimes disappear prematurely before the user can
click on any items in Opera.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1315">#1315</a>] Fixed
the issue where the source view text area in Safari is displayed with an excessive
blue border.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1201">#1201</a>] Fixed
the issue where hitting Backspace or Delete inside a table cell deletes the table
cell instead of its contents in Opera.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1311">#1311</a>] Fixed
the issue where undoing and redoing a special character insertion would send the
caret to incorrect positions. (e.g. the beginning of document)</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/923">#923</a>] Font colors
are now properly applied on links.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1316">#1316</a>] Fixed the issue
where the image dialog expands to a size too big in Safari.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1306">#1306</a>]
[<a target="_blank" href="http://dev.fckeditor.net/ticket/894">#894</a>]
The undo system can now undo text formatting steps like setting fonts to bold and italic.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/95">#95</a>] Fixed the issue where
FCKeditor breaks &lt;meta&gt; tags in full page mode in some circumstances.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/175">#175</a>] Fixed the issue
where entering an email address with a '%' sign in the insert link dialog would cause
JavaScript error.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/180">#180</a>] Improved backward
compatibility with older PHP versions. FCKeditor can now work with PHP versions down to
4.0.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/192">#192</a>] Document modifying
actions from the FCKeditor JavaScript API will now save undo steps.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/246">#246</a>] Using text formatting
commands in EnterMode=div will no longer cause tags to randomly disappear.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/327">#327</a>] It is no longer
possible for the browser's back action to misfire when a user presses backspace while an
image is being selected in FCKeditor.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/362">#362</a>] Ctrl-Backspace now
works in FCKeditor.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/390">#390</a>] Text alignment and
justification commands now respects EnterMode=br paragraph rules.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/534">#534</a>] Pressing Ctrl-End
while the document contains a list towards the end will no longer make the cursor
disappear.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/906">#906</a>] It is now possible
to have XHTML 1.0 Strict compliant output from a document pasted from Word.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/929">#929</a>] Pressing the Enter
key will now produce an undo step.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/934">#934</a>] Fixed the "Cannot
execute code from a freed script" error in IE from editor dialogs.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/942">#942</a>] Server based spell
checking with ColdFusion integration no longer breaks fir non en_US languages.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/942">#1056</a>] Deleting everything
in the editor document and moving the cursor around will no longer leave the cursor hanging
beyond the top of the editor document.</li>
</ul> </ul>
<p> <p>
# This version has been <a href="http://dev.fckeditor.net/wiki/SD/COE">partially sponsored</a> Fixed Bugs:</p>
by the <a href="http://www.coe.int/">Council of Europe</a>. <ul>
</p> <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1643">#1643</a>] Resolved
several "strict warning" messages in Firefox when running FCKeditor.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1522">#1522</a>] The ENTER
key will now work properly in IE with the cursor at the start of a formatted block.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1503">#1503</a>] It's
possible to define in the Styles that a Style (with an empty class) must be shown
selected only when no class is present in the current element, and selecting that
item will clear the current class (it does apply to any attribute, not only classes).</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/191">#191</a>] The scrollbars
are now being properly shown in Firefox Mac when placing FCKeditor inside a hidden
div.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/503">#503</a>] Orphaned
&lt;li&gt; elements now get properly enclosed in a &lt;ul&gt; on output.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/309">#309</a>] The ENTER
key will not any more break &lt;button&gt; elements at the beginning of paragraphs.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1654">#1654</a>] The editor
was not loading on a specific unknown situation. The breaking point has been removed.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1707">#1707</a>] The editor
no longer hangs when operating on documents imported from Microsoft Word.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1514">#1514</a>] Floating
panels attached to a shared toolbar among multiple FCKeditor instances are no longer
misplaced when the editing areas are absolutely or relatively positioned.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1715">#1715</a>] The ShowDropDialog
is now enforced only when ForcePasteAsPlainText = true.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1336">#1336</a>] Sometimes
the autogrow plugin didn't work properly in Firefox.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1728">#1728</a>] External
toolbars are now properly sized in Opera.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1782">#1782</a>] Clicking
on radio buttons or checkboxes in the editor in IE will no longer cause lockups
in IE.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/805">#805</a>] The FCKConfig.Keystrokes
commands where executed even if the command itself was disabled.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/982">#982</a>] The button
to empty the box in the "Paste from Word" has been removed as it leads to confusion
for some users.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1682">#1682</a>] Editing
control elements in Firefox, Opera and Safari now works properly.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1613">#1613</a>] The editor
was surrounded by a &lt;div&gt; element that wasn't really needed.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/676">#676</a>] If a form
control was moved in IE after creating it, then it did lose its name.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/738">#738</a>] It wasn't
possible to change the type of an existing button.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1854">#1854</a>] Indentation
now works inside table cells.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1717">#1717</a>] The editor
was entering on looping on some specific cases when dealing with invalid source
markup.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1530">#1530</a>] Pasting
text into the "Find what" fields in the Find and Replace dialog would now activate
the find and replace buttons.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1828">#1828</a>] The Find/Replace
dialog will no longer display wrong starting positions for the match when there
are multiple and identical characters preceding the character at the real starting
point of the match.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1878">#1878</a>] Fixed
a JavaScript error which occurs in the Find/Replace dialog when the user presses
"Find" or "Replace" after the "No match found" message has appeared.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1355">#1355</a>] Line
breaks and spaces are now conserved when converting to and from the "Formatted"
format.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1670">#1670</a>] Improved
the background color behind smiley icons and special characters in their corresponding
dialogs.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1693">#1693</a>] Custom
error messages are now properly displayed in the file browser.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/970">#970</a>] The text
and value fields in the selection box dialog will no longer extend beyond the dialog
limits when the user inputs a very long text or value for one of the selection options.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/479">#479</a>] Fixed the
issue where pressing Enter in an &lt;o:p&gt; tag in IE does not generate line breaks.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/481">#481</a>] Fixed the
issue where the image preview in image dialog sometimes doesn't display after selecting
the image from server browser.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1488">#1488</a>] PHP integration:
the FCKeditor class is now more PHP5/6 friendly ("public" keyword is used instead
of depreciated "var").</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1815">#1815</a>] PHP integration:
removed closing tag: "?&gt;", so no additional whitespace added when files are included.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1906">#1906</a>] PHP file
browser: fixed problems with DetectHtml() function when open_basedir was set.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1871">#1871</a>] PHP file
browser: permissions applied with the chmod command are now configurable.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1872">#1872</a>] Perl
file browser: permissions applied with the chmod command are now configurable.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1873">#1873</a>] Python
file browser: permissions applied with the chmod command are now configurable.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1572">#1572</a>] ColdFusion
integration: fixed issues with setting the editor height.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1692">#1692</a>] ColdFusion
file browser: it is possible now to define TempDirectory to avoid issues with GetTempdirectory()
returning an empty string.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1379">#1379</a>] ColdFusion
file browser: resolved issues with OnRequestEnd.cfm breaking the file browser.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1509">#1509</a>] InsertHtml()
in IE will no longer turn the preceding normal whitespace into &amp;nbsp;.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/958">#958</a>] The AddItem
method now has an additional fifth parameter "customData" that will be sent to the
Execute method of the command for that menu item, allowing a single command to be
used for different menu items..</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1502">#1502</a>] The RemoveFormat
command now also removes the attributes from the cleaned text. The list of attributes
is configurable with FCKConfig.RemoveAttributes.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1596">#1596</a>] On Safari,
dialogs have now right-to-left layout when it runs a RTL language, like Arabic.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1344">#1344</a>] Added
warning message on Copy and Cut operation failure on IE due to paste permission
settings.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1868">#1868</a>] Links
to file browser has been changed to avoid requests containing double dots.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1229">#1229</a>] Converting
multiple contiguous paragraphs to Formatted will now be merged into a single &lt;PRE&gt;
block.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1627">#1627</a>] Samples
failed to load from local filesystem in IE7.</li>
</ul>
<p> <p>
<a href="_whatsnew_history.html">See previous versions history</a> <a href="_whatsnew_history.html">See previous versions history</a>
</p> </p>

View File

@@ -1,7 +1,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- <!--
* FCKeditor - The text editor for Internet - http://www.fckeditor.net * FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben * Copyright (C) 2003-2008 Frederico Caldeira Knabben
* *
* == BEGIN LICENSE == * == BEGIN LICENSE ==
* *
@@ -21,14 +21,583 @@
--> -->
<html xmlns="http://www.w3.org/1999/xhtml"> <html xmlns="http://www.w3.org/1999/xhtml">
<head> <head>
<title>FCKeditor - What's New?</title> <title>FCKeditor ChangeLog - What's New?</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css"> <style type="text/css">
body { font-family: arial, verdana, sans-serif } body { font-family: arial, verdana, sans-serif }
p { margin-left: 20px } p { margin-left: 20px }
h1 { border-bottom: solid 1px gray; padding-bottom: 20px }
</style> </style>
</head> </head>
<body> <body>
<h1>
FCKeditor ChangeLog - What's New?</h1>
<h3>
Version 2.5.1</h3>
<p>
New Features and Improvements:</p>
<ul>
<li><strong>FCKeditor.Net 2.5</strong> compatibility.</li>
<li>JavaScript integration file:
<ul>
<li>The new "<strong>FCKeditor.ReplaceAllTextareas</strong>" function is being introduced,
making it possible to replace many (or unknown) &lt;textarea&gt; elements in a single
call. The replacement can be also filtered by CSS class name, or by a custom function
evaluator. </li>
<li>It is now possible to set the default BasePath for all editor instances by setting
<strong>FCKeditor.BasePath</strong>. This is extremely useful when working with
the ReplaceAllTextareas function. </li>
</ul>
</li>
</ul>
<p>
Fixed Bugs:</p>
<ul>
<li>[<a href="http://dev.fckeditor.net/ticket/339" target="_blank">#339</a>] [<a
href="http://dev.fckeditor.net/ticket/681" target="_blank">#681</a>] The SpellerPages
spell checker will now completely ignore the presence of HTML tags in the text.
</li>
<li>[<a href="http://dev.fckeditor.net/ticket/1643" target="_blank">#1643</a>] Resolved
several "strict warning" messages in Firefox when running FCKeditor. </li>
<li>[<a href="http://dev.fckeditor.net/ticket/1603" target="_blank">#1603</a>] Certain
specific markup was making FCKeditor entering in a loop, blocking its execution.
</li>
<li>[<a href="http://dev.fckeditor.net/ticket/1664" target="_blank">#1664</a>] The ENTER
key will not any more swap the order of the tags when hit at the end of paragraphs.
</li>
</ul>
<h3>
Version 2.5</h3>
<p>
New Features and Improvements:</p>
<ul>
<li>The heading options have been moved to the top, in the default settings for the
Format combo.</li>
</ul>
<p>
Fixed Bugs:</p>
<ul>
<li>The focus is now correctly set when working on Safari.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1436">#1436</a>] Nested
context menu panels are now correctly closed on Safari.</li>
<li>Empty anchors are now properly created on Safari.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1359">#1359</a>] FCKeditor
will no longer produce the strange visual effect of creating a selected space and
then deleting it in Internet Explorer.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1399">#1399</a>] Removed
the empty entry in the language selection box of sample03.html.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1400">#1400</a>] Fixed
the issue where the style selection box in sample14.html is not context sensitive.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1401">#1401</a>] Completed
Hebrew translation of the user interface.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1409">#1409</a>] Completed
Finnish translation of the user interface.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1414">#1414</a>] Fixed
the issue where entity code words written inside a &lt;pre&gt; block in Source mode
are not converted to the corresponding characters after switching back to editor
mode.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1418">#1418</a>] Fixed
the issue where a detached toolbar would flicker when FCKeditor is being loaded.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1419">#1419</a>] Fixed
the issue where pressing Delete in the middle of two lists would incorrectly move
contents after the lists to the character position.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1420">#1420</a>] Fixed
the issue where empty list items can become collapsed and uneditable when it has
one of more indented list items directly under it. </li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1431">#1431</a>] Fixed
the issue where pressing Enter in a &lt;pre&gt; block in Internet Explorer would
move the caret one space forward instead of sending it to the next line.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1472">#1472</a>] Completed
Arabic translation of the user interface.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1474">#1474</a>] Fixed
the issue where reloading a page containing FCKeditor may provoke JavaScript errors
in Internet Explorer.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1478">#1478</a>] Fixed
the issue where parsing fckstyles.xml fails if the file contains no &lt;style&gt;
nodes.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1491">#1491</a>] Fixed
the issue where FCKeditor causes the selection to include an "end of line" character
in list items even though the list item is empty.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1496">#1496</a>] Fixed
the issue where attributes under &lt;area&gt; and &lt;map&gt; nodes are destroyed
or left unprotected when switching to and from Source mode.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1500">#1500</a>] Fixed
the issue where the function _FCK_PaddingNodeListener() is called excessively which
negatively affects performance.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1514">#1514</a>] Fixed
the issue where floating menus are incorrectly positioned when the toolbar or the
editor frame are not static positioned.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1518">#1518</a>] Fixed
the issue where excessive &lt;BR&gt; nodes are not removed after a paragraph is
split when creating lists.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1521">#1521</a>] Fixed
JavaScript error and erratic behavior of the Replace dialog.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1524">#1524</a>] Fixed
the issue where the caret jumps to the beginning or end of a list block and when
user is trying to select the end of a list item.</li>
<li>Completed Simplified Chinese translation of the user interface.</li>
<li>Completed Estonian translation of the user interface.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1406">#1406</a>] Editor
was always "dirty" if flash is available in the contents.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1561">#1561</a>] Non standard
elements are now properly applied if defined in the styles XML file.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1412">#1412</a>] The _QuickUploadLanguage
value is now work properly for Perl.</li>
<li>Several compatibility fixes for Firefox 3 (Beta 1):
<ul>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1558">#1558</a>] Nested
context menu close properly when one of their options is selected.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1556">#1556</a>] Dialogs
contents are now showing completely, without scrollbar.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1559">#1559</a>] It is
not possible to have more than one panel opened at the same time.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1554">#1554</a>] Links
now get underlined.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1557">#1557</a>] The "Automatic"
and "More colors..." buttons were improperly styled in the color selector panels
(Opera too).</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1462">#1462</a>] The enter
key will not any more scroll the main window.</li>
</ul>
</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1562">#1562</a>] Fixed
the issue where empty paragraphs are added around page breaks each time the user
switches to Source mode.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1578">#1578</a>] The editor
will now scroll correctly when hitting enter in front of a paragraph.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1579">#1579</a>] Fixed
the issue where the create table and table properties dialogs are too narrow for
certain translations.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1580">#1580</a>] Completed
Polish translation of the user interface.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1591">#1591</a>] Fixed
JavaScript error when using the blockquote command in an empty document in IE.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1592">#1592</a>] Fixed
the issue where attempting to remove a blockquote with an empty paragraph would
leave behind an empty blockquote IE.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1594">#1594</a>] Undo/Redo
will now work properly for the color selectors.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1597">#1597</a>] The color
boxes are now properly rendered in the color selector panels on sample14.html.</li>
</ul>
<h3>
Version 2.5 Beta</h3>
<p>
New Features and Improvements:</p>
<ul>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/624">#624</a>] [<a
target="_blank" href="http://dev.fckeditor.net/ticket/634">#634</a>] [<a target="_blank"
href="http://dev.fckeditor.net/ticket/1300">#1300</a>] [<a target="_blank" href="http://dev.fckeditor.net/ticket/1301">#1301</a>]
Official compatibility support with <strong>Opera 9.50</strong> and <strong>Safari 3</strong>
(WebKit based browsers actually). These browsers are still in Beta, but we are confident
that we'll have amazing results as soon as they get stable. We are continuously
collaborating with Opera Software and Apple to bring a wonderful FCKeditor experience
over their browser platforms.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/494">#494</a>] Introduced
the <strong>new Style System</strong>. We are not anymore relaying on browser features
to apply and remove styles, which guarantees that the editor will <strong>behave in
the same way in all browsers</strong>. It is an incredibly flexible system,
which aims to fit all developer's needs, from Flash content or HTML4 to XHTML 1.0
Strict or XHTML 1.1:
<ul>
<li>All basic formatting features, like Bold and Italic, can be precisely controlled
by using the configuration file (<b>CoreStyles</b> setting). It means that now,
the Bold button, for example, can produce &lt;b&gt;, &lt;strong&gt;, &lt;span class...&gt;,
&lt;span style...&gt; or anything the developer prefers.</li>
<li>Again with the <b>CoreStyles</b> setting, each block format, font, size, and even
the color pickers can precisely reflect end developer's needs.</li>
<li>Because of the above changes, font sizes are much more flexible. <b>Any kind of
font unit</b> can be used, including a mix of units.</li>
<li>All styles, including toolbar bottom styles, are precisely controlled when being
applied to the document. FCKeditor uses an element table derived from the <b>W3C XHTML
DTDs</b> to precisely create the elements, guarantee standards compliant code.</li>
<li><b>No more &lt;font&gt; tags</b>... well... actually, the system is so flexible
that it is up to you to use them or not.</li>
<li>It is possible to configure FCKeditor to produce a truly <b>semantic aware </b>and<b>
XHTML 1.1 compliant </b>code. Check out sample14.html.</li>
<li>It's also possible to precisely control which inline elements must be removed with
the &quot;Remove All&quot; button, by using the &quot;<b>RemoveFormatTags</b>&quot;
setting.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1231">#1231</a>] [<a
target="_blank" href="http://dev.fckeditor.net/ticket/160">#160</a>] Paragraph <b>indentation</b>
and <b>justification</b> now uses style attributes and don't create unnecessary
elements, and &lt;blockquote&gt; is not anymore used for it. Now, even CSS classes
can be used to indent or align text.</li>
<li>All paragraph formatting features work well when EnterMode=br.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/172">#172</a>] All paragraph
formatting features work well when list items too.</li>
</ul>
</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1197">#1197</a>] [<a
target="_blank" href="http://dev.fckeditor.net/ticket/132">#132</a>] The toolbar
now presents a <strong>new button for Blockquote</strong>. The indentation button
will not anymore be used for that.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/125">#125</a>] Table's
<strong>columns size can now be changed by dragging on cell borders</strong>, with
the "dragresizetable" plugin. </li>
<li>The EditorAreaCSS config option can now also be set to a string of paths separated
by commas.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/212">#212</a>] New "<strong>Show
Blocks</strong>" command button in toolbar to show block details in the editing
area. </li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/915">#915</a>] The <strong>
undo/redo system has been revamped</strong> to work the same across Internet Explorer
and Gecko-based browsers (e.g. Firefox). A number of critical bugs in the undo/redo
system are also fixed. </li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/194">#194</a>] The editor
now uses the <strong>Data Processor</strong> technology, which makes it possible
to handle different input formats. A sample of it may be found at "editor/plugins/bbcode/_sample",
that shows some simple BBCode support. </li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/145">#145</a>] The "htaccess.txt"
file has been renamed to ".htaccess" as it doesn't bring security concerns, being
active out of the box.</li>
<li>File Browser and Quick Upload changes:
<ul>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/163">#163</a>] <span
style="color: #ff0000"><strong>Attention:</strong></span> The default connector
in fckconfig.js has been changed from ASP to PHP. If you are using ASP remember
to change the _FileBrowserLanguage and _QuickUploadLanguage settings in your fckconfig.js.
[<a target="_blank" href="http://dev.fckeditor.net/ticket/454">#454</a>] The file
browser and upload connectors have been unified so they can reuse the same configuration
settings.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/865">#865</a>] The ASP
and PHP connectors have been improved so it's easy to select the location of the
destination folder for each file type, and it's no longer necessary to use the "file",
"image", "flash" subfolders<br />
<span style="color: #ff0000"><strong>Attention:</strong></span> The location of
all the connectors have been changed in the fckconfig.js file. Please check your
settings to match the current ones. Also review carefully the config file for your
server language. </li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/688">#688</a>] Now the
Perl quick upload is available. </li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/575">#575</a>] The Python
connector has been rewritten as a WSGI app to be fully compatible with the latest
python frameworks and servers. The QuickUpload feature has been added as well as
all the features available in the PHP connector. Thanks to Mariano Reingart.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/561">#561</a>] The ASP
connector provides an AbsolutePath setting so it's possible to set the url to a
full domain or a relative path and specify that way the physical folder where the
files are stored..</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/333">#333</a>] The Quick
Upload now can use the same ServerPath parameter as the full connector.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/199">#199</a>] The AllowedCommands
configuration setting is available in the asp and php connectors so it's possible
to disallow the upload of files (although the "select file" button will still be
available in the file browser).</li>
</ul>
</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/100">#100</a>] A new configuration
directive "FCKConfig.EditorAreaStyles" has been implemented to allow setting editing
area styles from JavaScript. </li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/102">#102</a>] HTML code
generated by the "Paste As Plain Text" feature now obeys the EnterMode setting.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1266">#1266</a>] Introducing
the HtmlEncodeOutput setting to instruct the editor to HTML-encode some characters
(&amp;, &lt; and &gt;) in the posted data.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/357">#357</a>] Added a
"Remove Anchor" option in the context menu for anchors. </li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1060">#1060</a>] Compatibility
checks with Firefox 3.0 Alpha. </li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/817">#817</a>] [<a
target="_blank" href="http://dev.fckeditor.net/ticket/1077">#1077</a>] New "Merge
Down/Right" commands for merging tables cells in non-Gecko browsers.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1288">#1288</a>] The "More
Colors..." button in color selector popup has been made optional and configurable
by the <strong>EnableMoreFontColors</strong> option. </li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/356">#356</a>] The <strong>
Find and Replace</strong> dialogs are now unified into a single dialog with tabs.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/549">#549</a>] Added a
'None' option to the FCKConfig.ToolbarLocation option to allow for hidden toolbars.
</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1313">#1313</a>] An XHTML
1.1 target editor sample has been created as sample14.html. </li>
<li>The ASP, ColdFusion and PHP integration have been aligned to our standards.</li>
</ul>
<p>
Fixed Bugs:</p>
<ul>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/71">#71</a>] [<a target="_blank"
href="http://dev.fckeditor.net/ticket/243">#243</a>] [<a target="_blank" href="http://dev.fckeditor.net/ticket/267">#267</a>]
The editor now takes care to not create invalid nested block elements, like creating
&lt;form&gt; or &lt;hr&gt; inside &lt;p&gt;. &nbsp;</li>
<li>[<a target="_blank" href="https://sourceforge.net/tracker/?func=detail&aid=1511298&group_id=75348&atid=543655">SF
Patch 1511298</a>] The CF Component failed on CFMX 6.0</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/639">#639</a>] If the
FCKConfig.DefaultLinkTarget setting was missing in fckconfig.js the links has target="undefined".</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/497">#497</a>] Fixed EMBED
attributes handling in IE.</li>
<li>[<a target="_blank" href="https://sourceforge.net/tracker/?func=detail&aid=1315722&group_id=75348&atid=543655">SF
Patch 1315722</a>] Avoid getting a cached version of the folder contents after uploading
a file</li>
<li>[<a target="_blank" href="https://sourceforge.net/tracker/?func=detail&aid=1386086&group_id=75348&atid=543655">SF
Patch 1386086</a>] The php connector has been protected so mkdir doesn't fail if
there are double slashes.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/943">#943</a>] The PHP
connector now specifies that the included files are relative to the current path.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/560">#560</a>] The PHP
connector will work better if the connector or the userfiles folder is a symlink.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/784">#784</a>] Fixed a
non initialized $php_errormsg in the PHP connector.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/802">#802</a>] The replace
dialog will now advance its searching position correctly and is able to search for
strings spanning across multiple inline tags.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/944">#944</a>] The _samples
didn't work directly from the Mac filesystem.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/946">#946</a>] Toolbar
images didn't show in non-IE browsers if the path contained a space.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/291">#291</a>] [<a
target="_blank" href="http://dev.fckeditor.net/ticket/395">#395</a>] [<a target="_blank"
href="http://dev.fckeditor.net/ticket/932">#932</a>] Clicking outside the editor
it was possible to paste or apply formatting to the rest of the page in IE.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/137">#137</a>] Fixed FCKConfig.TabSpaces
being ignored, and weird behaviors when pressing tab in edit source mode.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/268">#268</a>] Fixed special
XHTML characters present in event attribute values being converted inappropriately
when switching to source view.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/272">#272</a>] The toolbar
was cut sometimes in IE to just one row if there are multiple instances of the editor.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/515">#515</a>] Tables
in Firefox didn't inherit font styles properly in Standards mode.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/321">#321</a>] If FCKeditor
is initially hidden in Firefox it will no longer be necessary to call the oEditor.MakeEditable()
function.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/299">#299</a>] The 'Browse
Server' button in the Image and Flash dialogs was a little too high.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/931">#931</a>] The BodyId
and BodyClass configuration settings weren't applied in the preview window.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/583">#583</a>] The "noWrap"
attribute for table cells was getting an empty value in Firefox. Thanks to geirhelge.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/141">#141</a>] Fixed incorrect
startup focus in Internet Explorer after page reloads. </li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/143">#143</a>] Fixed browser
lockup when the user writes &lt;!--{PS..x}&gt; into the editor in source mode. </li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/174">#174</a>] Fixed incorrect
positioning of FCKeditor in full screen mode. </li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/978">#978</a>] Fixed a
SpellerPages error with ColdFusion when no suggestions where available for a word.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/977">#977</a>] The "shape"
attribute of &lt;area&gt; had its value changed to uppercase in IE.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/996">#996</a>] "OnPaste"
event listeners will now get executed only once.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/289">#289</a>] Removed
debugging popups from page load regarding JavaScript and CSS loading errors.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/328">#328</a>] [<a
target="_blank" href="http://dev.fckeditor.net/ticket/346">#346</a>] [<a target="_blank"
href="http://dev.fckeditor.net/ticket/404">#404</a>] Fixed a number of problems
regarding &lt;pre&gt; blocks:
<ol>
<li>Leading whitespaces and line breaks in &lt;pre&gt; blocks are trimmed when the user
switches between editor mode and source mode;</li>
<li>Pressing Enter inside a &lt;pre&gt; block would split the block into two, but the
expected behavior is simply inserting a line break;</li>
<li>Simple line breaks inside &lt;pre&gt; blocks entered in source mode are being turned
into &lt;br&gt; tags when the user switches to editor mode and back.</li>
</ol>
</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/581">#581</a>] Fixed the
issue where the "Maximize the editor size" toolbar button stops working if any of
the following occurs:
<ol>
<li>There exists a form input whose name or id is "style" in FCKeditor's host form;</li>
<li>There exists a form input whose name or id is "className" in FCKeditor's host form;</li>
<li>There exists a form and a form input whose name of id is "style" in the editing
frame.</li>
</ol>
</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/183">#183</a>] Fixed the
issue when FCKeditor is being executed in a custom application with the WebBrowser
ActiveX control, hiding the WebBrowser control would incorrectly invoke FCKeditor's
cleanup routines, causing FCKeditor to stop working.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/539">#539</a>] Fixed the
issue where right clicking on a table inside the editing frame in Firefox would
cause the editor the scroll to the top of the document.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/523">#523</a>] Fixed the
issue where, under certain circumstances, FCKeditor would obtain focus at startup
even though FCKConfig.StartupFocus is set to false. </li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/393">#393</a>] Fixed the
issue where if an inline tag is at the end of the document, the user would have
no way of escaping from the inline tag if he continues typing at the end of the
document. FCKeditor's behaviors regarding inline tags has been made to be more like
MS Word's:
<ol>
<li>If the caret is moved to the end of a hyperlink by the keyboard, then hyperlink
mode is disabled. </li>
<li>If the caret is moved to the end of other styled inline tags by any key other than
the End key (like bold text or italic text), the original bold/italic/... modes
would continue to be effective. </li>
<li>If the caret is moved to the end of other styled inline tags by the End key, all
style tag modes (e.g. bold, italic, underline, etc.) would be canceled. This is
not consistent with MS Word, but provides a convenient way for the user to escape
the inline tag at the end of a line.</li>
</ol>
</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/338">#338</a>] Fixed the
issue where the configuration directive FCKConfig.ForcePasteAsPlainText is ignored
when new contents are pasted into the editor via drag-and drop from outside of the
editor. </li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1026">#1026</a>] Fixed
the issue where the cursor or selection positions are not restored with undo/redo
commands correctly in IE, under some circumstances. </li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1160">#1160</a>] [<a
target="_blank" href="http://dev.fckeditor.net/ticket/1184">#1184</a>] Home, End
and Tab keys are working properly for numeric fields in dialogs. </li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/68">#68</a>] The style
system now properly handles Format styles when EnterMode=br.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/525">#525</a>] The union
of successive DIVs will work properly now if EnterMode!=div.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1227">#1227</a>] The color
commands used an unnecessary temporary variable. Thanks to Matthias Miller</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/67">#67</a>] [<a target="_blank"
href="http://dev.fckeditor.net/ticket/277">#277</a>] [<a target="_blank" href="http://dev.fckeditor.net/ticket/427">#427</a>]
[<a target="_blank" href="http://dev.fckeditor.net/ticket/428">#428</a>] [<a target="_blank"
href="http://dev.fckeditor.net/ticket/965">#965</a>] [<a target="_blank" href="http://dev.fckeditor.net/ticket/1178">#1178</a>]
[<a target="_blank" href="http://dev.fckeditor.net/ticket/1267">#1267</a>] The list
insertion/removal/indent/outdent logic in FCKeditor has been rewritten, such that:
<ol>
<li>Text separated by &lt;br&gt; will always be treated as separate items during list
insertion regardless of browser;</li>
<li>List removal will now always obey the FCKConfig.EnterMode setting;</li>
<li>List indentation will be XHTML 1.1 compliant - all child elements under an &lt;ol&gt;
or &lt;ul&gt; must be &lt;li&gt; nodes;</li>
<li>IE editor hacks like &lt;ul type=&quot;1&quot;&gt; will no longer appear;</li>
<li>Excessive &lt;div&gt; nodes are no longer inserted into list items due to alignment
changes.</li>
</ol>
</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/205">#205</a>] Fixed the
issue where visible &lt;br&gt; tags at the end of paragraphs are incorrectly removed
after switching to and from source mode.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1050">#1050</a>] Fixed
a minor PHP/XML incompatibility bug in editor/dialog/fck_docprops.html.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/462">#462</a>] Fixed an
algorithm bug in switching from source mode to WYSIWYG mode which causes the browser
to spin up and freeze for broken HTML code inputs.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1019">#1019</a>] Table
command buttons are now disabled when the current selection is not inside a table.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/135">#135</a>] Fixed the
issue where context menus are misplaced in FCKeditor when FCKeditor is created inside
a &lt;div&gt; node with scrolling. </li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1067">#1067</a>] Fixed
the issue where context menus are misplaced in Safari when FCKeditor is scrolled
down.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1081">#1081</a>] Fixed
the issue where undoing table deletion in IE7 would cause JavaScript errors.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1061">#1061</a>] Fixed
the issue where backspace and delete cannot delete special characters in Firefox
under some circumstances.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/403">#403</a>] Fixed the
issue where switching to and from source mode in full page mode under IE would add
excessive line breaks to &lt;style&gt; blocks.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/121">#121</a>] Fixed the
issue where maximizing FCKeditor inside a frameset would resize FCKeditor to the
whole window's size instead of just the container frame's size.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1093">#1093</a>] Fixed
the issue where pressing Enter inside an inline tag would not create a new paragraph
correctly.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1089">#1089</a>] Fixed
the issue where pressing Enter inside a &lt;pre&gt; block do not generate visible
line breaks in IE.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/332">#332</a>] Hitting
Enter when the caret is at the end of a hyperlink will no longer continue the link
at the new paragraph.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1121">#1121</a>] Hitting
Enter with FCKConfig.EnterMode=br will now scroll the document correctly when the
new lines have exceeded the lower boundary of the editor frame.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1063">#1063</a>] [<a
target="_blank" href="http://dev.fckeditor.net/ticket/1084">#1084</a>] [<a target="_blank"
href="http://dev.fckeditor.net/ticket/1092">#1092</a>] Fixed a few Norwegian
language translation errors.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1148">#1148</a>] Fixed
the issue where the &quot;Automatic&quot; and &quot;More Colors...&quot; buttons
in the color selection panel are not centered in Safari.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1187">#1187</a>] Fixed
the issue where the &quot;Paste as plain text&quot; command cannot be undone in
non-IE browsers.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1222">#1222</a>] Ctrl-Backspace
operations will now save undo snapshots in all browsers.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1223">#1223</a>] Fixed
the issue where the insert link dialog would save multiple undo snapshots for a
single operation.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/247">#247</a>] Fixed the
issue where deleting everything in the document in IE would create an empty &lt;p&gt;
block in the document regardless of EnterMode setting. </li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1280">#1280</a>] Fixed
the issue where opening a combo box will cause the editor frames to lose focus when
there are multiple editors in the same document.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/363">#363</a>] Fixed the
issue where the Find dialog does not work under Opera.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/50">#50</a>] Fixed the
issue where the Paste button is always disabled in Safari.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/389">#389</a>] Pasting
text with comments from Word won't generate errors in IE, thanks to the idea from
Swift.</li>
<li>The pasting area in the Paste from Word dialog is focused on initial load</li>
<li>Some fixes related to html comment handling in the Word clean up routine</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1303">#1303</a>] &lt;col&gt;
is correctly treated as an empty element.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/969">#969</a>] Removed
unused files (fcknumericfield.htc and moz-bindings.xml).</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1166">#1166</a>] Fixed
the issue where &lt;meta&gt; tags are incorrectly outputted with closing tags in
full page mode.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1200">#1200</a>] Fixed
the issue where context menus sometimes disappear prematurely before the user can
click on any items in Opera.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1315">#1315</a>] Fixed
the issue where the source view text area in Safari is displayed with an excessive
blue border.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1201">#1201</a>] Fixed
the issue where hitting Backspace or Delete inside a table cell deletes the table
cell instead of its contents in Opera.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1311">#1311</a>] Fixed
the issue where undoing and redoing a special character insertion would send the
caret to incorrect positions. (e.g. the beginning of document)</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/923">#923</a>] Font colors
are now properly applied on links.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1316">#1316</a>] Fixed
the issue where the image dialog expands to a size too big in Safari.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1306">#1306</a>] [<a
target="_blank" href="http://dev.fckeditor.net/ticket/894">#894</a>] The undo system
can now undo text formatting steps like setting fonts to bold and italic.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/95">#95</a>] Fixed the
issue where FCKeditor breaks &lt;meta&gt; tags in full page mode in some circumstances.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/175">#175</a>] Fixed the
issue where entering an email address with a '%' sign in the insert link dialog
would cause JavaScript error.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/180">#180</a>] Improved
backward compatibility with older PHP versions. FCKeditor can now work with PHP
versions down to 4.0.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/192">#192</a>] Document
modifying actions from the FCKeditor JavaScript API will now save undo steps.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/246">#246</a>] Using text
formatting commands in EnterMode=div will no longer cause tags to randomly disappear.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/327">#327</a>] It is no
longer possible for the browser's back action to misfire when a user presses backspace
while an image is being selected in FCKeditor.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/362">#362</a>] Ctrl-Backspace
now works in FCKeditor.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/390">#390</a>] Text alignment
and justification commands now respects EnterMode=br paragraph rules.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/534">#534</a>] Pressing
Ctrl-End while the document contains a list towards the end will no longer make
the cursor disappear.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/906">#906</a>] It is now
possible to have XHTML 1.0 Strict compliant output from a document pasted from Word.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/929">#929</a>] Pressing
the Enter key will now produce an undo step.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/934">#934</a>] Fixed the
"Cannot execute code from a freed script" error in IE from editor dialogs.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/942">#942</a>] Server
based spell checking with ColdFusion integration no longer breaks fir non en_US
languages.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/942">#1056</a>] Deleting
everything in the editor document and moving the cursor around will no longer leave
the cursor hanging beyond the top of the editor document.</li>
</ul>
<p>
# This version has been <a href="http://dev.fckeditor.net/wiki/SD/COE">partially sponsored</a>
by the <a href="http://www.coe.int/">Council of Europe</a>.
</p>
<h3> <h3>
Version 2.4.3</h3> Version 2.4.3</h3>
<p> <p>

View File

@@ -1,6 +1,6 @@
/* /*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net * FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben * Copyright (C) 2003-2008 Frederico Caldeira Knabben
* *
* == BEGIN LICENSE == * == BEGIN LICENSE ==
* *
@@ -46,7 +46,8 @@ body, td
a[href] a[href]
{ {
color: -moz-hyperlinktext !important; /* For Firefox... mark as important, otherwise it becomes black */ color: -moz-hyperlinktext !important; /* For Firefox... mark as important, otherwise it becomes black */
text-decoration: -moz-anchor-decoration; /* For Firefox 3, otherwise no underline will be used */
} }
/* /*

View File

@@ -1,6 +1,6 @@
/* /*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net * FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben * Copyright (C) 2003-2008 Frederico Caldeira Knabben
* *
* == BEGIN LICENSE == * == BEGIN LICENSE ==
* *
@@ -21,6 +21,13 @@
* This CSS Style Sheet defines rules used by the editor for its internal use. * This CSS Style Sheet defines rules used by the editor for its internal use.
*/ */
/* #########
* WARNING
* #########
* When changing this file, the minified version of it must be updated in the
* fckeditor.html file (see FCK_InternalCSS).
*/
/* Fix to allow putting the caret at the end of the content in Firefox if /* Fix to allow putting the caret at the end of the content in Firefox if
clicking below the content. */ clicking below the content. */
html html
@@ -49,6 +56,16 @@ form
height: 80px; height: 80px;
} }
.FCK__UnknownObject
{
border: #a9a9a9 1px solid;
background-position: center center;
background-image: url(images/fck_plugin.gif);
background-repeat: no-repeat;
width: 80px;
height: 80px;
}
/* Empty anchors images */ /* Empty anchors images */
.FCK__Anchor .FCK__Anchor
{ {
@@ -146,7 +163,7 @@ a[name]
background-image: url(images/block_address.png); background-image: url(images/block_address.png);
} }
.FCK__ShowBlocks blockquote .FCK__ShowBlocks blockquote
{ {
background-image: url(images/block_blockquote.png); background-image: url(images/block_blockquote.png);
} }

View File

@@ -1,6 +1,6 @@
/* /*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net * FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben * Copyright (C) 2003-2008 Frederico Caldeira Knabben
* *
* == BEGIN LICENSE == * == BEGIN LICENSE ==
* *
@@ -21,6 +21,13 @@
* This CSS Style Sheet defines the rules to show table borders on Gecko. * This CSS Style Sheet defines the rules to show table borders on Gecko.
*/ */
/* #########
* WARNING
* #########
* When changing this file, the minified version of it must be updated in the
* fckeditor.html file (see FCK_ShowTableBordersCSS).
*/
/* For tables with the "border" attribute set to "0" */ /* For tables with the "border" attribute set to "0" */
table[border="0"], table[border="0"],
table[border="0"] > tr > td, table[border="0"] > tr > th, table[border="0"] > tr > td, table[border="0"] > tr > th,

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

@@ -1,6 +1,6 @@
/* /*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net * FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben * Copyright (C) 2003-2008 Frederico Caldeira Knabben
* *
* == BEGIN LICENSE == * == BEGIN LICENSE ==
* *
@@ -22,6 +22,13 @@
* windows. * windows.
*/ */
/* #########
* WARNING
* #########
* When changing this file, the minified version of it must be updated in the
* fck_dialog_common.js file (see GetCommonDialogCss).
*/
.ImagePreviewArea .ImagePreviewArea
{ {
border: #000000 1px solid; border: #000000 1px solid;

View File

@@ -1,6 +1,6 @@
/* /*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net * FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben * Copyright (C) 2003-2008 Frederico Caldeira Knabben
* *
* == BEGIN LICENSE == * == BEGIN LICENSE ==
* *
@@ -19,8 +19,48 @@
* == END LICENSE == * == END LICENSE ==
* *
* Useful functions used by almost all dialog window pages. * Useful functions used by almost all dialog window pages.
* Dialogs should link to this file as the very first script on the page.
*/ */
// Automatically detect the correct document.domain (#123).
(function()
{
var d = document.domain ;
while ( true )
{
// Test if we can access a parent property.
try
{
var test = window.parent.document.domain ;
break ;
}
catch( e ) {}
// Remove a domain part: www.mytest.example.com => mytest.example.com => example.com ...
d = d.replace( /.*?(?:\.|$)/, '' ) ;
if ( d.length == 0 )
break ; // It was not able to detect the domain.
try
{
document.domain = d ;
}
catch (e)
{
break ;
}
}
})() ;
// Attention: FCKConfig must be available in the page.
function GetCommonDialogCss( prefix )
{
// CSS minified by http://iceyboard.no-ip.org/projects/css_compressor
return FCKConfig.BasePath + 'dialog/common/' + '|.ImagePreviewArea{border:#000 1px solid;overflow:auto;width:100%;height:170px;background-color:#fff}.FlashPreviewArea{border:#000 1px solid;padding:5px;overflow:auto;width:100%;height:170px;background-color:#fff}.BtnReset{float:left;background-position:center center;background-image:url(images/reset.gif);width:16px;height:16px;background-repeat:no-repeat;border:1px none;font-size:1px}.BtnLocked,.BtnUnlocked{float:left;background-position:center center;background-image:url(images/locked.gif);width:16px;height:16px;background-repeat:no-repeat;border:none 1px;font-size:1px}.BtnUnlocked{background-image:url(images/unlocked.gif)}.BtnOver{border:outset 1px;cursor:pointer;cursor:hand}' ;
}
// Gets a element by its Id. Used for shorter coding. // Gets a element by its Id. Used for shorter coding.
function GetE( elementId ) function GetE( elementId )
{ {
@@ -57,34 +97,47 @@ function GetAttribute( element, attName, valueIfNull )
return ( oValue == null ? valueIfNull : oValue ) ; return ( oValue == null ? valueIfNull : oValue ) ;
} }
var KeyIdentifierMap = function SelectField( elementId )
{ {
End : 35, var element = GetE( elementId ) ;
Home : 36, element.focus() ;
Left : 37,
Right : 39, // element.select may not be available for some fields (like <select>).
'U+00007F' : 46 // Delete if ( element.select )
} element.select() ;
}
// Functions used by text fields to accept numbers only. // Functions used by text fields to accept numbers only.
function IsDigit( e ) var IsDigit = ( function()
{ {
if ( !e ) var KeyIdentifierMap =
e = event ; {
End : 35,
Home : 36,
Left : 37,
Right : 39,
'U+00007F' : 46 // Delete
} ;
var iCode = ( e.keyCode || e.charCode ) ; return function ( e )
{
if ( !iCode && e.keyIdentifier && ( e.keyIdentifier in KeyIdentifierMap ) ) if ( !e )
iCode = KeyIdentifierMap[ e.keyIdentifier ] ; e = event ;
return ( var iCode = ( e.keyCode || e.charCode ) ;
( iCode >= 48 && iCode <= 57 ) // Numbers
|| (iCode >= 35 && iCode <= 40) // Arrows, Home, End if ( !iCode && e.keyIdentifier && ( e.keyIdentifier in KeyIdentifierMap ) )
|| iCode == 8 // Backspace iCode = KeyIdentifierMap[ e.keyIdentifier ] ;
|| iCode == 46 // Delete
|| iCode == 9 // Tab return (
) ; ( iCode >= 48 && iCode <= 57 ) // Numbers
} || (iCode >= 35 && iCode <= 40) // Arrows, Home, End
|| iCode == 8 // Backspace
|| iCode == 46 // Delete
|| iCode == 9 // Tab
) ;
}
} )() ;
String.prototype.Trim = function() String.prototype.Trim = function()
{ {
@@ -163,3 +216,123 @@ function OpenFileBrowser( url, width, height )
else else
window.open( url, 'FCKBrowseWindow', sOptions ) ; window.open( url, 'FCKBrowseWindow', sOptions ) ;
} }
/**
Utility function to create/update an element with a name attribute in IE, so it behaves properly when moved around
It also allows to change the name or other special attributes in an existing node
oEditor : instance of FCKeditor where the element will be created
oOriginal : current element being edited or null if it has to be created
nodeName : string with the name of the element to create
oAttributes : Hash object with the attributes that must be set at creation time in IE
Those attributes will be set also after the element has been
created for any other browser to avoid redudant code
*/
function CreateNamedElement( oEditor, oOriginal, nodeName, oAttributes )
{
var oNewNode ;
// IE doesn't allow easily to change properties of an existing object,
// so remove the old and force the creation of a new one.
var oldNode = null ;
if ( oOriginal && oEditor.FCKBrowserInfo.IsIE )
{
// Force the creation only if some of the special attributes have changed:
var bChanged = false;
for( var attName in oAttributes )
bChanged |= ( oOriginal.getAttribute( attName, 2) != oAttributes[attName] ) ;
if ( bChanged )
{
oldNode = oOriginal ;
oOriginal = null ;
}
}
// If the node existed (and it's not IE), then we just have to update its attributes
if ( oOriginal )
{
oNewNode = oOriginal ;
}
else
{
// #676, IE doesn't play nice with the name or type attribute
if ( oEditor.FCKBrowserInfo.IsIE )
{
var sbHTML = [] ;
sbHTML.push( '<' + nodeName ) ;
for( var prop in oAttributes )
{
sbHTML.push( ' ' + prop + '="' + oAttributes[prop] + '"' ) ;
}
sbHTML.push( '>' ) ;
if ( !oEditor.FCKListsLib.EmptyElements[nodeName.toLowerCase()] )
sbHTML.push( '</' + nodeName + '>' ) ;
oNewNode = oEditor.FCK.EditorDocument.createElement( sbHTML.join('') ) ;
// Check if we are just changing the properties of an existing node: copy its properties
if ( oldNode )
{
CopyAttributes( oldNode, oNewNode, oAttributes ) ;
oEditor.FCKDomTools.MoveChildren( oldNode, oNewNode ) ;
oldNode.parentNode.removeChild( oldNode ) ;
oldNode = null ;
if ( oEditor.FCK.Selection.SelectionData )
{
// Trick to refresh the selection object and avoid error in
// fckdialog.html Selection.EnsureSelection
var oSel = oEditor.FCK.EditorDocument.selection ;
oEditor.FCK.Selection.SelectionData = oSel.createRange() ; // Now oSel.type will be 'None' reflecting the real situation
}
}
oNewNode = oEditor.FCK.InsertElement( oNewNode ) ;
// FCK.Selection.SelectionData is broken by now since we've
// deleted the previously selected element. So we need to reassign it.
if ( oEditor.FCK.Selection.SelectionData )
{
var range = oEditor.FCK.EditorDocument.body.createControlRange() ;
range.add( oNewNode ) ;
oEditor.FCK.Selection.SelectionData = range ;
}
}
else
{
oNewNode = oEditor.FCK.InsertElement( nodeName ) ;
}
}
// Set the basic attributes
for( var attName in oAttributes )
oNewNode.setAttribute( attName, oAttributes[attName], 0 ) ; // 0 : Case Insensitive
return oNewNode ;
}
// Copy all the attributes from one node to the other, kinda like a clone
// But oSkipAttributes is an object with the attributes that must NOT be copied
function CopyAttributes( oSource, oDest, oSkipAttributes )
{
var aAttributes = oSource.attributes ;
for ( var n = 0 ; n < aAttributes.length ; n++ )
{
var oAttribute = aAttributes[n] ;
if ( oAttribute.specified )
{
var sAttName = oAttribute.nodeName ;
// We can set the type only once, so do it with the proper value, not copying it.
if ( sAttName in oSkipAttributes )
continue ;
var sAttValue = oSource.getAttribute( sAttName, 2 ) ;
if ( sAttValue == null )
sAttValue = oAttribute.nodeValue ;
oDest.setAttribute( sAttName, sAttValue, 0 ) ; // 0 : Case Insensitive
}
}
// The style:
oDest.style.cssText = oSource.style.cssText ;
}

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- <!--
* FCKeditor - The text editor for Internet - http://www.fckeditor.net * FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben * Copyright (C) 2003-2008 Frederico Caldeira Knabben
* *
* == BEGIN LICENSE == * == BEGIN LICENSE ==
* *
@@ -70,7 +70,7 @@ window.onload = function()
<div id="divAbout"> <div id="divAbout">
<table cellpadding="0" cellspacing="0" border="0" width="100%" style="height: 100%"> <table cellpadding="0" cellspacing="0" border="0" width="100%" style="height: 100%">
<tr> <tr>
<td> <td colspan="2">
<img alt="" src="fck_about/logo_fckeditor.gif" width="236" height="41" align="left" /> <img alt="" src="fck_about/logo_fckeditor.gif" width="236" height="41" align="left" />
<table width="80" border="0" cellspacing="0" cellpadding="5" bgcolor="#ffffff" align="right"> <table width="80" border="0" cellspacing="0" cellpadding="5" bgcolor="#ffffff" align="right">
<tr> <tr>
@@ -78,31 +78,37 @@ window.onload = function()
border-left: #000000 1px solid; border-bottom: #000000 1px solid"> border-left: #000000 1px solid; border-bottom: #000000 1px solid">
<span fcklang="DlgAboutVersion">version</span> <span fcklang="DlgAboutVersion">version</span>
<br /> <br />
<b>2.5 Beta</b><br /> <b>2.6</b><br />
Build 16848</td> Build 18638</td>
</tr> </tr>
</table> </table>
</td> </td>
</tr> </tr>
<tr style="height: 100%"> <tr style="height: 100%">
<td align="center"> <td align="center" valign="middle">
&nbsp;<br />
<span style="font-size: 14px" dir="ltr"> <span style="font-size: 14px" dir="ltr">
<br />
<b><a href="http://www.fckeditor.net/?about" target="_blank" title="Visit the FCKeditor web site"> <b><a href="http://www.fckeditor.net/?about" target="_blank" title="Visit the FCKeditor web site">
Support <b>Open Source</b> Software</a></b> </span> Support <b>Open Source</b> Software</a></b> </span>
<br /> <div style="padding-top:15px">
<br /> <img alt="" src="fck_about/logo_fredck.gif" width="87" height="36" />
<br /> </div>
<span fcklang="DlgAboutInfo">For further information go to</span> <a href="http://www.fckeditor.net/?About" </td>
target="_blank">http://www.fckeditor.net/</a>. <td align="center" nowrap="nowrap" valign="middle">
<br /> <div>
Copyright &copy; 2003-2007 <a href="#" onclick="SendEMail();">Frederico Caldeira Knabben</a> <div style="margin-bottom:5px" dir="ltr">Selected Sponsor</div>
<a href="http://www.spellchecker.net/fckeditor/" target="_blank"><img alt="Selected Sponsor" border="0" src="fck_about/sponsors/spellchecker_net.gif" width="75" height="75" /></a>
</div>
</td> </td>
</tr> </tr>
<tr> <tr>
<td width="100%" nowrap="nowrap">
<span fcklang="DlgAboutInfo">For further information go to</span> <a href="http://www.fckeditor.net/?About"
target="_blank">http://www.fckeditor.net/</a>.
<br />
Copyright &copy; 2003-2008 <a href="#" onclick="SendEMail();">Frederico Caldeira Knabben</a>
</td>
<td align="center"> <td align="center">
<img alt="" src="fck_about/logo_fredck.gif" width="87" height="36" /> <a href="http://www.fckeditor.net/sponsors/apply" target="_blank">Become a Sponsor</a>
</td> </td>
</tr> </tr>
</table> </table>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<!-- <!--
* FCKeditor - The text editor for Internet - http://www.fckeditor.net * FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben * Copyright (C) 2003-2008 Frederico Caldeira Knabben
* *
* == BEGIN LICENSE == * == BEGIN LICENSE ==
* *
@@ -29,16 +29,18 @@
<script src="common/fck_dialog_common.js" type="text/javascript"></script> <script src="common/fck_dialog_common.js" type="text/javascript"></script>
<script type="text/javascript"> <script type="text/javascript">
var oEditor = window.parent.InnerDialogLoaded() ; var dialog = window.parent ;
var FCK = oEditor.FCK ; var oEditor = dialog.InnerDialogLoaded() ;
var FCKBrowserInfo = oEditor.FCKBrowserInfo ;
var FCKTools = oEditor.FCKTools ;
var FCKRegexLib = oEditor.FCKRegexLib ;
// Gets the document DOM var FCK = oEditor.FCK ;
var oDOM = oEditor.FCK.EditorDocument ; var FCKBrowserInfo = oEditor.FCKBrowserInfo ;
var FCKTools = oEditor.FCKTools ;
var FCKRegexLib = oEditor.FCKRegexLib ;
var oDOM = FCK.EditorDocument ;
var oFakeImage = dialog.Selection.GetSelectedElement() ;
var oFakeImage = FCK.Selection.GetSelectedElement() ;
var oAnchor ; var oAnchor ;
if ( oFakeImage ) if ( oFakeImage )
@@ -68,6 +70,9 @@ window.onload = function()
oAnchor = null ; oAnchor = null ;
window.parent.SetOkButton( true ) ; window.parent.SetOkButton( true ) ;
window.parent.SetAutoSize( true ) ;
SelectField( 'txtName' ) ;
} }
function Ok() function Ok()
@@ -188,7 +193,7 @@ function ReadjustLinksToAnchor( sCurrent, sNew )
</script> </script>
</head> </head>
<body style="OVERFLOW: hidden" scroll="no"> <body style="overflow: hidden">
<table height="100%" width="100%"> <table height="100%" width="100%">
<tr> <tr>
<td align="center"> <td align="center">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<!-- <!--
* FCKeditor - The text editor for Internet - http://www.fckeditor.net * FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben * Copyright (C) 2003-2008 Frederico Caldeira Knabben
* *
* == BEGIN LICENSE == * == BEGIN LICENSE ==
* *
@@ -29,12 +29,13 @@
<script src="common/fck_dialog_common.js" type="text/javascript"></script> <script src="common/fck_dialog_common.js" type="text/javascript"></script>
<script type="text/javascript"> <script type="text/javascript">
var oEditor = window.parent.InnerDialogLoaded() ; var dialog = window.parent ;
var oEditor = dialog.InnerDialogLoaded() ;
// Gets the document DOM // Gets the document DOM
var oDOM = oEditor.FCK.EditorDocument ; var oDOM = oEditor.FCK.EditorDocument ;
var oActiveEl = oEditor.FCKSelection.GetSelectedElement() ; var oActiveEl = dialog.Selection.GetSelectedElement() ;
window.onload = function() window.onload = function()
{ {
@@ -46,27 +47,21 @@ window.onload = function()
GetE('txtName').value = oActiveEl.name ; GetE('txtName').value = oActiveEl.name ;
GetE('txtValue').value = oActiveEl.value ; GetE('txtValue').value = oActiveEl.value ;
GetE('txtType').value = oActiveEl.type ; GetE('txtType').value = oActiveEl.type ;
GetE('txtType').disabled = true ;
} }
else else
oActiveEl = null ; oActiveEl = null ;
window.parent.SetOkButton( true ) ; dialog.SetOkButton( true ) ;
dialog.SetAutoSize( true ) ;
SelectField( 'txtName' ) ;
} }
function Ok() function Ok()
{ {
oEditor.FCKUndo.SaveUndoStep() ; oEditor.FCKUndo.SaveUndoStep() ;
if ( !oActiveEl )
{
oActiveEl = oEditor.FCK.EditorDocument.createElement( 'INPUT' ) ;
oActiveEl.type = GetE('txtType').value ;
oActiveEl = oEditor.FCK.InsertElement( oActiveEl ) ;
}
oActiveEl.name = GetE('txtName').value ; oActiveEl = CreateNamedElement( oEditor, oActiveEl, 'INPUT', {name: GetE('txtName').value, type: GetE('txtType').value } ) ;
SetAttribute( oActiveEl, 'value', GetE('txtValue').value ) ; SetAttribute( oActiveEl, 'value', GetE('txtValue').value ) ;
return true ; return true ;

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<!-- <!--
* FCKeditor - The text editor for Internet - http://www.fckeditor.net * FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben * Copyright (C) 2003-2008 Frederico Caldeira Knabben
* *
* == BEGIN LICENSE == * == BEGIN LICENSE ==
* *
@@ -29,12 +29,13 @@
<script src="common/fck_dialog_common.js" type="text/javascript"></script> <script src="common/fck_dialog_common.js" type="text/javascript"></script>
<script type="text/javascript"> <script type="text/javascript">
var oEditor = window.parent.InnerDialogLoaded() ; var dialog = window.parent ;
var oEditor = dialog.InnerDialogLoaded() ;
// Gets the document DOM // Gets the document DOM
var oDOM = oEditor.FCK.EditorDocument ; var oDOM = oEditor.FCK.EditorDocument ;
var oActiveEl = oEditor.FCKSelection.GetSelectedElement() ; var oActiveEl = dialog.Selection.GetSelectedElement() ;
window.onload = function() window.onload = function()
{ {
@@ -50,22 +51,16 @@ window.onload = function()
else else
oActiveEl = null ; oActiveEl = null ;
window.parent.SetOkButton( true ) ; dialog.SetOkButton( true ) ;
dialog.SetAutoSize( true ) ;
SelectField( 'txtName' ) ;
} }
function Ok() function Ok()
{ {
oEditor.FCKUndo.SaveUndoStep() ; oEditor.FCKUndo.SaveUndoStep() ;
if ( !oActiveEl )
{
oActiveEl = oEditor.FCK.EditorDocument.createElement( 'INPUT' ) ;
oActiveEl.type = 'checkbox' ;
oActiveEl = oEditor.FCK.InsertElement( oActiveEl ) ;
}
if ( GetE('txtName').value.length > 0 ) oActiveEl = CreateNamedElement( oEditor, oActiveEl, 'INPUT', {name: GetE('txtName').value, type: 'checkbox' } ) ;
oActiveEl.name = GetE('txtName').value ;
if ( oEditor.FCKBrowserInfo.IsIE ) if ( oEditor.FCKBrowserInfo.IsIE )
oActiveEl.value = GetE('txtValue').value ; oActiveEl.value = GetE('txtValue').value ;

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<!-- <!--
* FCKeditor - The text editor for Internet - http://www.fckeditor.net * FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben * Copyright (C) 2003-2008 Frederico Caldeira Knabben
* *
* == BEGIN LICENSE == * == BEGIN LICENSE ==
* *
@@ -34,6 +34,7 @@
#btnClear { width: 75px ; height: 22px ; margin-bottom: 6px ; } #btnClear { width: 75px ; height: 22px ; margin-bottom: 6px ; }
.ColorCell { height: 15px ; width: 15px ; } .ColorCell { height: 15px ; width: 15px ; }
</style> </style>
<script src="common/fck_dialog_common.js" type="text/javascript"></script>
<script type="text/javascript"> <script type="text/javascript">
var oEditor = window.parent.InnerDialogLoaded() ; var oEditor = window.parent.InnerDialogLoaded() ;
@@ -135,8 +136,8 @@ function UpdateColor()
function Ok() function Ok()
{ {
if ( typeof(window.parent.dialogArguments.CustomValue) == 'function' ) if ( typeof(window.parent.Args().CustomValue) == 'function' )
window.parent.dialogArguments.CustomValue( document.getElementById('selcolor').value ) ; window.parent.Args().CustomValue( document.getElementById('selcolor').value ) ;
return true ; return true ;
} }

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- <!--
* FCKeditor - The text editor for Internet - http://www.fckeditor.net * FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben * Copyright (C) 2003-2008 Frederico Caldeira Knabben
* *
* == BEGIN LICENSE == * == BEGIN LICENSE ==
* *
@@ -374,11 +374,11 @@ function SelectColor( wich )
{ {
switch ( wich ) switch ( wich )
{ {
case 'Back' : oEditor.FCKDialog.OpenDialog( 'FCKDialog_Color', FCKLang.DlgColorTitle, 'dialog/fck_colorselector.html', 400, 330, SelectBackColor, window ) ; return ; case 'Back' : oEditor.FCKDialog.OpenDialog( 'FCKDialog_Color', FCKLang.DlgColorTitle, 'dialog/fck_colorselector.html', 410, 320, SelectBackColor, window ) ; return ;
case 'ColorText' : oEditor.FCKDialog.OpenDialog( 'FCKDialog_Color', FCKLang.DlgColorTitle, 'dialog/fck_colorselector.html', 400, 330, SelectColorText, window ) ; return ; case 'ColorText' : oEditor.FCKDialog.OpenDialog( 'FCKDialog_Color', FCKLang.DlgColorTitle, 'dialog/fck_colorselector.html', 410, 320, SelectColorText, window ) ; return ;
case 'ColorLink' : oEditor.FCKDialog.OpenDialog( 'FCKDialog_Color', FCKLang.DlgColorTitle, 'dialog/fck_colorselector.html', 400, 330, SelectColorLink, window ) ; return ; case 'ColorLink' : oEditor.FCKDialog.OpenDialog( 'FCKDialog_Color', FCKLang.DlgColorTitle, 'dialog/fck_colorselector.html', 410, 320, SelectColorLink, window ) ; return ;
case 'ColorVisited' : oEditor.FCKDialog.OpenDialog( 'FCKDialog_Color', FCKLang.DlgColorTitle, 'dialog/fck_colorselector.html', 400, 330, SelectColorVisited, window ) ; return ; case 'ColorVisited' : oEditor.FCKDialog.OpenDialog( 'FCKDialog_Color', FCKLang.DlgColorTitle, 'dialog/fck_colorselector.html', 410, 320, SelectColorVisited, window ) ; return ;
case 'ColorActive' : oEditor.FCKDialog.OpenDialog( 'FCKDialog_Color', FCKLang.DlgColorTitle, 'dialog/fck_colorselector.html', 400, 330, SelectColorActive, window ) ; return ; case 'ColorActive' : oEditor.FCKDialog.OpenDialog( 'FCKDialog_Color', FCKLang.DlgColorTitle, 'dialog/fck_colorselector.html', 410, 320, SelectColorActive, window ) ; return ;
} }
} }

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- <!--
* FCKeditor - The text editor for Internet - http://www.fckeditor.net * FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben * Copyright (C) 2003-2008 Frederico Caldeira Knabben
* *
* == BEGIN LICENSE == * == BEGIN LICENSE ==
* *

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- <!--
* FCKeditor - The text editor for Internet - http://www.fckeditor.net * FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben * Copyright (C) 2003-2008 Frederico Caldeira Knabben
* *
* == BEGIN LICENSE == * == BEGIN LICENSE ==
* *
@@ -28,7 +28,11 @@
<meta content="noindex, nofollow" name="robots"> <meta content="noindex, nofollow" name="robots">
<script src="common/fck_dialog_common.js" type="text/javascript"></script> <script src="common/fck_dialog_common.js" type="text/javascript"></script>
<script src="fck_flash/fck_flash.js" type="text/javascript"></script> <script src="fck_flash/fck_flash.js" type="text/javascript"></script>
<link href="common/fck_dialog_common.css" type="text/css" rel="stylesheet"> <script type="text/javascript">
document.write( FCKTools.GetStyleHtml( GetCommonDialogCss() ) ) ;
</script>
</head> </head>
<body scroll="no" style="OVERFLOW: hidden"> <body scroll="no" style="OVERFLOW: hidden">
<div id="divInfo"> <div id="divInfo">
@@ -92,7 +96,9 @@
<input id="txtUploadFile" style="WIDTH: 100%" type="file" size="40" name="NewFile" /><br /> <input id="txtUploadFile" style="WIDTH: 100%" type="file" size="40" name="NewFile" /><br />
<br /> <br />
<input id="btnUpload" type="submit" value="Send it to the Server" fckLang="DlgLnkBtnUpload" /> <input id="btnUpload" type="submit" value="Send it to the Server" fckLang="DlgLnkBtnUpload" />
<iframe name="UploadWindow" style="DISPLAY: none" src="javascript:void(0)"></iframe> <script type="text/javascript">
document.write( '<iframe name="UploadWindow" style="DISPLAY: none" src="' + FCKTools.GetVoidUrl() + '"></iframe>' ) ;
</script>
</form> </form>
</div> </div>
<div id="divAdvanced" style="DISPLAY: none"> <div id="divAdvanced" style="DISPLAY: none">

View File

@@ -1,6 +1,6 @@
/* /*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net * FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben * Copyright (C) 2003-2008 Frederico Caldeira Knabben
* *
* == BEGIN LICENSE == * == BEGIN LICENSE ==
* *
@@ -21,21 +21,23 @@
* Scripts related to the Flash dialog window (see fck_flash.html). * Scripts related to the Flash dialog window (see fck_flash.html).
*/ */
var oEditor = window.parent.InnerDialogLoaded() ; var dialog = window.parent ;
var oEditor = dialog.InnerDialogLoaded() ;
var FCK = oEditor.FCK ; var FCK = oEditor.FCK ;
var FCKLang = oEditor.FCKLang ; var FCKLang = oEditor.FCKLang ;
var FCKConfig = oEditor.FCKConfig ; var FCKConfig = oEditor.FCKConfig ;
var FCKTools = oEditor.FCKTools ;
//#### Dialog Tabs //#### Dialog Tabs
// Set the dialog tabs. // Set the dialog tabs.
window.parent.AddTab( 'Info', oEditor.FCKLang.DlgInfoTab ) ; dialog.AddTab( 'Info', oEditor.FCKLang.DlgInfoTab ) ;
if ( FCKConfig.FlashUpload ) if ( FCKConfig.FlashUpload )
window.parent.AddTab( 'Upload', FCKLang.DlgLnkUpload ) ; dialog.AddTab( 'Upload', FCKLang.DlgLnkUpload ) ;
if ( !FCKConfig.FlashDlgHideAdvanced ) if ( !FCKConfig.FlashDlgHideAdvanced )
window.parent.AddTab( 'Advanced', oEditor.FCKLang.DlgAdvancedTag ) ; dialog.AddTab( 'Advanced', oEditor.FCKLang.DlgAdvancedTag ) ;
// Function called when a dialog tag is selected. // Function called when a dialog tag is selected.
function OnDialogTabChange( tabCode ) function OnDialogTabChange( tabCode )
@@ -46,7 +48,7 @@ function OnDialogTabChange( tabCode )
} }
// Get the selected flash embed (if available). // Get the selected flash embed (if available).
var oFakeImage = FCK.Selection.GetSelectedElement() ; var oFakeImage = dialog.Selection.GetSelectedElement() ;
var oEmbed ; var oEmbed ;
if ( oFakeImage ) if ( oFakeImage )
@@ -72,10 +74,12 @@ window.onload = function()
if ( FCKConfig.FlashUpload ) if ( FCKConfig.FlashUpload )
GetE('frmUpload').action = FCKConfig.FlashUploadURL ; GetE('frmUpload').action = FCKConfig.FlashUploadURL ;
window.parent.SetAutoSize( true ) ; dialog.SetAutoSize( true ) ;
// Activate the "OK" button. // Activate the "OK" button.
window.parent.SetOkButton( true ) ; dialog.SetOkButton( true ) ;
SelectField( 'txtUrl' ) ;
} }
function LoadSelection() function LoadSelection()
@@ -114,7 +118,7 @@ function Ok()
{ {
if ( GetE('txtUrl').value.length == 0 ) if ( GetE('txtUrl').value.length == 0 )
{ {
window.parent.SetSelectedTab( 'Info' ) ; dialog.SetSelectedTab( 'Info' ) ;
GetE('txtUrl').focus() ; GetE('txtUrl').focus() ;
alert( oEditor.FCKLang.DlgAlertUrl ) ; alert( oEditor.FCKLang.DlgAlertUrl ) ;
@@ -137,7 +141,7 @@ function Ok()
oFakeImage = FCK.InsertElement( oFakeImage ) ; oFakeImage = FCK.InsertElement( oFakeImage ) ;
} }
oEditor.FCKFlashProcessor.RefreshView( oFakeImage, oEmbed ) ; oEditor.FCKEmbedAndObjectProcessor.RefreshView( oFakeImage, oEmbed ) ;
return true ; return true ;
} }
@@ -227,7 +231,7 @@ function SetUrl( url, width, height )
UpdatePreview() ; UpdatePreview() ;
window.parent.SetSelectedTab( 'Info' ) ; dialog.SetSelectedTab( 'Info' ) ;
} }
function OnUploadCompleted( errorNumber, fileUrl, fileName, customMsg ) function OnUploadCompleted( errorNumber, fileUrl, fileName, customMsg )
@@ -252,6 +256,9 @@ function OnUploadCompleted( errorNumber, fileUrl, fileName, customMsg )
case 203 : case 203 :
alert( "Security error. You probably don't have enough permissions to upload. Please check your server." ) ; alert( "Security error. You probably don't have enough permissions to upload. Please check your server." ) ;
return ; return ;
case 500 :
alert( 'The connector is disabled' ) ;
break ;
default : default :
alert( 'Error on file upload. Error number: ' + errorNumber ) ; alert( 'Error on file upload. Error number: ' + errorNumber ) ;
return ; return ;

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- <!--
* FCKeditor - The text editor for Internet - http://www.fckeditor.net * FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben * Copyright (C) 2003-2008 Frederico Caldeira Knabben
* *
* == BEGIN LICENSE == * == BEGIN LICENSE ==
* *
@@ -26,11 +26,15 @@
<title></title> <title></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="robots" content="noindex, nofollow"> <meta name="robots" content="noindex, nofollow">
<link href="../common/fck_dialog_common.css" rel="stylesheet" type="text/css" /> <script src="../common/fck_dialog_common.js" type="text/javascript"></script>
<script language="javascript"> <script language="javascript">
var FCKTools = window.parent.FCKTools ;
var FCKConfig = window.parent.FCKConfig ;
// Sets the Skin CSS // Sets the Skin CSS
document.write( '<link href="' + window.parent.FCKConfig.SkinPath + 'fck_dialog.css" type="text/css" rel="stylesheet">' ) ; document.write( FCKTools.GetStyleHtml( FCKConfig.SkinDialogCSS ) ) ;
document.write( FCKTools.GetStyleHtml( GetCommonDialogCss( '../' ) ) ) ;
if ( window.parent.FCKConfig.BaseHref.length > 0 ) if ( window.parent.FCKConfig.BaseHref.length > 0 )
document.write( '<base href="' + window.parent.FCKConfig.BaseHref + '">' ) ; document.write( '<base href="' + window.parent.FCKConfig.BaseHref + '">' ) ;

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<!-- <!--
* FCKeditor - The text editor for Internet - http://www.fckeditor.net * FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben * Copyright (C) 2003-2008 Frederico Caldeira Knabben
* *
* == BEGIN LICENSE == * == BEGIN LICENSE ==
* *
@@ -29,12 +29,13 @@
<script src="common/fck_dialog_common.js" type="text/javascript"></script> <script src="common/fck_dialog_common.js" type="text/javascript"></script>
<script type="text/javascript"> <script type="text/javascript">
var oEditor = window.parent.InnerDialogLoaded() ; var dialog = window.parent ;
var oEditor = dialog.InnerDialogLoaded() ;
// Gets the document DOM // Gets the document DOM
var oDOM = oEditor.FCK.EditorDocument ; var oDOM = oEditor.FCK.EditorDocument ;
var oActiveEl = oEditor.FCKSelection.MoveToAncestorNode( 'FORM' ) ; var oActiveEl = dialog.Selection.GetSelection().MoveToAncestorNode( 'FORM' ) ;
window.onload = function() window.onload = function()
{ {
@@ -50,7 +51,9 @@ window.onload = function()
else else
oActiveEl = null ; oActiveEl = null ;
window.parent.SetOkButton( true ) ; dialog.SetOkButton( true ) ;
dialog.SetAutoSize( true ) ;
SelectField( 'txtName' ) ;
} }
function Ok() function Ok()

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<!-- <!--
* FCKeditor - The text editor for Internet - http://www.fckeditor.net * FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben * Copyright (C) 2003-2008 Frederico Caldeira Knabben
* *
* == BEGIN LICENSE == * == BEGIN LICENSE ==
* *
@@ -29,14 +29,16 @@
<script src="common/fck_dialog_common.js" type="text/javascript"></script> <script src="common/fck_dialog_common.js" type="text/javascript"></script>
<script type="text/javascript"> <script type="text/javascript">
var oEditor = window.parent.InnerDialogLoaded() ; var dialog = window.parent ;
var oEditor = dialog.InnerDialogLoaded() ;
var FCK = oEditor.FCK ; var FCK = oEditor.FCK ;
// Gets the document DOM // Gets the document DOM
var oDOM = FCK.EditorDocument ; var oDOM = FCK.EditorDocument ;
// Get the selected flash embed (if available). // Get the selected flash embed (if available).
var oFakeImage = FCK.Selection.GetSelectedElement() ; var oFakeImage = dialog.Selection.GetSelectedElement() ;
var oActiveEl ; var oActiveEl ;
if ( oFakeImage ) if ( oFakeImage )
@@ -58,36 +60,31 @@ window.onload = function()
GetE('txtValue').value = oActiveEl.value ; GetE('txtValue').value = oActiveEl.value ;
} }
window.parent.SetOkButton( true ) ; dialog.SetOkButton( true ) ;
dialog.SetAutoSize( true ) ;
SelectField( 'txtName' ) ;
} }
function Ok() function Ok()
{ {
oEditor.FCKUndo.SaveUndoStep() ; oEditor.FCKUndo.SaveUndoStep() ;
if ( !oActiveEl )
{
oActiveEl = FCK.EditorDocument.createElement( 'INPUT' ) ;
oActiveEl.type = 'hidden' ;
oFakeImage = null ; oActiveEl = CreateNamedElement( oEditor, oActiveEl, 'INPUT', {name: GetE('txtName').value, type: 'hidden' } ) ;
}
oActiveEl.name = GetE('txtName').value ;
SetAttribute( oActiveEl, 'value', GetE('txtValue').value ) ; SetAttribute( oActiveEl, 'value', GetE('txtValue').value ) ;
if ( !oFakeImage ) if ( !oFakeImage )
{ {
oFakeImage = oEditor.FCKDocumentProcessor_CreateFakeImage( 'FCK__InputHidden', oActiveEl ) ; oFakeImage = oEditor.FCKDocumentProcessor_CreateFakeImage( 'FCK__InputHidden', oActiveEl ) ;
oFakeImage.setAttribute( '_fckinputhidden', 'true', 0 ) ; oFakeImage.setAttribute( '_fckinputhidden', 'true', 0 ) ;
oFakeImage = FCK.InsertElement( oFakeImage ) ;
oActiveEl.parentNode.insertBefore( oFakeImage, oActiveEl ) ;
oActiveEl.parentNode.removeChild( oActiveEl ) ;
} }
else else
oEditor.FCKUndo.SaveUndoStep() ; oEditor.FCKUndo.SaveUndoStep() ;
oEditor.FCKFlashProcessor.RefreshView( oFakeImage, oActiveEl ) ;
return true ; return true ;
} }

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- <!--
* FCKeditor - The text editor for Internet - http://www.fckeditor.net * FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben * Copyright (C) 2003-2008 Frederico Caldeira Knabben
* *
* == BEGIN LICENSE == * == BEGIN LICENSE ==
* *
@@ -28,7 +28,11 @@
<meta name="robots" content="noindex, nofollow" /> <meta name="robots" content="noindex, nofollow" />
<script src="common/fck_dialog_common.js" type="text/javascript"></script> <script src="common/fck_dialog_common.js" type="text/javascript"></script>
<script src="fck_image/fck_image.js" type="text/javascript"></script> <script src="fck_image/fck_image.js" type="text/javascript"></script>
<link href="common/fck_dialog_common.css" rel="stylesheet" type="text/css" /> <script type="text/javascript">
document.write( FCKTools.GetStyleHtml( GetCommonDialogCss() ) ) ;
</script>
</head> </head>
<body scroll="no" style="overflow: hidden"> <body scroll="no" style="overflow: hidden">
<div id="divInfo"> <div id="divInfo">
@@ -160,7 +164,9 @@
<input id="txtUploadFile" style="width: 100%" type="file" size="40" name="NewFile" /><br /> <input id="txtUploadFile" style="width: 100%" type="file" size="40" name="NewFile" /><br />
<br /> <br />
<input id="btnUpload" type="submit" value="Send it to the Server" fcklang="DlgLnkBtnUpload" /> <input id="btnUpload" type="submit" value="Send it to the Server" fcklang="DlgLnkBtnUpload" />
<iframe name="UploadWindow" style="display: none" src="javascript:void(0)"></iframe> <script type="text/javascript">
document.write( '<iframe name="UploadWindow" style="display: none" src="' + FCKTools.GetVoidUrl() + '"></iframe>' ) ;
</script>
</form> </form>
</div> </div>
<div id="divLink" style="display: none"> <div id="divLink" style="display: none">

View File

@@ -1,6 +1,6 @@
/* /*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net * FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben * Copyright (C) 2003-2008 Frederico Caldeira Knabben
* *
* == BEGIN LICENSE == * == BEGIN LICENSE ==
* *
@@ -21,27 +21,29 @@
* Scripts related to the Image dialog window (see fck_image.html). * Scripts related to the Image dialog window (see fck_image.html).
*/ */
var oEditor = window.parent.InnerDialogLoaded() ; var dialog = window.parent ;
var oEditor = dialog.InnerDialogLoaded() ;
var FCK = oEditor.FCK ; var FCK = oEditor.FCK ;
var FCKLang = oEditor.FCKLang ; var FCKLang = oEditor.FCKLang ;
var FCKConfig = oEditor.FCKConfig ; var FCKConfig = oEditor.FCKConfig ;
var FCKDebug = oEditor.FCKDebug ; var FCKDebug = oEditor.FCKDebug ;
var FCKTools = oEditor.FCKTools ;
var bImageButton = ( document.location.search.length > 0 && document.location.search.substr(1) == 'ImageButton' ) ; var bImageButton = ( document.location.search.length > 0 && document.location.search.substr(1) == 'ImageButton' ) ;
//#### Dialog Tabs //#### Dialog Tabs
// Set the dialog tabs. // Set the dialog tabs.
window.parent.AddTab( 'Info', FCKLang.DlgImgInfoTab ) ; dialog.AddTab( 'Info', FCKLang.DlgImgInfoTab ) ;
if ( !bImageButton && !FCKConfig.ImageDlgHideLink ) if ( !bImageButton && !FCKConfig.ImageDlgHideLink )
window.parent.AddTab( 'Link', FCKLang.DlgImgLinkTab ) ; dialog.AddTab( 'Link', FCKLang.DlgImgLinkTab ) ;
if ( FCKConfig.ImageUpload ) if ( FCKConfig.ImageUpload )
window.parent.AddTab( 'Upload', FCKLang.DlgLnkUpload ) ; dialog.AddTab( 'Upload', FCKLang.DlgLnkUpload ) ;
if ( !FCKConfig.ImageDlgHideAdvanced ) if ( !FCKConfig.ImageDlgHideAdvanced )
window.parent.AddTab( 'Advanced', FCKLang.DlgAdvancedTag ) ; dialog.AddTab( 'Advanced', FCKLang.DlgAdvancedTag ) ;
// Function called when a dialog tag is selected. // Function called when a dialog tag is selected.
function OnDialogTabChange( tabCode ) function OnDialogTabChange( tabCode )
@@ -53,13 +55,13 @@ function OnDialogTabChange( tabCode )
} }
// Get the selected image (if available). // Get the selected image (if available).
var oImage = FCK.Selection.GetSelectedElement() ; var oImage = dialog.Selection.GetSelectedElement() ;
if ( oImage && oImage.tagName != 'IMG' && !( oImage.tagName == 'INPUT' && oImage.type == 'image' ) ) if ( oImage && oImage.tagName != 'IMG' && !( oImage.tagName == 'INPUT' && oImage.type == 'image' ) )
oImage = null ; oImage = null ;
// Get the active link. // Get the active link.
var oLink = FCK.Selection.MoveToAncestorNode( 'A' ) ; var oLink = dialog.Selection.GetSelection().MoveToAncestorNode( 'A' ) ;
var oImageOriginal ; var oImageOriginal ;
@@ -111,10 +113,12 @@ window.onload = function()
if ( FCKConfig.ImageUpload ) if ( FCKConfig.ImageUpload )
GetE('frmUpload').action = FCKConfig.ImageUploadURL ; GetE('frmUpload').action = FCKConfig.ImageUploadURL ;
window.parent.SetAutoSize( true ) ; dialog.SetAutoSize( true ) ;
// Activate the "OK" button. // Activate the "OK" button.
window.parent.SetOkButton( true ) ; dialog.SetOkButton( true ) ;
SelectField( 'txtUrl' ) ;
} }
function LoadSelection() function LoadSelection()
@@ -197,7 +201,7 @@ function Ok()
{ {
if ( GetE('txtUrl').value.length == 0 ) if ( GetE('txtUrl').value.length == 0 )
{ {
window.parent.SetSelectedTab( 'Info' ) ; dialog.SetSelectedTab( 'Info' ) ;
GetE('txtUrl').focus() ; GetE('txtUrl').focus() ;
alert( FCKLang.DlgImgAlertUrl ) ; alert( FCKLang.DlgImgAlertUrl ) ;
@@ -380,6 +384,11 @@ function OnSizeChanged( dimension, value )
function ResetSizes() function ResetSizes()
{ {
if ( ! oImageOriginal ) return ; if ( ! oImageOriginal ) return ;
if ( oEditor.FCKBrowserInfo.IsGecko && !oImageOriginal.complete )
{
setTimeout( ResetSizes, 50 ) ;
return ;
}
GetE('txtWidth').value = oImageOriginal.width ; GetE('txtWidth').value = oImageOriginal.width ;
GetE('txtHeight').value = oImageOriginal.height ; GetE('txtHeight').value = oImageOriginal.height ;
@@ -433,7 +442,7 @@ function SetUrl( url, width, height, alt )
UpdateOriginal( true ) ; UpdateOriginal( true ) ;
} }
window.parent.SetSelectedTab( 'Info' ) ; dialog.SetSelectedTab( 'Info' ) ;
} }
function OnUploadCompleted( errorNumber, fileUrl, fileName, customMsg ) function OnUploadCompleted( errorNumber, fileUrl, fileName, customMsg )
@@ -458,6 +467,9 @@ function OnUploadCompleted( errorNumber, fileUrl, fileName, customMsg )
case 203 : case 203 :
alert( "Security error. You probably don't have enough permissions to upload. Please check your server." ) ; alert( "Security error. You probably don't have enough permissions to upload. Please check your server." ) ;
return ; return ;
case 500 :
alert( 'The connector is disabled' ) ;
break ;
default : default :
alert( 'Error on file upload. Error number: ' + errorNumber ) ; alert( 'Error on file upload. Error number: ' + errorNumber ) ;
return ; return ;

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- <!--
* FCKeditor - The text editor for Internet - http://www.fckeditor.net * FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben * Copyright (C) 2003-2008 Frederico Caldeira Knabben
* *
* == BEGIN LICENSE == * == BEGIN LICENSE ==
* *
@@ -28,11 +28,15 @@
<title></title> <title></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="robots" content="noindex, nofollow" /> <meta name="robots" content="noindex, nofollow" />
<link href="../common/fck_dialog_common.css" rel="stylesheet" type="text/css" /> <script src="../common/fck_dialog_common.js" type="text/javascript"></script>
<script type="text/javascript"> <script type="text/javascript">
var FCKTools = window.parent.FCKTools ;
var FCKConfig = window.parent.FCKConfig ;
// Sets the Skin CSS // Sets the Skin CSS
document.write( '<link href="' + window.parent.FCKConfig.SkinPath + 'fck_dialog.css" type="text/css" rel="stylesheet">' ) ; document.write( FCKTools.GetStyleHtml( FCKConfig.SkinDialogCSS ) ) ;
document.write( FCKTools.GetStyleHtml( GetCommonDialogCss( '../' ) ) ) ;
if ( window.parent.FCKConfig.BaseHref.length > 0 ) if ( window.parent.FCKConfig.BaseHref.length > 0 )
document.write( '<base href="' + window.parent.FCKConfig.BaseHref + '">' ) ; document.write( '<base href="' + window.parent.FCKConfig.BaseHref + '">' ) ;
@@ -47,20 +51,22 @@ window.onload = function()
</script> </script>
</head> </head>
<body style="color: #000000; background-color: #ffffff"> <body style="color: #000000; background-color: #ffffff">
<a id="lnkPreview" onclick="return false;" style="cursor: default"> <div>
<img id="imgPreview" onload="window.parent.UpdateOriginal();" style="display: none" /></a>Lorem <a id="lnkPreview" onclick="return false;" style="cursor: default">
ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas feugiat consequat diam. <img id="imgPreview" onload="window.parent.UpdateOriginal();"
Maecenas metus. Vivamus diam purus, cursus a, commodo non, facilisis vitae, nulla. style="display: none" alt="" /></a>Lorem ipsum dolor sit amet, consectetuer adipiscing
Aenean dictum lacinia tortor. Nunc iaculis, nibh non iaculis aliquam, orci felis elit. Maecenas feugiat consequat diam. Maecenas metus. Vivamus diam purus, cursus
euismod neque, sed ornare massa mauris sed velit. Nulla pretium mi et risus. Fusce a, commodo non, facilisis vitae, nulla. Aenean dictum lacinia tortor. Nunc iaculis,
mi pede, tempor id, cursus ac, ullamcorper nec, enim. Sed tortor. Curabitur molestie. nibh non iaculis aliquam, orci felis euismod neque, sed ornare massa mauris sed
Duis velit augue, condimentum at, ultrices a, luctus ut, orci. Donec pellentesque velit. Nulla pretium mi et risus. Fusce mi pede, tempor id, cursus ac, ullamcorper
egestas eros. Integer cursus, augue in cursus faucibus, eros pede bibendum sem, nec, enim. Sed tortor. Curabitur molestie. Duis velit augue, condimentum at, ultrices
in tempus tellus justo quis ligula. Etiam eget tortor. Vestibulum rutrum, est ut a, luctus ut, orci. Donec pellentesque egestas eros. Integer cursus, augue in cursus
placerat elementum, lectus nisl aliquam velit, tempor aliquam eros nunc nonummy faucibus, eros pede bibendum sem, in tempus tellus justo quis ligula. Etiam eget
metus. In eros metus, gravida a, gravida sed, lobortis id, turpis. Ut ultrices, tortor. Vestibulum rutrum, est ut placerat elementum, lectus nisl aliquam velit,
ipsum at venenatis fringilla, sem nulla lacinia tellus, eget aliquet turpis mauris tempor aliquam eros nunc nonummy metus. In eros metus, gravida a, gravida sed, lobortis
non enim. Nam turpis. Suspendisse lacinia. Curabitur ac tortor ut ipsum egestas id, turpis. Ut ultrices, ipsum at venenatis fringilla, sem nulla lacinia tellus,
elementum. Nunc imperdiet gravida mauris. eget aliquet turpis mauris non enim. Nam turpis. Suspendisse lacinia. Curabitur
ac tortor ut ipsum egestas elementum. Nunc imperdiet gravida mauris.
</div>
</body> </body>
</html> </html>

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- <!--
* FCKeditor - The text editor for Internet - http://www.fckeditor.net * FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben * Copyright (C) 2003-2008 Frederico Caldeira Knabben
* *
* == BEGIN LICENSE == * == BEGIN LICENSE ==
* *

View File

@@ -1,6 +1,6 @@
/* /*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net * FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben * Copyright (C) 2003-2008 Frederico Caldeira Knabben
* *
* == BEGIN LICENSE == * == BEGIN LICENSE ==
* *
@@ -21,7 +21,9 @@
* Scripts related to the Link dialog window (see fck_link.html). * Scripts related to the Link dialog window (see fck_link.html).
*/ */
var oEditor = window.parent.InnerDialogLoaded() ; var dialog = window.parent ;
var oEditor = dialog.InnerDialogLoaded() ;
var FCK = oEditor.FCK ; var FCK = oEditor.FCK ;
var FCKLang = oEditor.FCKLang ; var FCKLang = oEditor.FCKLang ;
var FCKConfig = oEditor.FCKConfig ; var FCKConfig = oEditor.FCKConfig ;
@@ -31,16 +33,16 @@ var FCKTools = oEditor.FCKTools ;
//#### Dialog Tabs //#### Dialog Tabs
// Set the dialog tabs. // Set the dialog tabs.
window.parent.AddTab( 'Info', FCKLang.DlgLnkInfoTab ) ; dialog.AddTab( 'Info', FCKLang.DlgLnkInfoTab ) ;
if ( !FCKConfig.LinkDlgHideTarget ) if ( !FCKConfig.LinkDlgHideTarget )
window.parent.AddTab( 'Target', FCKLang.DlgLnkTargetTab, true ) ; dialog.AddTab( 'Target', FCKLang.DlgLnkTargetTab, true ) ;
if ( FCKConfig.LinkUpload ) if ( FCKConfig.LinkUpload )
window.parent.AddTab( 'Upload', FCKLang.DlgLnkUpload, true ) ; dialog.AddTab( 'Upload', FCKLang.DlgLnkUpload, true ) ;
if ( !FCKConfig.LinkDlgHideAdvanced ) if ( !FCKConfig.LinkDlgHideAdvanced )
window.parent.AddTab( 'Advanced', FCKLang.DlgAdvancedTag ) ; dialog.AddTab( 'Advanced', FCKLang.DlgAdvancedTag ) ;
// Function called when a dialog tag is selected. // Function called when a dialog tag is selected.
function OnDialogTabChange( tabCode ) function OnDialogTabChange( tabCode )
@@ -50,7 +52,7 @@ function OnDialogTabChange( tabCode )
ShowE('divUpload' , ( tabCode == 'Upload' ) ) ; ShowE('divUpload' , ( tabCode == 'Upload' ) ) ;
ShowE('divAttribs' , ( tabCode == 'Advanced' ) ) ; ShowE('divAttribs' , ( tabCode == 'Advanced' ) ) ;
window.parent.SetAutoSize( true ) ; dialog.SetAutoSize( true ) ;
} }
//#### Regular Expressions library. //#### Regular Expressions library.
@@ -124,7 +126,7 @@ oParser.CreateEMailUri = function( address, subject, body )
//#### Initialization Code //#### Initialization Code
// oLink: The actual selected link in the editor. // oLink: The actual selected link in the editor.
var oLink = FCK.Selection.MoveToAncestorNode( 'A' ) ; var oLink = dialog.Selection.GetSelection().MoveToAncestorNode( 'A' ) ;
if ( oLink ) if ( oLink )
FCK.Selection.SelectNode( oLink ) ; FCK.Selection.SelectNode( oLink ) ;
@@ -156,7 +158,23 @@ window.onload = function()
SetDefaultTarget() ; SetDefaultTarget() ;
// Activate the "OK" button. // Activate the "OK" button.
window.parent.SetOkButton( true ) ; dialog.SetOkButton( true ) ;
// Select the first field.
switch( GetE('cmbLinkType').value )
{
case 'url' :
SelectField( 'txtUrl' ) ;
break ;
case 'email' :
SelectField( 'txtEMailAddress' ) ;
break ;
case 'anchor' :
if ( GetE('divSelAnchor').style.display != 'none' )
SelectField( 'cmbAnchorName' ) ;
else
SelectField( 'cmbLinkType' ) ;
}
} }
var bHasAnchors ; var bHasAnchors ;
@@ -224,14 +242,14 @@ function LoadSelection()
} }
// Accessible popups, the popup data is in the onclick attribute // Accessible popups, the popup data is in the onclick attribute
if ( !oPopupMatch ) if ( !oPopupMatch )
{ {
var onclick = oLink.getAttribute( 'onclick_fckprotectedatt' ) ; var onclick = oLink.getAttribute( 'onclick_fckprotectedatt' ) ;
if ( onclick ) if ( onclick )
{ {
// Decode the protected string // Decode the protected string
onclick = decodeURIComponent( onclick ) ; onclick = decodeURIComponent( onclick ) ;
oPopupMatch = oRegex.OnClickPopup.exec( onclick ) ; oPopupMatch = oRegex.OnClickPopup.exec( onclick ) ;
if( oPopupMatch ) if( oPopupMatch )
{ {
@@ -338,16 +356,16 @@ function SetLinkType( linkType )
ShowE('divLinkTypeEMail' , (linkType == 'email') ) ; ShowE('divLinkTypeEMail' , (linkType == 'email') ) ;
if ( !FCKConfig.LinkDlgHideTarget ) if ( !FCKConfig.LinkDlgHideTarget )
window.parent.SetTabVisibility( 'Target' , (linkType == 'url') ) ; dialog.SetTabVisibility( 'Target' , (linkType == 'url') ) ;
if ( FCKConfig.LinkUpload ) if ( FCKConfig.LinkUpload )
window.parent.SetTabVisibility( 'Upload' , (linkType == 'url') ) ; dialog.SetTabVisibility( 'Upload' , (linkType == 'url') ) ;
if ( !FCKConfig.LinkDlgHideAdvanced ) if ( !FCKConfig.LinkDlgHideAdvanced )
window.parent.SetTabVisibility( 'Advanced' , (linkType != 'anchor' || bHasAnchors) ) ; dialog.SetTabVisibility( 'Advanced' , (linkType != 'anchor' || bHasAnchors) ) ;
if ( linkType == 'email' ) if ( linkType == 'email' )
window.parent.SetAutoSize( true ) ; dialog.SetAutoSize( true ) ;
} }
//#### Target type selection. //#### Target type selection.
@@ -371,7 +389,7 @@ function SetTarget( targetType )
} }
if ( targetType == 'popup' ) if ( targetType == 'popup' )
window.parent.SetAutoSize( true ) ; dialog.SetAutoSize( true ) ;
} }
//#### Called while the user types the URL. //#### Called while the user types the URL.
@@ -574,7 +592,7 @@ function Ok()
{ {
// Decode the protected string // Decode the protected string
onclick = decodeURIComponent( onclick ) ; onclick = decodeURIComponent( onclick ) ;
if( oRegex.OnClickPopup.test( onclick ) ) if( oRegex.OnClickPopup.test( onclick ) )
SetAttribute( oLink, 'onclick_fckprotectedatt', '' ) ; SetAttribute( oLink, 'onclick_fckprotectedatt', '' ) ;
} }
@@ -634,7 +652,7 @@ function SetUrl( url )
{ {
document.getElementById('txtUrl').value = url ; document.getElementById('txtUrl').value = url ;
OnUrlChange() ; OnUrlChange() ;
window.parent.SetSelectedTab( 'Info' ) ; dialog.SetSelectedTab( 'Info' ) ;
} }
function OnUploadCompleted( errorNumber, fileUrl, fileName, customMsg ) function OnUploadCompleted( errorNumber, fileUrl, fileName, customMsg )
@@ -659,6 +677,9 @@ function OnUploadCompleted( errorNumber, fileUrl, fileName, customMsg )
case 203 : case 203 :
alert( "Security error. You probably don't have enough permissions to upload. Please check your server." ) ; alert( "Security error. You probably don't have enough permissions to upload. Please check your server." ) ;
return ; return ;
case 500 :
alert( 'The connector is disabled' ) ;
break ;
default : default :
alert( 'Error on file upload. Error number: ' + errorNumber ) ; alert( 'Error on file upload. Error number: ' + errorNumber ) ;
return ; return ;
@@ -694,7 +715,7 @@ function CheckUpload()
function SetDefaultTarget() function SetDefaultTarget()
{ {
var target = FCKConfig.DefaultLinkTarget || '' ; var target = FCKConfig.DefaultLinkTarget || '' ;
if ( oLink || target.length == 0 ) if ( oLink || target.length == 0 )
return ; return ;
@@ -710,6 +731,6 @@ function SetDefaultTarget()
GetE('cmbTarget').value = 'frame' ; GetE('cmbTarget').value = 'frame' ;
break ; break ;
} }
GetE('txtTargetFrame').value = target ; GetE('txtTargetFrame').value = target ;
} }

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<!-- <!--
* FCKeditor - The text editor for Internet - http://www.fckeditor.net * FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben * Copyright (C) 2003-2008 Frederico Caldeira Knabben
* *
* == BEGIN LICENSE == * == BEGIN LICENSE ==
* *
@@ -29,13 +29,14 @@
<script src="common/fck_dialog_common.js" type="text/javascript"></script> <script src="common/fck_dialog_common.js" type="text/javascript"></script>
<script type="text/javascript"> <script type="text/javascript">
var oEditor = window.parent.InnerDialogLoaded() ; var dialog = window.parent ;
var oEditor = dialog.InnerDialogLoaded() ;
// Gets the document DOM // Gets the document DOM
var oDOM = oEditor.FCK.EditorDocument ; var oDOM = oEditor.FCK.EditorDocument ;
var sListType = ( location.search == '?OL' ? 'OL' : 'UL' ) ; var sListType = ( location.search == '?OL' ? 'OL' : 'UL' ) ;
var oActiveEl = oEditor.FCKSelection.MoveToAncestorNode( sListType ) ; var oActiveEl = dialog.Selection.GetSelection().MoveToAncestorNode( sListType ) ;
var oActiveSel ; var oActiveSel ;
window.onload = function() window.onload = function()
@@ -63,7 +64,10 @@ window.onload = function()
oActiveSel.value = oActiveEl.getAttribute('type') ; oActiveSel.value = oActiveEl.getAttribute('type') ;
} }
window.parent.SetOkButton( true ) ; dialog.SetOkButton( true ) ;
dialog.SetAutoSize( true ) ;
SelectField( 'txtStartPosition' ) ;
} }
function Ok() function Ok()

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- <!--
* FCKeditor - The text editor for Internet - http://www.fckeditor.net * FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben * Copyright (C) 2003-2008 Frederico Caldeira Knabben
* *
* == BEGIN LICENSE == * == BEGIN LICENSE ==
* *
@@ -28,41 +28,61 @@
<title></title> <title></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="robots" content="noindex, nofollow" /> <meta name="robots" content="noindex, nofollow" />
<script src="common/fck_dialog_common.js" type="text/javascript"></script>
<script type="text/javascript"> <script type="text/javascript">
var oEditor = window.parent.InnerDialogLoaded() ; var dialog = window.parent ;
var oEditor = dialog.InnerDialogLoaded() ;
var FCK = oEditor.FCK; var FCK = oEditor.FCK;
var FCKTools = oEditor.FCKTools ; var FCKTools = oEditor.FCKTools ;
var FCKConfig = oEditor.FCKConfig ; var FCKConfig = oEditor.FCKConfig ;
var FCKBrowserInfo = oEditor.FCKBrowserInfo ;
window.onload = function () window.onload = function ()
{ {
// First of all, translate the dialog box texts // First of all, translate the dialog box texts
oEditor.FCKLanguageManager.TranslatePage(document) ; oEditor.FCKLanguageManager.TranslatePage(document) ;
var sPastingType = window.parent.dialogArguments.CustomValue ; var sPastingType = dialog.Args().CustomValue ;
if ( sPastingType == 'Word' || sPastingType == 'Security' ) if ( sPastingType == 'Word' || sPastingType == 'Security' )
{ {
if ( sPastingType == 'Security' ) if ( sPastingType == 'Security' )
document.getElementById( 'xSecurityMsg' ).style.display = '' ; document.getElementById( 'xSecurityMsg' ).style.display = '' ;
var oFrame = document.getElementById('frmData') ; // For document.domain compatibility (#123) we must do all the magic in
oFrame.style.display = '' ; // the URL for IE.
var sFrameUrl = !oEditor.FCK_IS_CUSTOM_DOMAIN || !FCKBrowserInfo.IsIE ?
'javascript:void(0)' :
'javascript:void( (function(){' +
'document.open() ;' +
'document.domain=\'' + document.domain + '\' ;' +
'document.write(\'<html><head><script>window.onerror = function() { return true ; };<\/script><\/head><body><\/body><\/html>\') ;' +
'document.close() ;' +
'document.body.contentEditable = true ;' +
'window.focus() ;' +
'})() )' ;
// Avoid errors if the pasted content has any script that fails: #389 var eFrameSpace = document.getElementById( 'xFrameSpace' ) ;
var oDoc = oFrame.contentWindow.document ; eFrameSpace.innerHTML = '<iframe id="frmData" src="' + sFrameUrl + '" ' +
oDoc.open() ; 'height="98%" width="99%" frameborder="0" style="border: #000000 1px; background-color: #ffffff"></iframe>' ;
oDoc.write('<html><head><script>window.onerror = function() { return true ; };<\/script><\/head><body><\/body><\/html>') ;
oDoc.close() ;
if ( oFrame.contentDocument )
oFrame.contentDocument.designMode = 'on' ;
else
oFrame.contentWindow.document.body.contentEditable = true ;
// Set the focus on the pasting area var oFrame = eFrameSpace.firstChild ;
oFrame.contentWindow.focus();
if ( !oEditor.FCK_IS_CUSTOM_DOMAIN || !FCKBrowserInfo.IsIE )
{
// Avoid errors if the pasted content has any script that fails: #389
var oDoc = oFrame.contentWindow.document ;
oDoc.open() ;
oDoc.write('<html><head><script>window.onerror = function() { return true ; };<\/script><\/head><body><\/body><\/html>') ;
oDoc.close() ;
if ( FCKBrowserInfo.IsIE )
oDoc.body.contentEditable = true ;
else
oDoc.designMode = 'on' ;
oFrame.contentWindow.focus();
}
} }
else else
{ {
@@ -72,8 +92,8 @@ window.onload = function ()
if ( sPastingType != 'Word' ) if ( sPastingType != 'Word' )
document.getElementById('oWordCommands').style.display = 'none' ; document.getElementById('oWordCommands').style.display = 'none' ;
window.parent.SetOkButton( true ) ; dialog.SetOkButton( true ) ;
window.parent.SetAutoSize( true ) ; dialog.SetAutoSize( true ) ;
} }
function Ok() function Ok()
@@ -83,7 +103,7 @@ function Ok()
var sHtml ; var sHtml ;
var sPastingType = window.parent.dialogArguments.CustomValue ; var sPastingType = dialog.Args().CustomValue ;
if ( sPastingType == 'Word' || sPastingType == 'Security' ) if ( sPastingType == 'Word' || sPastingType == 'Security' )
{ {
@@ -119,6 +139,7 @@ function Ok()
// Use the marker method instead. It's primitive, but it works. // Use the marker method instead. It's primitive, but it works.
var range = new oEditor.FCKDomRange( oEditor.FCK.EditorWindow ) ; var range = new oEditor.FCKDomRange( oEditor.FCK.EditorWindow ) ;
var oDoc = oEditor.FCK.EditorDocument ; var oDoc = oEditor.FCK.EditorDocument ;
dialog.Selection.EnsureSelection() ;
range.MoveToSelection() ; range.MoveToSelection() ;
range.DeleteContents() ; range.DeleteContents() ;
var marker = [] ; var marker = [] ;
@@ -157,17 +178,6 @@ function Ok()
return true ; return true ;
} }
function CleanUpBox()
{
var oFrame = document.getElementById('frmData') ;
if ( oFrame.contentDocument )
oFrame.contentDocument.body.innerHTML = '' ;
else
oFrame.contentWindow.document.body.innerHTML = '' ;
}
// This function will be called from the PasteFromWord dialog (fck_paste.html) // This function will be called from the PasteFromWord dialog (fck_paste.html)
// Input: oNode a DOM node that contains the raw paste from the clipboard // Input: oNode a DOM node that contains the raw paste from the clipboard
// bIgnoreFont, bRemoveStyles booleans according to the values set in the dialog // bIgnoreFont, bRemoveStyles booleans according to the values set in the dialog
@@ -306,33 +316,22 @@ function CleanWord( oNode, bIgnoreFont, bRemoveStyles )
</td> </td>
</tr> </tr>
<tr> <tr>
<td valign="top" height="100%" style="border-right: #000000 1px solid; border-top: #000000 1px solid; <td id="xFrameSpace" valign="top" height="100%" style="border: #000000 1px solid">
border-left: #000000 1px solid; border-bottom: #000000 1px solid">
<textarea id="txtData" cols="80" rows="5" style="border: #000000 1px; display: none; <textarea id="txtData" cols="80" rows="5" style="border: #000000 1px; display: none;
width: 99%; height: 98%"></textarea> width: 99%; height: 98%"></textarea>
<iframe id="frmData" src="javascript:void(0)" height="98%" width="99%" frameborder="0"
style="border-right: #000000 1px; border-top: #000000 1px; display: none; border-left: #000000 1px;
border-bottom: #000000 1px; background-color: #ffffff"></iframe>
</td> </td>
</tr> </tr>
<tr id="oWordCommands"> <tr id="oWordCommands">
<td> <td>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr> <input id="chkRemoveFont" type="checkbox" checked="checked" />
<td nowrap="nowrap"> <label for="chkRemoveFont" fcklang="DlgPasteIgnoreFont">
<input id="chkRemoveFont" type="checkbox" checked="checked" /> Ignore Font Face definitions</label>
<label for="chkRemoveFont" fcklang="DlgPasteIgnoreFont"> <br />
Ignore Font Face definitions</label> <input id="chkRemoveStyles" type="checkbox" />
<br /> <label for="chkRemoveStyles" fcklang="DlgPasteRemoveStyles">
<input id="chkRemoveStyles" type="checkbox" /> Remove Styles definitions</label>
<label for="chkRemoveStyles" fcklang="DlgPasteRemoveStyles">
Remove Styles definitions</label>
</td>
<td align="right" valign="top">
<input type="button" fcklang="DlgPasteCleanBox" value="Clean Up Box" onclick="CleanUpBox()" />
</td>
</tr>
</table>
</td> </td>
</tr> </tr>
</table> </table>

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<!-- <!--
* FCKeditor - The text editor for Internet - http://www.fckeditor.net * FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben * Copyright (C) 2003-2008 Frederico Caldeira Knabben
* *
* == BEGIN LICENSE == * == BEGIN LICENSE ==
* *
@@ -29,12 +29,13 @@
<script src="common/fck_dialog_common.js" type="text/javascript"></script> <script src="common/fck_dialog_common.js" type="text/javascript"></script>
<script type="text/javascript"> <script type="text/javascript">
var oEditor = window.parent.InnerDialogLoaded() ; var dialog = window.parent ;
var oEditor = dialog.InnerDialogLoaded() ;
// Gets the document DOM // Gets the document DOM
var oDOM = oEditor.FCK.EditorDocument ; var oDOM = oEditor.FCK.EditorDocument ;
var oActiveEl = oEditor.FCKSelection.GetSelectedElement() ; var oActiveEl = dialog.Selection.GetSelectedElement() ;
window.onload = function() window.onload = function()
{ {
@@ -50,22 +51,16 @@ window.onload = function()
else else
oActiveEl = null ; oActiveEl = null ;
window.parent.SetOkButton( true ) ; dialog.SetOkButton( true ) ;
dialog.SetAutoSize( true ) ;
SelectField( 'txtName' ) ;
} }
function Ok() function Ok()
{ {
oEditor.FCKUndo.SaveUndoStep() ; oEditor.FCKUndo.SaveUndoStep() ;
if ( !oActiveEl )
{
oActiveEl = oEditor.FCK.EditorDocument.createElement( 'INPUT' ) ;
oActiveEl.type = 'radio' ;
oActiveEl = oEditor.FCK.InsertElement( oActiveEl ) ;
}
if ( GetE('txtName').value.length > 0 ) oActiveEl = CreateNamedElement( oEditor, oActiveEl, 'INPUT', {name: GetE('txtName').value, type: 'radio' } ) ;
oActiveEl.name = GetE('txtName').value ;
if ( oEditor.FCKBrowserInfo.IsIE ) if ( oEditor.FCKBrowserInfo.IsIE )
oActiveEl.value = GetE('txtValue').value ; oActiveEl.value = GetE('txtValue').value ;

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- <!--
* FCKeditor - The text editor for Internet - http://www.fckeditor.net * FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben * Copyright (C) 2003-2008 Frederico Caldeira Knabben
* *
* == BEGIN LICENSE == * == BEGIN LICENSE ==
* *
@@ -29,11 +29,14 @@
<script src="common/fck_dialog_common.js" type="text/javascript"></script> <script src="common/fck_dialog_common.js" type="text/javascript"></script>
<script type="text/javascript"> <script type="text/javascript">
var oEditor = window.parent.InnerDialogLoaded() ; var dialog = window.parent ;
var oEditor = dialog.InnerDialogLoaded() ;
var dialogArguments = dialog.Args() ;
var FCKLang = oEditor.FCKLang ; var FCKLang = oEditor.FCKLang ;
window.parent.AddTab( 'Find', FCKLang.DlgFindTitle ) ; dialog.AddTab( 'Find', FCKLang.DlgFindTitle ) ;
window.parent.AddTab( 'Replace', FCKLang.DlgReplaceTitle ) ; dialog.AddTab( 'Replace', FCKLang.DlgReplaceTitle ) ;
var idMap = {} ; var idMap = {} ;
function OnDialogTabChange( tabCode ) function OnDialogTabChange( tabCode )
@@ -43,6 +46,41 @@ function OnDialogTabChange( tabCode )
idMap['FindText'] = 'txtFind' + tabCode ; idMap['FindText'] = 'txtFind' + tabCode ;
idMap['CheckCase'] = 'chkCase' + tabCode ; idMap['CheckCase'] = 'chkCase' + tabCode ;
idMap['CheckWord'] = 'chkWord' + tabCode ; idMap['CheckWord'] = 'chkWord' + tabCode ;
if ( tabCode == 'Replace' )
dialog.SetAutoSize( true ) ;
}
// Place a range at the start of document.
// This will be the starting point of our search.
var GlobalRange = new oEditor.FCKDomRange( oEditor.FCK.EditorWindow ) ;
function ResetGlobalRange()
{
GlobalRange.SetStart( oEditor.FCK.EditorDocument.body, 1 ) ;
GlobalRange.SetEnd( oEditor.FCK.EditorDocument.body, 1 ) ;
GlobalRange.Collapse( true ) ;
}
ResetGlobalRange() ;
var HighlightRange = null ;
function Highlight()
{
if ( HighlightRange )
ClearHighlight() ;
var cloneRange = GlobalRange.Clone() ;
oEditor.FCKStyles.GetStyle( '_FCK_SelectionHighlight' ).ApplyToRange( cloneRange, false, true ) ;
HighlightRange = cloneRange ;
GlobalRange = HighlightRange.Clone() ;
}
function ClearHighlight()
{
if ( HighlightRange )
{
oEditor.FCKStyles.GetStyle( '_FCK_SelectionHighlight' ).RemoveFromRange( HighlightRange, false, true ) ;
HighlightRange = null ;
}
} }
function OnLoad() function OnLoad()
@@ -50,76 +88,93 @@ function OnLoad()
// First of all, translate the dialog box texts. // First of all, translate the dialog box texts.
oEditor.FCKLanguageManager.TranslatePage( document ) ; oEditor.FCKLanguageManager.TranslatePage( document ) ;
// Place the cursor at the start of document.
// This will be the starting point of our search.
var range = new oEditor.FCKDomRange( oEditor.FCK.EditorWindow ) ;
range.SetStart( oEditor.FCK.EditorDocument.body, 1 ) ;
range.SetEnd( oEditor.FCK.EditorDocument.body, 1 ) ;
range.Collapse( true ) ;
range.Select() ;
// Show the appropriate tab at startup. // Show the appropriate tab at startup.
if ( window.parent.name.search( 'Replace' ) == -1 ) if ( dialogArguments.CustomValue == 'Find' )
window.parent.SetSelectedTab( 'Find' ) ; {
dialog.SetSelectedTab( 'Find' ) ;
dialog.SetAutoSize( true ) ;
}
else else
window.parent.SetSelectedTab( 'Replace' ) ; dialog.SetSelectedTab( 'Replace' ) ;
SelectField( 'txtFind' + dialogArguments.CustomValue ) ;
} }
function btnStat(frm) function btnStat()
{ {
document.getElementById('btnReplace').disabled = GetE('btnReplace').disabled =
document.getElementById('btnReplaceAll').disabled = GetE('btnReplaceAll').disabled =
document.getElementById('btnFind').disabled = GetE('btnFind').disabled =
( document.getElementById(idMap["FindText"]).value.length == 0 ) ; ( GetE(idMap["FindText"]).value.length == 0 ) ;
} }
function GetSelection() function btnStatDelayed()
{ {
var range = new oEditor.FCKDomRange( oEditor.FCK.EditorWindow ) ; setTimeout( btnStat, 1 ) ;
range.MoveToSelection() ;
return range.CreateBookmark2() ;
} }
function GetSearchString() function GetSearchString()
{ {
return document.getElementById(idMap['FindText']).value ; return GetE(idMap['FindText']).value ;
} }
function GetReplaceString() function GetReplaceString()
{ {
return document.getElementById("txtReplace").value ; return GetE("txtReplace").value ;
} }
function GetCheckCase() function GetCheckCase()
{ {
return !! ( document.getElementById(idMap['CheckCase']).checked ) ; return !! ( GetE(idMap['CheckCase']).checked ) ;
} }
function GetMatchWord() function GetMatchWord()
{ {
return !! ( document.getElementById(idMap['CheckWord']).checked ) ; return !! ( GetE(idMap['CheckWord']).checked ) ;
} }
// Get the data pointed to by a bookmark. // Get the data pointed to by a bookmark.
function GetData( bookmark ) function GetData( bookmark )
{ {
var currentNode = oEditor.FCK.EditorDocument.documentElement; var cursor = oEditor.FCK.EditorDocument.documentElement ;
for( var i = 0 ; i < bookmark.length ; i++ ) for ( var i = 0 ; i < bookmark.length ; i++ )
{ {
if ( currentNode.childNodes.length > bookmark[i] ) var target = bookmark[i] ;
currentNode = currentNode.childNodes.item( bookmark[i] ) ; var currentIndex = -1 ;
else if ( currentNode.nodeType == 3 ) // text node if ( cursor.nodeType != 3 )
{ {
var c = currentNode.nodeValue.charAt( bookmark[i] ) ; for (var j = 0 ; j < cursor.childNodes.length ; j++ )
if ( i == bookmark.length - 1 ) {
return c != "" ? c : null ; var candidate = cursor.childNodes[j] ;
else if ( candidate.nodeType == 3 &&
candidate.previousSibling &&
candidate.previousSibling.nodeType == 3 )
continue ;
currentIndex++ ;
if ( currentIndex == target )
{
cursor = candidate ;
break ;
}
}
if ( currentIndex < target )
return null ; return null ;
} }
else else
return null; {
if ( i != bookmark.length - 1 )
return null ;
while ( target >= cursor.length && cursor.nextSibling && cursor.nextSibling.nodeType == 3 )
{
target -= cursor.length ;
cursor = cursor.nextSibling ;
}
cursor = cursor.nodeValue.charAt( target ) ;
if ( cursor == "" )
cursor = null ;
}
} }
return currentNode ; return cursor ;
} }
// With this function, we can treat the bookmark as an iterator for DFS. // With this function, we can treat the bookmark as an iterator for DFS.
@@ -127,7 +182,6 @@ function NextPosition( bookmark )
{ {
// See if there's anything further down the tree. // See if there's anything further down the tree.
var next = bookmark.concat( [0] ) ; var next = bookmark.concat( [0] ) ;
if ( GetData( next ) != null ) if ( GetData( next ) != null )
return next ; return next ;
@@ -213,7 +267,7 @@ KmpMatch.prototype = {
this._State = 0; this._State = 0;
return KMP_MATCHED; return KMP_MATCHED;
} }
return KMP_ADVANCED; return KMP_ADVANCED ;
} }
else if ( this._State == 0 ) else if ( this._State == 0 )
return KMP_NOMATCH; return KMP_NOMATCH;
@@ -233,9 +287,10 @@ function _Find()
{ {
// Start from the end of the current selection. // Start from the end of the current selection.
var matcher = new KmpMatch( GetSearchString(), ! GetCheckCase() ) ; var matcher = new KmpMatch( GetSearchString(), ! GetCheckCase() ) ;
var cursor = GetSelection().End ; var cursor = GlobalRange.CreateBookmark2().End ;
var matchState = KMP_NOMATCH ; var matchState = KMP_NOMATCH ;
var matchBookmark = null ; var matchBookmark = null ;
var matchBookmarkStart = [] ;
// Match finding. // Match finding.
while ( true ) while ( true )
@@ -248,24 +303,39 @@ function _Find()
if ( data.tagName ) if ( data.tagName )
{ {
if ( oEditor.FCKListsLib.BlockElements[ data.tagName.toLowerCase() ] ) if ( oEditor.FCKListsLib.BlockElements[ data.tagName.toLowerCase() ] )
{
matcher.Reset(); matcher.Reset();
matchBookmarkStart = [] ;
}
} }
else if ( data.charAt != undefined ) else if ( data.charAt != undefined )
{ {
matchState = matcher.FeedCharacter(data) ; matchState = matcher.FeedCharacter(data) ;
// No possible match of any useful substring in the pattern for the currently scanned character.
// So delete any positional information.
if ( matchState == KMP_NOMATCH ) if ( matchState == KMP_NOMATCH )
matchBookmark = null ; matchBookmarkStart = [] ;
else if ( matchState == KMP_ADVANCED && matchBookmark == null ) // We've matched something, but it's not a complete match, so let's just mark down the position for backtracking later.
matchBookmark = { Start : cursor.concat( [] ) } ; else if ( matchState == KMP_ADVANCED )
{
matchBookmarkStart.push( cursor.concat( [] ) ) ;
if ( matchBookmarkStart.length > matcher._State )
matchBookmarkStart.shift() ;
}
// Found a complete match! Mark down the ending position as well.
else if ( matchState == KMP_MATCHED ) else if ( matchState == KMP_MATCHED )
{ {
if ( matchBookmark == null ) // It is possible to get a KMP_MATCHED without KMP_ADVANCED when the match pattern is only 1 character.
matchBookmark = { Start : cursor.concat( [] ) } ; // So need to check and mark down the starting position as well.
matchBookmark.End = cursor.concat( [] ) ; if ( matchBookmarkStart.length == 0 )
matchBookmarkStart = [cursor.concat( [] )] ;
matchBookmark = { 'Start' : matchBookmarkStart.shift(), 'End' : cursor.concat( [] ) } ;
matchBookmark.End[ matchBookmark.End.length - 1 ]++; matchBookmark.End[ matchBookmark.End.length - 1 ]++;
// Wait, do we have to match a whole word? // Wait, do we have to match a whole word?
// If yes, carry out additional checks on what we've got.
if ( GetMatchWord() ) if ( GetMatchWord() )
{ {
var startOk = false ; var startOk = false ;
@@ -310,74 +380,82 @@ function _Find()
break; break;
} }
// If we've found a match, select the match. // If we've found a match, highlight the match.
if ( matchState == KMP_MATCHED ) if ( matchState == KMP_MATCHED )
{ {
var range = new oEditor.FCKDomRange( oEditor.FCK.EditorWindow ) ; GlobalRange.MoveToBookmark2( matchBookmark ) ;
range.MoveToBookmark2( matchBookmark ) ; Highlight() ;
range.Select() ; var focus = GlobalRange._Range.endContainer ;
var focus = range._Range.endContainer ;
while ( focus && focus.nodeType != 1 ) while ( focus && focus.nodeType != 1 )
focus = focus.parentNode ; focus = focus.parentNode ;
if ( focus ) if ( focus )
focus.scrollIntoView( false ) ; {
return true; if ( oEditor.FCKBrowserInfo.IsSafari )
oEditor.FCKDomTools.ScrollIntoView( focus, false ) ;
else
focus.scrollIntoView( false ) ;
}
return true ;
} }
else else
return false; {
ResetGlobalRange() ;
return false ;
}
} }
function Find() function Find()
{ {
var range = new oEditor.FCKDomRange( oEditor.FCK.EditorWindow ) ;
range.MoveToSelection() ;
range.Collapse( false ) ;
range.Select() ;
if ( ! _Find() ) if ( ! _Find() )
{
ClearHighlight() ;
alert( FCKLang.DlgFindNotFoundMsg ) ; alert( FCKLang.DlgFindNotFoundMsg ) ;
}
} }
function Replace() function Replace()
{ {
var selection = new oEditor.FCKDomRange( oEditor.FCK.EditorWindow ) ; if ( GlobalRange.CheckIsCollapsed() )
selection.MoveToSelection() ;
if ( selection.CheckIsCollapsed() )
{ {
if (! _Find() ) if (! _Find() )
{
ClearHighlight() ;
alert( FCKLang.DlgFindNotFoundMsg ) ; alert( FCKLang.DlgFindNotFoundMsg ) ;
}
} }
else else
{ {
oEditor.FCKUndo.SaveUndoStep() ; oEditor.FCKUndo.SaveUndoStep() ;
selection.DeleteContents() ; GlobalRange.DeleteContents() ;
selection.InsertNode( oEditor.FCK.EditorDocument.createTextNode( GetReplaceString() ) ) ; GlobalRange.InsertNode( oEditor.FCK.EditorDocument.createTextNode( GetReplaceString() ) ) ;
selection.Collapse( false ) ; GlobalRange.Collapse( false ) ;
selection.Select() ;
} }
} }
function ReplaceAll() function ReplaceAll()
{ {
oEditor.FCKUndo.SaveUndoStep() ; oEditor.FCKUndo.SaveUndoStep() ;
var range = new oEditor.FCKDomRange( oEditor.FCK.EditorWindow ) ;
var replaceCount = 0 ; var replaceCount = 0 ;
while ( _Find() ) while ( _Find() )
{ {
range.MoveToSelection() ; dialog.Selection.EnsureSelection() ;
range.DeleteContents() ; GlobalRange.DeleteContents() ;
range.InsertNode( oEditor.FCK.EditorDocument.createTextNode( GetReplaceString() ) ) ; GlobalRange.InsertNode( oEditor.FCK.EditorDocument.createTextNode( GetReplaceString() ) ) ;
range.Collapse( false ) ; GlobalRange.Collapse( false ) ;
range.Select() ;
replaceCount++ ; replaceCount++ ;
} }
if ( replaceCount == 0 ) if ( replaceCount == 0 )
{
ClearHighlight() ;
alert( FCKLang.DlgFindNotFoundMsg ) ; alert( FCKLang.DlgFindNotFoundMsg ) ;
window.parent.Cancel() ; }
dialog.Cancel() ;
} }
window.onunload = function(){ ClearHighlight() ; }
</script> </script>
</head> </head>
<body onload="OnLoad()" style="overflow: hidden"> <body onload="OnLoad()" style="overflow: hidden">
@@ -389,7 +467,7 @@ function ReplaceAll()
Find what:</label> Find what:</label>
</td> </td>
<td width="100%"> <td width="100%">
<input id="txtFindFind" onkeyup="btnStat(this.form)" style="width: 100%" tabindex="1" <input id="txtFindFind" onkeyup="btnStat()" oninput="btnStat()" onpaste="btnStatDelayed()" style="width: 100%" tabindex="1"
type="text" /> type="text" />
</td> </td>
<td> <td>
@@ -416,7 +494,7 @@ function ReplaceAll()
Find what:</label> Find what:</label>
</td> </td>
<td width="100%"> <td width="100%">
<input id="txtFindReplace" onkeyup="btnStat(this.form)" style="width: 100%" tabindex="1" <input id="txtFindReplace" onkeyup="btnStat()" oninput="btnStat()" onpaste="btnStatDelayed()" style="width: 100%" tabindex="1"
type="text" /> type="text" />
</td> </td>
<td> <td>

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<!-- <!--
* FCKeditor - The text editor for Internet - http://www.fckeditor.net * FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben * Copyright (C) 2003-2008 Frederico Caldeira Knabben
* *
* == BEGIN LICENSE == * == BEGIN LICENSE ==
* *
@@ -30,12 +30,13 @@
<script type="text/javascript" src="fck_select/fck_select.js"></script> <script type="text/javascript" src="fck_select/fck_select.js"></script>
<script type="text/javascript"> <script type="text/javascript">
var oEditor = window.parent.InnerDialogLoaded() ; var dialog = window.parent ;
var oEditor = dialog.InnerDialogLoaded() ;
// Gets the document DOM // Gets the document DOM
var oDOM = oEditor.FCK.EditorDocument ; var oDOM = oEditor.FCK.EditorDocument ;
var oActiveEl = oEditor.FCKSelection.GetSelectedElement() ; var oActiveEl = dialog.Selection.GetSelectedElement() ;
var oListText ; var oListText ;
var oListValue ; var oListValue ;
@@ -48,6 +49,10 @@ window.onload = function()
oListText = document.getElementById( 'cmbText' ) ; oListText = document.getElementById( 'cmbText' ) ;
oListValue = document.getElementById( 'cmbValue' ) ; oListValue = document.getElementById( 'cmbValue' ) ;
// Fix the lists widths. (Bug #970)
oListText.style.width = oListText.offsetWidth ;
oListValue.style.width = oListValue.offsetWidth ;
if ( oActiveEl && oActiveEl.tagName == 'SELECT' ) if ( oActiveEl && oActiveEl.tagName == 'SELECT' )
{ {
GetE('txtName').value = oActiveEl.name ; GetE('txtName').value = oActiveEl.name ;
@@ -68,23 +73,21 @@ window.onload = function()
else else
oActiveEl = null ; oActiveEl = null ;
window.parent.SetOkButton( true ) ; dialog.SetOkButton( true ) ;
dialog.SetAutoSize( true ) ;
SelectField( 'txtName' ) ;
} }
function Ok() function Ok()
{ {
oEditor.FCKUndo.SaveUndoStep() ; oEditor.FCKUndo.SaveUndoStep() ;
var sSize = GetE('txtLines').value ; var sSize = GetE('txtLines').value ;
if ( sSize == null || isNaN( sSize ) || sSize <= 1 ) if ( sSize == null || isNaN( sSize ) || sSize <= 1 )
sSize = '' ; sSize = '' ;
if ( !oActiveEl ) oActiveEl = CreateNamedElement( oEditor, oActiveEl, 'SELECT', {name: GetE('txtName').value} ) ;
{
oActiveEl = oEditor.FCK.InsertElement( 'select' ) ;
}
SetAttribute( oActiveEl, 'name' , GetE('txtName').value ) ;
SetAttribute( oActiveEl, 'size' , sSize ) ; SetAttribute( oActiveEl, 'size' , sSize ) ;
oActiveEl.multiple = ( sSize.length > 0 && GetE('chkMultiple').checked ) ; oActiveEl.multiple = ( sSize.length > 0 && GetE('chkMultiple').checked ) ;
@@ -113,7 +116,7 @@ function Ok()
</script> </script>
</head> </head>
<body style='OVERFLOW: hidden' scroll='no'> <body style="overflow: hidden">
<table width="100%" height="100%"> <table width="100%" height="100%">
<tr> <tr>
<td> <td>

View File

@@ -1,6 +1,6 @@
/* /*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net * FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben * Copyright (C) 2003-2008 Frederico Caldeira Knabben
* *
* == BEGIN LICENSE == * == BEGIN LICENSE ==
* *
@@ -191,4 +191,4 @@ function HTMLDecode( text )
text = text.replace( /&amp;/g, '&' ) ; text = text.replace( /&amp;/g, '&' ) ;
return text ; return text ;
} }

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<!-- <!--
* FCKeditor - The text editor for Internet - http://www.fckeditor.net * FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben * Copyright (C) 2003-2008 Frederico Caldeira Knabben
* *
* == BEGIN LICENSE == * == BEGIN LICENSE ==
* *
@@ -33,19 +33,24 @@
cursor: hand; cursor: hand;
} }
</style> </style>
<script src="common/fck_dialog_common.js" type="text/javascript"></script>
<script type="text/javascript"> <script type="text/javascript">
var oEditor = window.parent.InnerDialogLoaded() ; var dialog = window.parent ;
var oEditor = dialog.InnerDialogLoaded() ;
window.onload = function () window.onload = function ()
{ {
// First of all, translate the dialog box texts // First of all, translate the dialog box texts
oEditor.FCKLanguageManager.TranslatePage(document) ; oEditor.FCKLanguageManager.TranslatePage(document) ;
dialog.SetAutoSize( true ) ;
} }
function InsertSmiley( url ) function InsertSmiley( url )
{ {
oEditor.FCKUndo.SaveUndoStep() ; oEditor.FCKUndo.SaveUndoStep() ;
var oImg = oEditor.FCK.InsertElement( 'img' ) ; var oImg = oEditor.FCK.InsertElement( 'img' ) ;
oImg.src = url ; oImg.src = url ;
oImg.setAttribute( '_fcksavedurl', url ) ; oImg.setAttribute( '_fcksavedurl', url ) ;
@@ -55,7 +60,7 @@ function InsertSmiley( url )
// everything before closing. // everything before closing.
document.body.innerHTML = '' ; document.body.innerHTML = '' ;
window.parent.Cancel() ; dialog.Cancel() ;
} }
function over(td) function over(td)
@@ -69,7 +74,7 @@ function out(td)
} }
</script> </script>
</head> </head>
<body scroll="no"> <body style="overflow: hidden">
<table cellpadding="2" cellspacing="2" align="center" border="0" width="100%" height="100%"> <table cellpadding="2" cellspacing="2" align="center" border="0" width="100%" height="100%">
<script type="text/javascript"> <script type="text/javascript">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<!-- <!--
* FCKeditor - The text editor for Internet - http://www.fckeditor.net * FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben * Copyright (C) 2003-2008 Frederico Caldeira Knabben
* *
* == BEGIN LICENSE == * == BEGIN LICENSE ==
* *
@@ -26,12 +26,15 @@
<title>Source</title> <title>Source</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="robots" content="noindex, nofollow"> <meta name="robots" content="noindex, nofollow">
<link href="common/fck_dialog_common.css" rel="stylesheet" type="text/css" /> <script src="common/fck_dialog_common.js" type="text/javascript"></script>
<script language="javascript"> <script language="javascript">
var oEditor = window.parent.InnerDialogLoaded() ; var oEditor = window.parent.InnerDialogLoaded() ;
var FCK = oEditor.FCK ; var FCK = oEditor.FCK ;
var FCKConfig = oEditor.FCKConfig ; var FCKConfig = oEditor.FCKConfig ;
var FCKTools = oEditor.FCKTools ;
document.write( FCKTools.GetStyleHtml( GetCommonDialogCss() ) ) ;
window.onload = function() window.onload = function()
{ {

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<!-- <!--
* FCKeditor - The text editor for Internet - http://www.fckeditor.net * FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben * Copyright (C) 2003-2008 Frederico Caldeira Knabben
* *
* == BEGIN LICENSE == * == BEGIN LICENSE ==
* *
@@ -33,6 +33,7 @@
} }
.Sample { font-size: 24px; } .Sample { font-size: 24px; }
</style> </style>
<script src="common/fck_dialog_common.js" type="text/javascript"></script>
<script type="text/javascript"> <script type="text/javascript">
var oEditor = window.parent.InnerDialogLoaded() ; var oEditor = window.parent.InnerDialogLoaded() ;
@@ -69,17 +70,19 @@ function setDefaults()
// First of all, translates the dialog box texts. // First of all, translates the dialog box texts.
oEditor.FCKLanguageManager.TranslatePage(document) ; oEditor.FCKLanguageManager.TranslatePage(document) ;
window.parent.SetAutoSize( true ) ;
} }
</script> </script>
</HEAD> </head>
<BODY onload="setDefaults()" scroll="no"> <body onload="setDefaults()" style="overflow: hidden">
<table cellpadding="0" cellspacing="0" width="100%" height="100%"> <table cellpadding="0" cellspacing="0" width="100%" height="100%">
<tr> <tr>
<td width="100%"> <td width="100%">
<table cellpadding="1" cellspacing="1" align="center" border="0" width="100%" height="100%"> <table cellpadding="1" cellspacing="1" align="center" border="0" width="100%" height="100%">
<script type="text/javascript"> <script type="text/javascript">
var aChars = ["!","&quot;","#","$","%","&amp;","\\'","(",")","*","+","-",".","/","0","1","2","3","4","5","6","7","8","9",":",";","&lt;","=","&gt;","?","@","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","[","]","^","_","`","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","{","|","}","~","&euro;","&lsquo;","&rsquo;","&rsquo;","&ldquo;","&rdquo;","&ndash;","&mdash;","&iexcl;","&cent;","&pound;","&curren;","&yen;","&brvbar;","&sect;","&uml;","&copy;","&ordf;","&laquo;","&not;","&reg;","&macr;","&deg;","&plusmn;","&sup2;","&sup3;","&acute;","&micro;","&para;","&middot;","&cedil;","&sup1;","&ordm;","&raquo;","&frac14;","&frac12;","&frac34;","&iquest;","&Agrave;","&Aacute;","&Acirc;","&Atilde;","&Auml;","&Aring;","&AElig;","&Ccedil;","&Egrave;","&Eacute;","&Ecirc;","&Euml;","&Igrave;","&Iacute;","&Icirc;","&Iuml;","&ETH;","&Ntilde;","&Ograve;","&Oacute;","&Ocirc;","&Otilde;","&Ouml;","&times;","&Oslash;","&Ugrave;","&Uacute;","&Ucirc;","&Uuml;","&Yacute;","&THORN;","&szlig;","&agrave;","&aacute;","&acirc;","&atilde;","&auml;","&aring;","&aelig;","&ccedil;","&egrave;","&eacute;","&ecirc;","&euml;","&igrave;","&iacute;","&icirc;","&iuml;","&eth;","&ntilde;","&ograve;","&oacute;","&ocirc;","&otilde;","&ouml;","&divide;","&oslash;","&ugrave;","&uacute;","&ucirc;","&uuml;","&uuml;","&yacute;","&thorn;","&yuml;","&OElig;","&oelig;","&sbquo;","&#8219;","&bdquo;","&hellip;","&trade;","&#9658;","&bull;","&rarr;","&rArr;","&hArr;","&diams;","&asymp;"] ; var aChars = ["!","&quot;","#","$","%","&amp;","\\'","(",")","*","+","-",".","/","0","1","2","3","4","5","6","7","8","9",":",";","&lt;","=","&gt;","?","@","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","[","]","^","_","`","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","{","|","}","~","&euro;","&lsquo;","&rsquo;","&rsquo;","&ldquo;","&rdquo;","&ndash;","&mdash;","&iexcl;","&cent;","&pound;","&curren;","&yen;","&brvbar;","&sect;","&uml;","&copy;","&ordf;","&laquo;","&not;","&reg;","&macr;","&deg;","&plusmn;","&sup2;","&sup3;","&acute;","&micro;","&para;","&middot;","&cedil;","&sup1;","&ordm;","&raquo;","&frac14;","&frac12;","&frac34;","&iquest;","&Agrave;","&Aacute;","&Acirc;","&Atilde;","&Auml;","&Aring;","&AElig;","&Ccedil;","&Egrave;","&Eacute;","&Ecirc;","&Euml;","&Igrave;","&Iacute;","&Icirc;","&Iuml;","&ETH;","&Ntilde;","&Ograve;","&Oacute;","&Ocirc;","&Otilde;","&Ouml;","&times;","&Oslash;","&Ugrave;","&Uacute;","&Ucirc;","&Uuml;","&Yacute;","&THORN;","&szlig;","&agrave;","&aacute;","&acirc;","&atilde;","&auml;","&aring;","&aelig;","&ccedil;","&egrave;","&eacute;","&ecirc;","&euml;","&igrave;","&iacute;","&icirc;","&iuml;","&eth;","&ntilde;","&ograve;","&oacute;","&ocirc;","&otilde;","&ouml;","&divide;","&oslash;","&ugrave;","&uacute;","&ucirc;","&uuml;","&uuml;","&yacute;","&thorn;","&yuml;","&OElig;","&oelig;","&#372;","&#374","&#373","&#375;","&sbquo;","&#8219;","&bdquo;","&hellip;","&trade;","&#9658;","&bull;","&rarr;","&rArr;","&hArr;","&diams;","&asymp;"] ;
var cols = 20 ; var cols = 20 ;
@@ -114,5 +117,5 @@ while (i < aChars.length)
</td> </td>
</tr> </tr>
</table> </table>
</BODY> </body>
</HTML> </html>

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<!-- <!--
* FCKeditor - The text editor for Internet - http://www.fckeditor.net * FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben * Copyright (C) 2003-2008 Frederico Caldeira Knabben
* *
* == BEGIN LICENSE == * == BEGIN LICENSE ==
* *
@@ -26,6 +26,7 @@
<title>Spell Check</title> <title>Spell Check</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta content="noindex, nofollow" name="robots"> <meta content="noindex, nofollow" name="robots">
<script src="common/fck_dialog_common.js" type="text/javascript"></script>
<script src="fck_spellerpages/spellerpages/spellChecker.js"></script> <script src="fck_spellerpages/spellerpages/spellChecker.js"></script>
<script type="text/javascript"> <script type="text/javascript">

View File

@@ -37,7 +37,9 @@ others files in certain cases.
<cfset text = text & "%" & CRLF <cfset text = text & "%" & CRLF
& "^A" & CRLF & "^A" & CRLF
& "!" & CRLF> & "!" & CRLF>
<cfloop list="#URLDecode(field)#" index="line" delimiters="#CRLF#"> <!--- Strip all tags for the text. (by FredCK - #339 / #681) --->
<cfset field = REReplace(URLDecode(field), "<[^>]+>", " ", "all")>
<cfloop list="#field#" index="line" delimiters="#CRLF#">
<cfset text = ListAppend(text, "^" & Trim(JSStringFormat(line)), CRLF)> <cfset text = ListAppend(text, "^" & Trim(JSStringFormat(line)), CRLF)>
</cfloop> </cfloop>
</cfloop> </cfloop>

View File

@@ -62,7 +62,7 @@ function escape_quote( $str ) {
# handle a server-side error. # handle a server-side error.
function error_handler( $err ) { function error_handler( $err ) {
echo "error = '" . escape_quote( $err ) . "';\n"; echo "error = '" . preg_replace( "/['\\\\]/", "\\\\$0", $err ) . "';\n";
} }
## get the list of misspelled words. Put the results in the javascript words array ## get the list of misspelled words. Put the results in the javascript words array
@@ -82,6 +82,10 @@ function print_checker_results() {
if( $fh = fopen( $tempfile, 'w' )) { if( $fh = fopen( $tempfile, 'w' )) {
for( $i = 0; $i < count( $textinputs ); $i++ ) { for( $i = 0; $i < count( $textinputs ); $i++ ) {
$text = urldecode( $textinputs[$i] ); $text = urldecode( $textinputs[$i] );
// Strip all tags for the text. (by FredCK - #339 / #681)
$text = preg_replace( "/<[^>]+>/", " ", $text ) ;
$lines = explode( "\n", $text ); $lines = explode( "\n", $text );
fwrite ( $fh, "%\n" ); # exit terse mode fwrite ( $fh, "%\n" ); # exit terse mode
fwrite ( $fh, "^$input_separator\n" ); fwrite ( $fh, "^$input_separator\n" );
@@ -193,4 +197,3 @@ wordWindowObj.writeBody();
</body> </body>
</html> </html>

View File

@@ -58,6 +58,8 @@ sub printCheckerResults {
# open temp file, add the submitted text. # open temp file, add the submitted text.
for( my $i = 0; $i <= $#textinputs; $i++ ) { for( my $i = 0; $i <= $#textinputs; $i++ ) {
$text = url_decode( $textinputs[$i] ); $text = url_decode( $textinputs[$i] );
# Strip all tags for the text. (by FredCK - #339 / #681)
$text =~ s/<[^>]+>/ /g;
@lines = split( /\n/, $text ); @lines = split( /\n/, $text );
print $fh "\%\n"; # exit terse mode print $fh "\%\n"; # exit terse mode
print $fh "^$input_separator\n"; print $fh "^$input_separator\n";
@@ -177,4 +179,3 @@ wordWindowObj.writeBody();
</body> </body>
</html> </html>
EOF EOF

View File

@@ -459,4 +459,3 @@ function _getFormInputs( inputPattern ) {
} }
return inputs; return inputs;
} }

View File

@@ -46,4 +46,4 @@
width:200px; width:200px;
margin-top:2; margin-top:2;
font-size:8pt; font-size:8pt;
} }

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<!-- <!--
* FCKeditor - The text editor for Internet - http://www.fckeditor.net * FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben * Copyright (C) 2003-2008 Frederico Caldeira Knabben
* *
* == BEGIN LICENSE == * == BEGIN LICENSE ==
* *
@@ -29,14 +29,16 @@
<script src="common/fck_dialog_common.js" type="text/javascript"></script> <script src="common/fck_dialog_common.js" type="text/javascript"></script>
<script type="text/javascript"> <script type="text/javascript">
var oEditor = window.parent.InnerDialogLoaded() ; var dialog = window.parent ;
var oEditor = dialog.InnerDialogLoaded() ;
var dialogArguments = dialog.Args() ;
// Gets the document DOM // Gets the document DOM
var oDOM = oEditor.FCK.EditorDocument ; var oDOM = oEditor.FCK.EditorDocument ;
// Gets the table if there is one selected. // Gets the table if there is one selected.
var table ; var table ;
var e = oEditor.FCKSelection.GetSelectedElement() ; var e = dialog.Selection.GetSelectedElement() ;
if ( ( !e && document.location.search.substr(1) == 'Parent' ) || ( e && e.tagName != 'TABLE' ) ) if ( ( !e && document.location.search.substr(1) == 'Parent' ) || ( e && e.tagName != 'TABLE' ) )
e = oEditor.FCKSelection.MoveToAncestorNode( 'TABLE' ) ; e = oEditor.FCKSelection.MoveToAncestorNode( 'TABLE' ) ;
@@ -88,10 +90,13 @@ window.onload = function()
document.getElementById('txtRows').disabled = true ; document.getElementById('txtRows').disabled = true ;
document.getElementById('txtColumns').disabled = true ; document.getElementById('txtColumns').disabled = true ;
SelectField( 'txtWidth' ) ;
} }
else
SelectField( 'txtRows' ) ;
window.parent.SetOkButton( true ) ; dialog.SetOkButton( true ) ;
window.parent.SetAutoSize( true ) ; dialog.SetAutoSize( true ) ;
} }
// Fired when the user press the OK button // Fired when the user press the OK button

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<!-- <!--
* FCKeditor - The text editor for Internet - http://www.fckeditor.net * FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben * Copyright (C) 2003-2008 Frederico Caldeira Knabben
* *
* == BEGIN LICENSE == * == BEGIN LICENSE ==
* *
@@ -29,7 +29,8 @@
<script src="common/fck_dialog_common.js" type="text/javascript"></script> <script src="common/fck_dialog_common.js" type="text/javascript"></script>
<script type="text/javascript"> <script type="text/javascript">
var oEditor = window.parent.InnerDialogLoaded() ; var dialog = window.parent ;
var oEditor = dialog.InnerDialogLoaded() ;
// Gets the document DOM // Gets the document DOM
var oDOM = oEditor.FCK.EditorDocument ; var oDOM = oEditor.FCK.EditorDocument ;
@@ -44,8 +45,9 @@ window.onload = function()
SetStartupValue() ; SetStartupValue() ;
window.parent.SetOkButton( true ) ; dialog.SetOkButton( true ) ;
window.parent.SetAutoSize( true ) ; dialog.SetAutoSize( true ) ;
SelectField( 'txtWidth' ) ;
} }
function SetStartupValue() function SetStartupValue()
@@ -87,7 +89,7 @@ function Ok()
aCells[i].removeAttribute( 'width', 0 ) ; aCells[i].removeAttribute( 'width', 0 ) ;
if ( GetE('selWordWrap').value == 'false' ) if ( GetE('selWordWrap').value == 'false' )
SetAttribute( aCells[i], 'noWrap', 'nowrap' ) ; SetAttribute( aCells[i], 'noWrap', 'nowrap' ) ;
else else
aCells[i].removeAttribute( 'noWrap' ) ; aCells[i].removeAttribute( 'noWrap' ) ;
@@ -118,7 +120,7 @@ function SelectBorderColor( color )
function SelectColor( wich ) function SelectColor( wich )
{ {
oEditor.FCKDialog.OpenDialog( 'FCKDialog_Color', oEditor.FCKLang.DlgColorTitle, 'dialog/fck_colorselector.html', 400, 330, wich == 'Back' ? SelectBackColor : SelectBorderColor, window ) ; oEditor.FCKDialog.OpenDialog( 'FCKDialog_Color', oEditor.FCKLang.DlgColorTitle, 'dialog/fck_colorselector.html', 410, 320, wich == 'Back' ? SelectBackColor : SelectBorderColor, window ) ;
} }
</script> </script>

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- <!--
* FCKeditor - The text editor for Internet - http://www.fckeditor.net * FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben * Copyright (C) 2003-2008 Frederico Caldeira Knabben
* *
* == BEGIN LICENSE == * == BEGIN LICENSE ==
* *

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<!-- <!--
* FCKeditor - The text editor for Internet - http://www.fckeditor.net * FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben * Copyright (C) 2003-2008 Frederico Caldeira Knabben
* *
* == BEGIN LICENSE == * == BEGIN LICENSE ==
* *
@@ -29,12 +29,13 @@
<script src="common/fck_dialog_common.js" type="text/javascript"></script> <script src="common/fck_dialog_common.js" type="text/javascript"></script>
<script type="text/javascript"> <script type="text/javascript">
var oEditor = window.parent.InnerDialogLoaded() ; var dialog = window.parent ;
var oEditor = dialog.InnerDialogLoaded() ;
// Gets the document DOM // Gets the document DOM
var oDOM = oEditor.FCK.EditorDocument ; var oDOM = oEditor.FCK.EditorDocument ;
var oActiveEl = oEditor.FCKSelection.GetSelectedElement() ; var oActiveEl = dialog.Selection.GetSelectedElement() ;
window.onload = function() window.onload = function()
{ {
@@ -50,19 +51,17 @@ window.onload = function()
else else
oActiveEl = null ; oActiveEl = null ;
window.parent.SetOkButton( true ) ; dialog.SetOkButton( true ) ;
dialog.SetAutoSize( true ) ;
SelectField( 'txtName' ) ;
} }
function Ok() function Ok()
{ {
oEditor.FCKUndo.SaveUndoStep() ; oEditor.FCKUndo.SaveUndoStep() ;
if ( !oActiveEl )
{
oActiveEl = oEditor.FCK.InsertElement( 'textarea' ) ;
}
oActiveEl.name = GetE('txtName').value ; oActiveEl = CreateNamedElement( oEditor, oActiveEl, 'TEXTAREA', {name: GetE('txtName').value} ) ;
SetAttribute( oActiveEl, 'cols', GetE('txtCols').value ) ; SetAttribute( oActiveEl, 'cols', GetE('txtCols').value ) ;
SetAttribute( oActiveEl, 'rows', GetE('txtRows').value ) ; SetAttribute( oActiveEl, 'rows', GetE('txtRows').value ) ;
@@ -71,7 +70,7 @@ function Ok()
</script> </script>
</head> </head>
<body style='OVERFLOW: hidden' scroll='no'> <body style="overflow: hidden">
<table height="100%" width="100%"> <table height="100%" width="100%">
<tr> <tr>
<td align="center"> <td align="center">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<!-- <!--
* FCKeditor - The text editor for Internet - http://www.fckeditor.net * FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben * Copyright (C) 2003-2008 Frederico Caldeira Knabben
* *
* == BEGIN LICENSE == * == BEGIN LICENSE ==
* *
@@ -29,12 +29,13 @@
<script src="common/fck_dialog_common.js" type="text/javascript"></script> <script src="common/fck_dialog_common.js" type="text/javascript"></script>
<script type="text/javascript"> <script type="text/javascript">
var oEditor = window.parent.InnerDialogLoaded() ; var dialog = window.parent ;
var oEditor = dialog.InnerDialogLoaded() ;
// Gets the document DOM // Gets the document DOM
var oDOM = oEditor.FCK.EditorDocument ; var oDOM = oEditor.FCK.EditorDocument ;
var oActiveEl = oEditor.FCKSelection.GetSelectedElement() ; var oActiveEl = dialog.Selection.GetSelectedElement() ;
window.onload = function() window.onload = function()
{ {
@@ -48,13 +49,13 @@ window.onload = function()
GetE('txtSize').value = GetAttribute( oActiveEl, 'size' ) ; GetE('txtSize').value = GetAttribute( oActiveEl, 'size' ) ;
GetE('txtMax').value = GetAttribute( oActiveEl, 'maxLength' ) ; GetE('txtMax').value = GetAttribute( oActiveEl, 'maxLength' ) ;
GetE('txtType').value = oActiveEl.type ; GetE('txtType').value = oActiveEl.type ;
GetE('txtType').disabled = true ;
} }
else else
oActiveEl = null ; oActiveEl = null ;
window.parent.SetOkButton( true ) ; dialog.SetOkButton( true ) ;
dialog.SetAutoSize( true ) ;
SelectField( 'txtName' ) ;
} }
function Ok() function Ok()
@@ -72,15 +73,10 @@ function Ok()
return false ; return false ;
} }
if ( !oActiveEl ) oEditor.FCKUndo.SaveUndoStep() ;
{
oActiveEl = oEditor.FCK.EditorDocument.createElement( 'INPUT' ) ; oActiveEl = CreateNamedElement( oEditor, oActiveEl, 'INPUT', {name: GetE('txtName').value, type: GetE('txtType').value } ) ;
oActiveEl.type = GetE('txtType').value ;
oEditor.FCKUndo.SaveUndoStep() ;
oActiveEl = oEditor.FCK.InsertElement( oActiveEl ) ;
}
oActiveEl.name = GetE('txtName').value ;
SetAttribute( oActiveEl, 'value' , GetE('txtValue').value ) ; SetAttribute( oActiveEl, 'value' , GetE('txtValue').value ) ;
SetAttribute( oActiveEl, 'size' , GetE('txtSize').value ) ; SetAttribute( oActiveEl, 'size' , GetE('txtSize').value ) ;
SetAttribute( oActiveEl, 'maxlength', GetE('txtMax').value ) ; SetAttribute( oActiveEl, 'maxlength', GetE('txtMax').value ) ;

View File

@@ -17,8 +17,6 @@
<table border="1"> <table border="1">
<script type="text/javascript"> <script type="text/javascript">
alert(FCK.DTD);
for ( var p in FCK.DTD ) for ( var p in FCK.DTD )
{ {
document.write( '<tr><td><b>' + p + '</b></td><td>' ) ; document.write( '<tr><td><b>' + p + '</b></td><td>' ) ;

View File

@@ -1,6 +1,6 @@
/* /*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net * FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben * Copyright (C) 2003-2008 Frederico Caldeira Knabben
* *
* == BEGIN LICENSE == * == BEGIN LICENSE ==
* *
@@ -23,7 +23,7 @@
*/ */
FCK.DTD = (function() FCK.DTD = (function()
{ {
X = FCKTools.Merge ; var X = FCKTools.Merge ;
var H,I,J,K,C,L,M,A,B,D,E,G,N,F ; var H,I,J,K,C,L,M,A,B,D,E,G,N,F ;
A = {ins:1, del:1, script:1} ; A = {ins:1, del:1, script:1} ;

View File

@@ -1,6 +1,6 @@
/* /*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net * FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben * Copyright (C) 2003-2008 Frederico Caldeira Knabben
* *
* == BEGIN LICENSE == * == BEGIN LICENSE ==
* *
@@ -23,7 +23,7 @@
*/ */
FCK.DTD = (function() FCK.DTD = (function()
{ {
X = FCKTools.Merge ; var X = FCKTools.Merge ;
var A,L,J,M,N,O,D,H,P,K,Q,F,G,C,B,E,I ; var A,L,J,M,N,O,D,H,P,K,Q,F,G,C,B,E,I ;
A = {isindex:1, fieldset:1} ; A = {isindex:1, fieldset:1} ;
@@ -137,4 +137,4 @@ FCK.DTD = (function()
changed the map to avoid breaking the links on pieces, having changed the map to avoid breaking the links on pieces, having
"<b>this is a </b><a><b>link</b> test</a>", instead of "<b>this is a </b><a><b>link</b> test</a>", instead of
"<b>this is a <a>link</a></b><a> test</a>". "<b>this is a <a>link</a></b><a> test</a>".
*/ */

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- <!--
* FCKeditor - The text editor for Internet - http://www.fckeditor.net * FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben * Copyright (C) 2003-2008 Frederico Caldeira Knabben
* *
* == BEGIN LICENSE == * == BEGIN LICENSE ==
* *

File diff suppressed because it is too large Load Diff

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- <!--
* FCKeditor - The text editor for Internet - http://www.fckeditor.net * FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben * Copyright (C) 2003-2008 Frederico Caldeira Knabben
* *
* == BEGIN LICENSE == * == BEGIN LICENSE ==
* *
@@ -26,9 +26,49 @@
<title>FCKeditor</title> <title>FCKeditor</title>
<meta name="robots" content="noindex, nofollow"> <meta name="robots" content="noindex, nofollow">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Cache-Control" content="public" /> <meta http-equiv="Cache-Control" content="public">
<script type="text/javascript"> <script type="text/javascript">
// Save a reference to the default domain.
var FCK_ORIGINAL_DOMAIN ;
// Automatically detect the correct document.domain (#123).
(function()
{
var d = FCK_ORIGINAL_DOMAIN = document.domain ;
while ( true )
{
// Test if we can access a parent property.
try
{
var test = window.parent.document.domain ;
break ;
}
catch( e ) {}
// Remove a domain part: www.mytest.example.com => mytest.example.com => example.com ...
d = d.replace( /.*?(?:\.|$)/, '' ) ;
if ( d.length == 0 )
break ; // It was not able to detect the domain.
try
{
document.domain = d ;
}
catch (e)
{
break ;
}
}
})() ;
// Save a reference to the detected runtime domain.
var FCK_RUNTIME_DOMAIN = document.domain ;
var FCK_IS_CUSTOM_DOMAIN = ( FCK_ORIGINAL_DOMAIN != FCK_RUNTIME_DOMAIN ) ;
// Instead of loading scripts and CSSs using inline tags, all scripts are // Instead of loading scripts and CSSs using inline tags, all scripts are
// loaded by code. In this way we can guarantee the correct processing order, // loaded by code. In this way we can guarantee the correct processing order,
// otherwise external scripts and inline scripts could be executed in an // otherwise external scripts and inline scripts could be executed in an
@@ -39,11 +79,6 @@ function LoadScript( url )
document.write( '<scr' + 'ipt type="text/javascript" src="' + url + '"><\/scr' + 'ipt>' ) ; document.write( '<scr' + 'ipt type="text/javascript" src="' + url + '"><\/scr' + 'ipt>' ) ;
} }
function LoadCss( url )
{
document.write( '<link href="' + url + '" type="text/css" rel="stylesheet" />' ) ;
}
// Main editor scripts. // Main editor scripts.
var sSuffix = ( /*@cc_on!@*/false ) ? 'ie' : 'gecko' ; var sSuffix = ( /*@cc_on!@*/false ) ? 'ie' : 'gecko' ;
@@ -55,6 +90,10 @@ LoadScript( '../fckconfig.js' ) ;
</script> </script>
<script type="text/javascript"> <script type="text/javascript">
// Adobe AIR compatibility file.
if ( FCKBrowserInfo.IsAIR )
LoadScript( 'js/fckadobeair.js' ) ;
if ( FCKBrowserInfo.IsIE ) if ( FCKBrowserInfo.IsIE )
{ {
// Remove IE mouse flickering. // Remove IE mouse flickering.
@@ -95,8 +134,17 @@ FCKConfig_LoadPageConfig() ;
FCKConfig_PreProcess() ; FCKConfig_PreProcess() ;
// CSS minified by http://iceyboard.no-ip.org/projects/css_compressor
var FCK_InternalCSS = FCKTools.FixCssUrls( FCKConfig.FullBasePath + 'css/', 'html{min-height:100%}table.FCK__ShowTableBorders,table.FCK__ShowTableBorders td,table.FCK__ShowTableBorders th{border:#d3d3d3 1px solid}form{border:1px dotted #F00;padding:2px}.FCK__Flash{border:#a9a9a9 1px solid;background-position:center center;background-image:url(images/fck_flashlogo.gif);background-repeat:no-repeat;width:80px;height:80px}.FCK__Anchor{border:1px dotted #00F;background-position:center center;background-image:url(images/fck_anchor.gif);background-repeat:no-repeat;width:16px;height:15px;vertical-align:middle}.FCK__AnchorC{border:1px dotted #00F;background-position:1px center;background-image:url(images/fck_anchor.gif);background-repeat:no-repeat;padding-left:18px}a[name]{border:1px dotted #00F;background-position:0 center;background-image:url(images/fck_anchor.gif);background-repeat:no-repeat;padding-left:18px}.FCK__PageBreak{background-position:center center;background-image:url(images/fck_pagebreak.gif);background-repeat:no-repeat;clear:both;display:block;float:none;width:100%;border-top:#999 1px dotted;border-bottom:#999 1px dotted;border-right:0;border-left:0;height:5px}.FCK__InputHidden{width:19px;height:18px;background-image:url(images/fck_hiddenfield.gif);background-repeat:no-repeat;vertical-align:text-bottom;background-position:center center}.FCK__ShowBlocks p,.FCK__ShowBlocks div,.FCK__ShowBlocks pre,.FCK__ShowBlocks address,.FCK__ShowBlocks blockquote,.FCK__ShowBlocks h1,.FCK__ShowBlocks h2,.FCK__ShowBlocks h3,.FCK__ShowBlocks h4,.FCK__ShowBlocks h5,.FCK__ShowBlocks h6{background-repeat:no-repeat;border:1px dotted gray;padding-top:8px;padding-left:8px}.FCK__ShowBlocks p{background-image:url(images/block_p.png)}.FCK__ShowBlocks div{background-image:url(images/block_div.png)}.FCK__ShowBlocks pre{background-image:url(images/block_pre.png)}.FCK__ShowBlocks address{background-image:url(images/block_address.png)}.FCK__ShowBlocks blockquote{background-image:url(images/block_blockquote.png)}.FCK__ShowBlocks h1{background-image:url(images/block_h1.png)}.FCK__ShowBlocks h2{background-image:url(images/block_h2.png)}.FCK__ShowBlocks h3{background-image:url(images/block_h3.png)}.FCK__ShowBlocks h4{background-image:url(images/block_h4.png)}.FCK__ShowBlocks h5{background-image:url(images/block_h5.png)}.FCK__ShowBlocks h6{background-image:url(images/block_h6.png)}' ) ;
var FCK_ShowTableBordersCSS = FCKTools.FixCssUrls( FCKConfig.FullBasePath + 'css/', 'table:not([border]),table:not([border]) > tr > td,table:not([border]) > tr > th,table:not([border]) > tbody > tr > td,table:not([border]) > tbody > tr > th,table:not([border]) > thead > tr > td,table:not([border]) > thead > tr > th,table:not([border]) > tfoot > tr > td,table:not([border]) > tfoot > tr > th,table[border=\"0\"],table[border=\"0\"] > tr > td,table[border=\"0\"] > tr > th,table[border=\"0\"] > tbody > tr > td,table[border=\"0\"] > tbody > tr > th,table[border=\"0\"] > thead > tr > td,table[border=\"0\"] > thead > tr > th,table[border=\"0\"] > tfoot > tr > td,table[border=\"0\"] > tfoot > tr > th{border:#d3d3d3 1px dotted}' ) ;
// Popup the debug window if debug mode is set to true. It guarantees that the
// first debug message will not be lost.
if ( FCKConfig.Debug )
FCKDebug._GetWindow() ;
// Load the active skin CSS. // Load the active skin CSS.
LoadCss( FCKConfig.SkinPath + 'fck_editor.css' ) ; document.write( FCKTools.GetStyleHtml( FCKConfig.SkinEditorCSS ) ) ;
// Load the language file. // Load the language file.
FCKLanguageManager.Initialize() ; FCKLanguageManager.Initialize() ;
@@ -178,13 +226,16 @@ function WaitForActive( editorInstance, newStatus )
} }
} }
// Gecko browsers doens't calculate well that IFRAME size so we must // Gecko browsers doesn't calculate well the IFRAME size so we must
// recalculate it every time the window size changes. // recalculate it every time the window size changes.
if ( FCKBrowserInfo.IsGecko ) if ( FCKBrowserInfo.IsGecko && !FCKBrowserInfo.IsOpera )
{ {
function Window_OnResize() window.onresize = function( e )
{ {
if ( FCKBrowserInfo.IsOpera ) // Running in Chrome makes the window receive the event including subframes.
// we care only about this window. Ticket #1642.
// #2002: The originalTarget from the event can be the current document, the window, or the editing area.
if ( e && e.originalTarget !== document && e.originalTarget !== window && (!e.originalTarget.ownerDocument || e.originalTarget.ownerDocument != document ))
return ; return ;
var oCell = document.getElementById( 'xEditingArea' ) ; var oCell = document.getElementById( 'xEditingArea' ) ;
@@ -192,11 +243,10 @@ if ( FCKBrowserInfo.IsGecko )
var eInnerElement = oCell.firstChild ; var eInnerElement = oCell.firstChild ;
if ( eInnerElement ) if ( eInnerElement )
{ {
eInnerElement.style.height = 0 ; eInnerElement.style.height = '0px' ;
eInnerElement.style.height = oCell.scrollHeight - 2 ; eInnerElement.style.height = ( oCell.scrollHeight - 2 ) + 'px' ;
} }
} }
window.onresize = Window_OnResize ;
} }
</script> </script>

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- <!--
* FCKeditor - The text editor for Internet - http://www.fckeditor.net * FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben * Copyright (C) 2003-2008 Frederico Caldeira Knabben
* *
* == BEGIN LICENSE == * == BEGIN LICENSE ==
* *
@@ -27,10 +27,50 @@
<meta name="robots" content="noindex, nofollow"> <meta name="robots" content="noindex, nofollow">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<!-- @Packager.RemoveLine <!-- @Packager.RemoveLine
<meta http-equiv="Cache-Control" content="public" /> <meta http-equiv="Cache-Control" content="public">
@Packager.RemoveLine --> @Packager.RemoveLine -->
<script type="text/javascript"> <script type="text/javascript">
// Save a reference to the default domain.
var FCK_ORIGINAL_DOMAIN ;
// Automatically detect the correct document.domain (#123).
(function()
{
var d = FCK_ORIGINAL_DOMAIN = document.domain ;
while ( true )
{
// Test if we can access a parent property.
try
{
var test = window.parent.document.domain ;
break ;
}
catch( e ) {}
// Remove a domain part: www.mytest.example.com => mytest.example.com => example.com ...
d = d.replace( /.*?(?:\.|$)/, '' ) ;
if ( d.length == 0 )
break ; // It was not able to detect the domain.
try
{
document.domain = d ;
}
catch (e)
{
break ;
}
}
})() ;
// Save a reference to the detected runtime domain.
var FCK_RUNTIME_DOMAIN = document.domain ;
var FCK_IS_CUSTOM_DOMAIN = ( FCK_ORIGINAL_DOMAIN != FCK_RUNTIME_DOMAIN ) ;
// Instead of loading scripts and CSSs using inline tags, all scripts are // Instead of loading scripts and CSSs using inline tags, all scripts are
// loaded by code. In this way we can guarantee the correct processing order, // loaded by code. In this way we can guarantee the correct processing order,
// otherwise external scripts and inline scripts could be executed in an // otherwise external scripts and inline scripts could be executed in an
@@ -41,11 +81,6 @@ function LoadScript( url )
document.write( '<scr' + 'ipt type="text/javascript" src="' + url + '"><\/scr' + 'ipt>' ) ; document.write( '<scr' + 'ipt type="text/javascript" src="' + url + '"><\/scr' + 'ipt>' ) ;
} }
function LoadCss( url )
{
document.write( '<link href="' + url + '" type="text/css" rel="stylesheet" />' ) ;
}
// Main editor scripts. // Main editor scripts.
var sSuffix = ( /*@cc_on!@*/false ) ? 'ie' : 'gecko' ; var sSuffix = ( /*@cc_on!@*/false ) ? 'ie' : 'gecko' ;
@@ -141,12 +176,12 @@ LoadScript( '_source/classes/fcktoolbar.js' ) ;
LoadScript( '_source/classes/fcktoolbarbreak_' + sSuffix + '.js' ) ; LoadScript( '_source/classes/fcktoolbarbreak_' + sSuffix + '.js' ) ;
LoadScript( '_source/internals/fcktoolbarset.js' ) ; LoadScript( '_source/internals/fcktoolbarset.js' ) ;
LoadScript( '_source/internals/fckdialog.js' ) ; LoadScript( '_source/internals/fckdialog.js' ) ;
LoadScript( '_source/internals/fckdialog_' + sSuffix + '.js' ) ;
LoadScript( '_source/classes/fckmenuitem.js' ) ; LoadScript( '_source/classes/fckmenuitem.js' ) ;
LoadScript( '_source/classes/fckmenublock.js' ) ; LoadScript( '_source/classes/fckmenublock.js' ) ;
LoadScript( '_source/classes/fckmenublockpanel.js' ) ; LoadScript( '_source/classes/fckmenublockpanel.js' ) ;
LoadScript( '_source/classes/fckcontextmenu.js' ) ; LoadScript( '_source/classes/fckcontextmenu.js' ) ;
LoadScript( '_source/internals/fck_contextmenu.js' ) ; LoadScript( '_source/internals/fck_contextmenu.js' ) ;
LoadScript( '_source/classes/fckhtmliterator.js' ) ;
LoadScript( '_source/classes/fckplugin.js' ) ; LoadScript( '_source/classes/fckplugin.js' ) ;
LoadScript( '_source/internals/fckplugins.js' ) ; LoadScript( '_source/internals/fckplugins.js' ) ;
@@ -158,6 +193,10 @@ LoadScript( '../fckconfig.js' ) ;
</script> </script>
<script type="text/javascript"> <script type="text/javascript">
// Adobe AIR compatibility file.
if ( FCKBrowserInfo.IsAIR )
LoadScript( 'js/fckadobeair.js' ) ;
if ( FCKBrowserInfo.IsIE ) if ( FCKBrowserInfo.IsIE )
{ {
// Remove IE mouse flickering. // Remove IE mouse flickering.
@@ -198,8 +237,21 @@ FCKConfig_LoadPageConfig() ;
FCKConfig_PreProcess() ; FCKConfig_PreProcess() ;
var FCK_InternalCSS = FCKConfig.FullBasePath + 'css/fck_internal.css' ; // @Packager.RemoveLine
var FCK_ShowTableBordersCSS = FCKConfig.FullBasePath + 'css/fck_showtableborders_gecko.css' ; // @Packager.RemoveLine
/* @Packager.RemoveLine
// CSS minified by http://iceyboard.no-ip.org/projects/css_compressor
var FCK_InternalCSS = FCKTools.FixCssUrls( FCKConfig.FullBasePath + 'css/', 'html{min-height:100%}table.FCK__ShowTableBorders,table.FCK__ShowTableBorders td,table.FCK__ShowTableBorders th{border:#d3d3d3 1px solid}form{border:1px dotted #F00;padding:2px}.FCK__Flash{border:#a9a9a9 1px solid;background-position:center center;background-image:url(images/fck_flashlogo.gif);background-repeat:no-repeat;width:80px;height:80px}.FCK__Anchor{border:1px dotted #00F;background-position:center center;background-image:url(images/fck_anchor.gif);background-repeat:no-repeat;width:16px;height:15px;vertical-align:middle}.FCK__AnchorC{border:1px dotted #00F;background-position:1px center;background-image:url(images/fck_anchor.gif);background-repeat:no-repeat;padding-left:18px}a[name]{border:1px dotted #00F;background-position:0 center;background-image:url(images/fck_anchor.gif);background-repeat:no-repeat;padding-left:18px}.FCK__PageBreak{background-position:center center;background-image:url(images/fck_pagebreak.gif);background-repeat:no-repeat;clear:both;display:block;float:none;width:100%;border-top:#999 1px dotted;border-bottom:#999 1px dotted;border-right:0;border-left:0;height:5px}.FCK__InputHidden{width:19px;height:18px;background-image:url(images/fck_hiddenfield.gif);background-repeat:no-repeat;vertical-align:text-bottom;background-position:center center}.FCK__ShowBlocks p,.FCK__ShowBlocks div,.FCK__ShowBlocks pre,.FCK__ShowBlocks address,.FCK__ShowBlocks blockquote,.FCK__ShowBlocks h1,.FCK__ShowBlocks h2,.FCK__ShowBlocks h3,.FCK__ShowBlocks h4,.FCK__ShowBlocks h5,.FCK__ShowBlocks h6{background-repeat:no-repeat;border:1px dotted gray;padding-top:8px;padding-left:8px}.FCK__ShowBlocks p{background-image:url(images/block_p.png)}.FCK__ShowBlocks div{background-image:url(images/block_div.png)}.FCK__ShowBlocks pre{background-image:url(images/block_pre.png)}.FCK__ShowBlocks address{background-image:url(images/block_address.png)}.FCK__ShowBlocks blockquote{background-image:url(images/block_blockquote.png)}.FCK__ShowBlocks h1{background-image:url(images/block_h1.png)}.FCK__ShowBlocks h2{background-image:url(images/block_h2.png)}.FCK__ShowBlocks h3{background-image:url(images/block_h3.png)}.FCK__ShowBlocks h4{background-image:url(images/block_h4.png)}.FCK__ShowBlocks h5{background-image:url(images/block_h5.png)}.FCK__ShowBlocks h6{background-image:url(images/block_h6.png)}' ) ;
var FCK_ShowTableBordersCSS = FCKTools.FixCssUrls( FCKConfig.FullBasePath + 'css/', 'table:not([border]),table:not([border]) > tr > td,table:not([border]) > tr > th,table:not([border]) > tbody > tr > td,table:not([border]) > tbody > tr > th,table:not([border]) > thead > tr > td,table:not([border]) > thead > tr > th,table:not([border]) > tfoot > tr > td,table:not([border]) > tfoot > tr > th,table[border=\"0\"],table[border=\"0\"] > tr > td,table[border=\"0\"] > tr > th,table[border=\"0\"] > tbody > tr > td,table[border=\"0\"] > tbody > tr > th,table[border=\"0\"] > thead > tr > td,table[border=\"0\"] > thead > tr > th,table[border=\"0\"] > tfoot > tr > td,table[border=\"0\"] > tfoot > tr > th{border:#d3d3d3 1px dotted}' ) ;
@Packager.RemoveLine */
// Popup the debug window if debug mode is set to true. It guarantees that the
// first debug message will not be lost.
if ( FCKConfig.Debug )
FCKDebug._GetWindow() ;
// Load the active skin CSS. // Load the active skin CSS.
LoadCss( FCKConfig.SkinPath + 'fck_editor.css' ) ; document.write( FCKTools.GetStyleHtml( FCKConfig.SkinEditorCSS ) ) ;
// Load the language file. // Load the language file.
FCKLanguageManager.Initialize() ; FCKLanguageManager.Initialize() ;
@@ -281,13 +333,16 @@ function WaitForActive( editorInstance, newStatus )
} }
} }
// Gecko browsers doens't calculate well that IFRAME size so we must // Gecko browsers doesn't calculate well the IFRAME size so we must
// recalculate it every time the window size changes. // recalculate it every time the window size changes.
if ( FCKBrowserInfo.IsGecko ) if ( FCKBrowserInfo.IsGecko && !FCKBrowserInfo.IsOpera )
{ {
function Window_OnResize() window.onresize = function( e )
{ {
if ( FCKBrowserInfo.IsOpera ) // Running in Chrome makes the window receive the event including subframes.
// we care only about this window. Ticket #1642.
// #2002: The originalTarget from the event can be the current document, the window, or the editing area.
if ( e && e.originalTarget !== document && e.originalTarget !== window && (!e.originalTarget.ownerDocument || e.originalTarget.ownerDocument != document ))
return ; return ;
var oCell = document.getElementById( 'xEditingArea' ) ; var oCell = document.getElementById( 'xEditingArea' ) ;
@@ -295,11 +350,10 @@ if ( FCKBrowserInfo.IsGecko )
var eInnerElement = oCell.firstChild ; var eInnerElement = oCell.firstChild ;
if ( eInnerElement ) if ( eInnerElement )
{ {
eInnerElement.style.height = 0 ; eInnerElement.style.height = '0px' ;
eInnerElement.style.height = oCell.scrollHeight - 2 ; eInnerElement.style.height = ( oCell.scrollHeight - 2 ) + 'px' ;
} }
} }
window.onresize = Window_OnResize ;
} }
</script> </script>

View File

@@ -1,6 +1,6 @@
/* /*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net * FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben * Copyright (C) 2003-2008 Frederico Caldeira Knabben
* *
* == BEGIN LICENSE == * == BEGIN LICENSE ==
* *
@@ -86,4 +86,4 @@ body, td, input, select
.FolderListFolder img .FolderListFolder img
{ {
background-image: url(images/Folder.gif); background-image: url(images/Folder.gif);
} }

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- <!--
* FCKeditor - The text editor for Internet - http://www.fckeditor.net * FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben * Copyright (C) 2003-2008 Frederico Caldeira Knabben
* *
* == BEGIN LICENSE == * == BEGIN LICENSE ==
* *
@@ -24,9 +24,41 @@
<html> <html>
<head> <head>
<title>FCKeditor - Resources Browser</title> <title>FCKeditor - Resources Browser</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="browser.css" type="text/css" rel="stylesheet"> <link href="browser.css" type="text/css" rel="stylesheet">
<script type="text/javascript" src="js/fckxml.js"></script> <script type="text/javascript" src="js/fckxml.js"></script>
<script language="javascript"> <script language="javascript">
// Automatically detect the correct document.domain (#1919).
(function()
{
var d = document.domain ;
while ( true )
{
// Test if we can access a parent property.
try
{
var test = window.opener.document.domain ;
break ;
}
catch( e ) {}
// Remove a domain part: www.mytest.example.com => mytest.example.com => example.com ...
d = d.replace( /.*?(?:\.|$)/, '' ) ;
if ( d.length == 0 )
break ; // It was not able to detect the domain.
try
{
document.domain = d ;
}
catch (e)
{
break ;
}
}
})() ;
function GetUrlParam( paramName ) function GetUrlParam( paramName )
{ {
@@ -140,7 +172,10 @@ oIcons.GetIcon = function( fileName )
function OnUploadCompleted( errorNumber, fileUrl, fileName, customMsg ) function OnUploadCompleted( errorNumber, fileUrl, fileName, customMsg )
{ {
window.frames['frmUpload'].OnUploadCompleted( errorNumber, fileName ) ; if (errorNumber == "1")
window.frames['frmUpload'].OnUploadCompleted( errorNumber, customMsg ) ;
else
window.frames['frmUpload'].OnUploadCompleted( errorNumber, fileName ) ;
} }
</script> </script>

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- <!--
* FCKeditor - The text editor for Internet - http://www.fckeditor.net * FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben * Copyright (C) 2003-2008 Frederico Caldeira Knabben
* *
* == BEGIN LICENSE == * == BEGIN LICENSE ==
* *
@@ -23,8 +23,40 @@
--> -->
<html> <html>
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="browser.css" type="text/css" rel="stylesheet"> <link href="browser.css" type="text/css" rel="stylesheet">
<script type="text/javascript"> <script type="text/javascript">
// Automatically detect the correct document.domain (#1919).
(function()
{
var d = document.domain ;
while ( true )
{
// Test if we can access a parent property.
try
{
var test = window.top.opener.document.domain ;
break ;
}
catch( e ) {}
// Remove a domain part: www.mytest.example.com => mytest.example.com => example.com ...
d = d.replace( /.*?(?:\.|$)/, '' ) ;
if ( d.length == 0 )
break ; // It was not able to detect the domain.
try
{
document.domain = d ;
}
catch (e)
{
break ;
}
}
})() ;
function OnResize() function OnResize()
{ {

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- <!--
* FCKeditor - The text editor for Internet - http://www.fckeditor.net * FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben * Copyright (C) 2003-2008 Frederico Caldeira Knabben
* *
* == BEGIN LICENSE == * == BEGIN LICENSE ==
* *

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- <!--
* FCKeditor - The text editor for Internet - http://www.fckeditor.net * FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben * Copyright (C) 2003-2008 Frederico Caldeira Knabben
* *
* == BEGIN LICENSE == * == BEGIN LICENSE ==
* *
@@ -25,6 +25,7 @@
<html> <html>
<head> <head>
<link href="browser.css" type="text/css" rel="stylesheet"> <link href="browser.css" type="text/css" rel="stylesheet">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script type="text/javascript" src="js/common.js"></script> <script type="text/javascript" src="js/common.js"></script>
<script language="javascript"> <script language="javascript">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- <!--
* FCKeditor - The text editor for Internet - http://www.fckeditor.net * FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben * Copyright (C) 2003-2008 Frederico Caldeira Knabben
* *
* == BEGIN LICENSE == * == BEGIN LICENSE ==
* *
@@ -24,6 +24,7 @@
<html xmlns="http://www.w3.org/1999/xhtml"> <html xmlns="http://www.w3.org/1999/xhtml">
<head> <head>
<link href="browser.css" type="text/css" rel="stylesheet" /> <link href="browser.css" type="text/css" rel="stylesheet" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script type="text/javascript" src="js/common.js"></script> <script type="text/javascript" src="js/common.js"></script>
<script type="text/javascript"> <script type="text/javascript">
@@ -87,7 +88,7 @@ function OpenFolder( folderPath )
function OpenFile( fileUrl ) function OpenFile( fileUrl )
{ {
window.top.opener.SetUrl( encodeURI( fileUrl ) ) ; window.top.opener.SetUrl( encodeURI( fileUrl ).replace( '#', '%23' ) ) ;
window.top.close() ; window.top.close() ;
window.top.opener.focus() ; window.top.opener.focus() ;
} }

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- <!--
* FCKeditor - The text editor for Internet - http://www.fckeditor.net * FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben * Copyright (C) 2003-2008 Frederico Caldeira Knabben
* *
* == BEGIN LICENSE == * == BEGIN LICENSE ==
* *

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- <!--
* FCKeditor - The text editor for Internet - http://www.fckeditor.net * FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben * Copyright (C) 2003-2008 Frederico Caldeira Knabben
* *
* == BEGIN LICENSE == * == BEGIN LICENSE ==
* *
@@ -24,6 +24,7 @@
<html xmlns="http://www.w3.org/1999/xhtml"> <html xmlns="http://www.w3.org/1999/xhtml">
<head> <head>
<title>File Upload</title> <title>File Upload</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="browser.css" type="text/css" rel="stylesheet" /> <link href="browser.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="js/common.js"></script> <script type="text/javascript" src="js/common.js"></script>
<script type="text/javascript"> <script type="text/javascript">

View File

@@ -1,6 +1,6 @@
/* /*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net * FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben * Copyright (C) 2003-2008 Frederico Caldeira Knabben
* *
* == BEGIN LICENSE == * == BEGIN LICENSE ==
* *
@@ -22,6 +22,38 @@
* File Browser dialog window. * File Browser dialog window.
*/ */
// Automatically detect the correct document.domain (#1919).
(function()
{
var d = document.domain ;
while ( true )
{
// Test if we can access a parent property.
try
{
var test = window.top.opener.document.domain ;
break ;
}
catch( e ) {}
// Remove a domain part: www.mytest.example.com => mytest.example.com => example.com ...
d = d.replace( /.*?(?:\.|$)/, '' ) ;
if ( d.length == 0 )
break ; // It was not able to detect the domain.
try
{
document.domain = d ;
}
catch (e)
{
break ;
}
}
})() ;
function AddSelectOption( selectElement, optionText, optionValue ) function AddSelectOption( selectElement, optionText, optionValue )
{ {
var oOption = document.createElement("OPTION") ; var oOption = document.createElement("OPTION") ;
@@ -52,4 +84,4 @@ StringBuilder.prototype.Append = function( value )
StringBuilder.prototype.ToString = function() StringBuilder.prototype.ToString = function()
{ {
return this._Strings.join( '' ) ; return this._Strings.join( '' ) ;
} }

View File

@@ -1,6 +1,6 @@
/* /*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net * FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben * Copyright (C) 2003-2008 Frederico Caldeira Knabben
* *
* == BEGIN LICENSE == * == BEGIN LICENSE ==
* *
@@ -31,8 +31,8 @@ var FCKXml = function()
FCKXml.prototype.GetHttpRequest = function() FCKXml.prototype.GetHttpRequest = function()
{ {
// Gecko / IE7 // Gecko / IE7
if ( typeof(XMLHttpRequest) != 'undefined' ) try { return new XMLHttpRequest(); }
return new XMLHttpRequest() ; catch(e) {}
// IE6 // IE6
try { return new ActiveXObject( 'Msxml2.XMLHTTP' ) ; } try { return new ActiveXObject( 'Msxml2.XMLHTTP' ) ; }

View File

@@ -1,6 +1,6 @@
<% <%
' FCKeditor - The text editor for Internet - http://www.fckeditor.net ' FCKeditor - The text editor for Internet - http://www.fckeditor.net
' Copyright (C) 2003-2007 Frederico Caldeira Knabben ' Copyright (C) 2003-2008 Frederico Caldeira Knabben
' '
' == BEGIN LICENSE == ' == BEGIN LICENSE ==
' '

View File

@@ -1,6 +1,6 @@
<% <%
' FCKeditor - The text editor for Internet - http://www.fckeditor.net ' FCKeditor - The text editor for Internet - http://www.fckeditor.net
' Copyright (C) 2003-2007 Frederico Caldeira Knabben ' Copyright (C) 2003-2008 Frederico Caldeira Knabben
' '
' == BEGIN LICENSE == ' == BEGIN LICENSE ==
' '
@@ -350,4 +350,4 @@ End Class
Class NetRube_FileInfo Class NetRube_FileInfo
Dim FormName, ClientPath, Path, Name, Ext, Content, Size, MIME, Start Dim FormName, ClientPath, Path, Name, Ext, Content, Size, MIME, Start
End Class End Class
%> %>

View File

@@ -1,6 +1,6 @@
<% <%
' FCKeditor - The text editor for Internet - http://www.fckeditor.net ' FCKeditor - The text editor for Internet - http://www.fckeditor.net
' Copyright (C) 2003-2007 Frederico Caldeira Knabben ' Copyright (C) 2003-2008 Frederico Caldeira Knabben
' '
' == BEGIN LICENSE == ' == BEGIN LICENSE ==
' '
@@ -190,7 +190,7 @@ Sub FileUpload( resourceType, currentFolder, sCommand )
dim sFileUrl dim sFileUrl
sFileUrl = CombinePaths( GetResourceTypePath( resourceType, sCommand ) , currentFolder ) sFileUrl = CombinePaths( GetResourceTypePath( resourceType, sCommand ) , currentFolder )
sFileUrl = CombinePaths( sFileUrl, sFileName ) sFileUrl = CombinePaths( sFileUrl, sFileName )
SendUploadResults sErrorNumber, sFileUrl, sFileName, "" SendUploadResults sErrorNumber, sFileUrl, sFileName, ""
End Sub End Sub

View File

@@ -1,6 +1,6 @@
<% <%
' FCKeditor - The text editor for Internet - http://www.fckeditor.net ' FCKeditor - The text editor for Internet - http://www.fckeditor.net
' Copyright (C) 2003-2007 Frederico Caldeira Knabben ' Copyright (C) 2003-2008 Frederico Caldeira Knabben
' '
' == BEGIN LICENSE == ' == BEGIN LICENSE ==
' '
@@ -22,22 +22,22 @@
%> %>
<% <%
' SECURITY: You must explicitelly enable this "connector" (set it to "True"). ' SECURITY: You must explicitly enable this "connector" (set it to "True").
' WARNING: don't just set "ConfigIsEnabled = true", you must be sure that only ' WARNING: don't just set "ConfigIsEnabled = true", you must be sure that only
' authenticated users can access this file or use some kind of session checking. ' authenticated users can access this file or use some kind of session checking.
Dim ConfigIsEnabled Dim ConfigIsEnabled
ConfigIsEnabled = False ConfigIsEnabled = False
' Path to user files relative to the document root. ' Path to user files relative to the document root.
' This setting is preserved only for backward compatibility. ' This setting is preserved only for backward compatibility.
' You should look at the settings for each resource type to get the full potential ' You should look at the settings for each resource type to get the full potential
Dim ConfigUserFilesPath Dim ConfigUserFilesPath
ConfigUserFilesPath = "/userfiles/" ConfigUserFilesPath = "/userfiles/"
' Due to security issues with Apache modules, it is reccomended to leave the ' Due to security issues with Apache modules, it is recommended to leave the
' following setting enabled. ' following setting enabled.
Dim ConfigForceSingleExtension Dim ConfigForceSingleExtension
ConfigForceSingleExtension = true ConfigForceSingleExtension = true
' What the user can do with this connector ' What the user can do with this connector
Dim ConfigAllowedCommands Dim ConfigAllowedCommands
@@ -54,36 +54,36 @@ ConfigHtmlExtensions = "html|htm|xml|xsd|txt|js"
' '
' Configuration settings for each Resource Type ' Configuration settings for each Resource Type
' '
' - AllowedExtensions: the possible extensions that can be allowed. ' - AllowedExtensions: the possible extensions that can be allowed.
' If it is empty then any file type can be uploaded. ' If it is empty then any file type can be uploaded.
' '
' - DeniedExtensions: The extensions that won't be allowed. ' - DeniedExtensions: The extensions that won't be allowed.
' If it is empty then no restrictions are done here. ' If it is empty then no restrictions are done here.
' '
' For a file to be uploaded it has to fullfil both the AllowedExtensions ' For a file to be uploaded it has to fulfill both the AllowedExtensions
' and DeniedExtensions (that's it: not being denied) conditions. ' and DeniedExtensions (that's it: not being denied) conditions.
' '
' - FileTypesPath: the virtual folder relative to the document root where ' - FileTypesPath: the virtual folder relative to the document root where
' these resources will be located. ' these resources will be located.
' Attention: It must start and end with a slash: '/' ' Attention: It must start and end with a slash: '/'
' '
' - FileTypesAbsolutePath: the physical path to the above folder. It must be ' - FileTypesAbsolutePath: the physical path to the above folder. It must be
' an absolute path. ' an absolute path.
' If it's an empty string then it will be autocalculated. ' If it's an empty string then it will be autocalculated.
' Usefull if you are using a virtual directory, symbolic link or alias. ' Useful if you are using a virtual directory, symbolic link or alias.
' Examples: 'C:\\MySite\\userfiles\\' or '/root/mysite/userfiles/'. ' Examples: 'C:\\MySite\\userfiles\\' or '/root/mysite/userfiles/'.
' Attention: The above 'FileTypesPath' must point to the same directory. ' Attention: The above 'FileTypesPath' must point to the same directory.
' Attention: It must end with a slash: '/' ' Attention: It must end with a slash: '/'
' '
' - QuickUploadPath: the virtual folder relative to the document root where ' - QuickUploadPath: the virtual folder relative to the document root where
' these resources will be uploaded using the Upload tab in the resources ' these resources will be uploaded using the Upload tab in the resources
' dialogs. ' dialogs.
' Attention: It must start and end with a slash: '/' ' Attention: It must start and end with a slash: '/'
' '
' - QuickUploadAbsolutePath: the physical path to the above folder. It must be ' - QuickUploadAbsolutePath: the physical path to the above folder. It must be
' an absolute path. ' an absolute path.
' If it's an empty string then it will be autocalculated. ' If it's an empty string then it will be autocalculated.
' Usefull if you are using a virtual directory, symbolic link or alias. ' Useful if you are using a virtual directory, symbolic link or alias.
' Examples: 'C:\\MySite\\userfiles\\' or '/root/mysite/userfiles/'. ' Examples: 'C:\\MySite\\userfiles\\' or '/root/mysite/userfiles/'.
' Attention: The above 'QuickUploadPath' must point to the same directory. ' Attention: The above 'QuickUploadPath' must point to the same directory.
' Attention: It must end with a slash: '/' ' Attention: It must end with a slash: '/'
@@ -104,14 +104,14 @@ ConfigFileTypesAbsolutePath.Add "File", ""
ConfigQuickUploadPath.Add "File", ConfigUserFilesPath ConfigQuickUploadPath.Add "File", ConfigUserFilesPath
ConfigQuickUploadAbsolutePath.Add "File", "" ConfigQuickUploadAbsolutePath.Add "File", ""
ConfigAllowedExtensions.Add "Image", "bmp|gif|jpeg|jpg|png|psd|tif|tiff" ConfigAllowedExtensions.Add "Image", "bmp|gif|jpeg|jpg|png"
ConfigDeniedExtensions.Add "Image", "" ConfigDeniedExtensions.Add "Image", ""
ConfigFileTypesPath.Add "Image", ConfigUserFilesPath & "image/" ConfigFileTypesPath.Add "Image", ConfigUserFilesPath & "image/"
ConfigFileTypesAbsolutePath.Add "Image", "" ConfigFileTypesAbsolutePath.Add "Image", ""
ConfigQuickUploadPath.Add "Image", ConfigUserFilesPath ConfigQuickUploadPath.Add "Image", ConfigUserFilesPath
ConfigQuickUploadAbsolutePath.Add "Image", "" ConfigQuickUploadAbsolutePath.Add "Image", ""
ConfigAllowedExtensions.Add "Flash", "swf|fla" ConfigAllowedExtensions.Add "Flash", "swf|flv"
ConfigDeniedExtensions.Add "Flash", "" ConfigDeniedExtensions.Add "Flash", ""
ConfigFileTypesPath.Add "Flash", ConfigUserFilesPath & "flash/" ConfigFileTypesPath.Add "Flash", ConfigUserFilesPath & "flash/"
ConfigFileTypesAbsolutePath.Add "Flash", "" ConfigFileTypesAbsolutePath.Add "Flash", ""

View File

@@ -5,7 +5,7 @@ Response.Buffer = True
%> %>
<% <%
' FCKeditor - The text editor for Internet - http://www.fckeditor.net ' FCKeditor - The text editor for Internet - http://www.fckeditor.net
' Copyright (C) 2003-2007 Frederico Caldeira Knabben ' Copyright (C) 2003-2008 Frederico Caldeira Knabben
' '
' == BEGIN LICENSE == ' == BEGIN LICENSE ==
' '
@@ -50,13 +50,13 @@ Sub DoResponse()
sCurrentFolder = GetCurrentFolder() sCurrentFolder = GetCurrentFolder()
' Check if it is an allowed command ' Check if it is an allowed command
if ( Not IsAllowedCommand( sCommand ) ) then if ( Not IsAllowedCommand( sCommand ) ) then
SendError 1, "The """ & sCommand & """ command isn't allowed" SendError 1, "The """ & sCommand & """ command isn't allowed"
end if end if
' Check if it is an allowed resource type. ' Check if it is an allowed resource type.
if ( Not IsAllowedType( sResourceType ) ) Then if ( Not IsAllowedType( sResourceType ) ) Then
SendError 1, "The """ & sResourceType & """ resource type isn't allowed" SendError 1, "The """ & sResourceType & """ resource type isn't allowed"
end if end if
@@ -85,4 +85,4 @@ Sub DoResponse()
Response.End Response.End
End Sub End Sub
%> %>

View File

@@ -1,6 +1,6 @@
<% <%
' FCKeditor - The text editor for Internet - http://www.fckeditor.net ' FCKeditor - The text editor for Internet - http://www.fckeditor.net
' Copyright (C) 2003-2007 Frederico Caldeira Knabben ' Copyright (C) 2003-2008 Frederico Caldeira Knabben
' '
' == BEGIN LICENSE == ' == BEGIN LICENSE ==
' '
@@ -40,14 +40,14 @@ Function GetResourceTypeDirectory( resourceType, sCommand )
GetResourceTypeDirectory = ConfigQuickUploadAbsolutePath.Item( resourceType ) GetResourceTypeDirectory = ConfigQuickUploadAbsolutePath.Item( resourceType )
else else
' Map the "UserFiles" path to a local directory. ' Map the "UserFiles" path to a local directory.
GetResourceTypeDirectory = Server.MapPath( ConfigQuickUploadPath.Item( resourceType ) ) GetResourceTypeDirectory = Server.MapPath( ConfigQuickUploadPath.Item( resourceType ) )
end if end if
else else
if ( ConfigFileTypesAbsolutePath.Item( resourceType ) <> "" ) then if ( ConfigFileTypesAbsolutePath.Item( resourceType ) <> "" ) then
GetResourceTypeDirectory = ConfigFileTypesAbsolutePath.Item( resourceType ) GetResourceTypeDirectory = ConfigFileTypesAbsolutePath.Item( resourceType )
else else
' Map the "UserFiles" path to a local directory. ' Map the "UserFiles" path to a local directory.
GetResourceTypeDirectory = Server.MapPath( ConfigFileTypesPath.Item( resourceType ) ) GetResourceTypeDirectory = Server.MapPath( ConfigFileTypesPath.Item( resourceType ) )
end if end if
end if end if
end Function end Function
@@ -63,7 +63,7 @@ End Function
Function ServerMapFolder( resourceType, folderPath, sCommand ) Function ServerMapFolder( resourceType, folderPath, sCommand )
Dim sResourceTypePath Dim sResourceTypePath
' Get the resource type directory. ' Get the resource type directory.
sResourceTypePath = GetResourceTypeDirectory( resourceType, sCommand ) sResourceTypePath = GetResourceTypeDirectory( resourceType, sCommand )
' Ensure that the directory exists. ' Ensure that the directory exists.
CreateServerFolder sResourceTypePath CreateServerFolder sResourceTypePath
@@ -172,7 +172,7 @@ function GetCurrentFolder()
If ( Left( sCurrentFolder, 1 ) <> "/" ) Then sCurrentFolder = "/" & sCurrentFolder If ( Left( sCurrentFolder, 1 ) <> "/" ) Then sCurrentFolder = "/" & sCurrentFolder
' Check for invalid folder paths (..) ' Check for invalid folder paths (..)
If ( InStr( 1, sCurrentFolder, ".." ) <> 0 ) Then If ( InStr( 1, sCurrentFolder, ".." ) <> 0 OR InStr( 1, sCurrentFolder, "\" ) <> 0) Then
SendError 102, "" SendError 102, ""
End If End If
@@ -185,8 +185,8 @@ function SanitizeFolderName( sNewFolderName )
Set oRegex = New RegExp Set oRegex = New RegExp
oRegex.Global = True oRegex.Global = True
' remove . \ / | : ? * " < > ' remove . \ / | : ? * " < > and control characters
oRegex.Pattern = "(\.|\\|\/|\||:|\?|\*|""|\<|\>)" oRegex.Pattern = "(\.|\\|\/|\||:|\?|\*|""|\<|\>|[\u0000-\u001F]|\u007F)"
SanitizeFolderName = oRegex.Replace( sNewFolderName, "_" ) SanitizeFolderName = oRegex.Replace( sNewFolderName, "_" )
Set oRegex = Nothing Set oRegex = Nothing
@@ -203,8 +203,8 @@ function SanitizeFileName( sNewFileName )
sNewFileName = oRegex.Replace( sNewFileName, "_" ) sNewFileName = oRegex.Replace( sNewFileName, "_" )
end if end if
' remove \ / | : ? * " < > ' remove \ / | : ? * " < > and control characters
oRegex.Pattern = "(\\|\/|\||:|\?|\*|""|\<|\>)" oRegex.Pattern = "(\\|\/|\||:|\?|\*|""|\<|\>|[\u0000-\u001F]|\u007F)"
SanitizeFileName = oRegex.Replace( sNewFileName, "_" ) SanitizeFileName = oRegex.Replace( sNewFileName, "_" )
Set oRegex = Nothing Set oRegex = Nothing
@@ -214,6 +214,38 @@ end function
Sub SendUploadResults( errorNumber, fileUrl, fileName, customMsg ) Sub SendUploadResults( errorNumber, fileUrl, fileName, customMsg )
Response.Clear Response.Clear
Response.Write "<script type=""text/javascript"">" Response.Write "<script type=""text/javascript"">"
Response.Write "(function()"
Response.Write "{"
Response.Write "var d = document.domain ;"
Response.Write " while ( true )"
Response.Write " {"
' Test if we can access a parent property.
Response.Write " try"
Response.Write " {"
Response.Write " var test = window.top.opener.document.domain ;"
Response.Write " break ;"
Response.Write " }"
Response.Write " catch( e ) {}"
' Remove a domain part: www.mytest.example.com => mytest.example.com => example.com ...
Response.Write " d = d.replace( /.*?(?:\.|$)/, '' ) ;"
Response.Write " if ( d.length == 0 )"
' It was not able to detect the domain.
Response.Write " break ;"
Response.Write ""
Response.Write " try"
Response.Write " {"
Response.Write " document.domain = d ;"
Response.Write " }"
Response.Write " catch (e)"
Response.Write " {"
Response.Write " break ;"
Response.Write " }"
Response.Write " }"
Response.Write "})() ;"
Response.Write "window.parent.OnUploadCompleted(" & errorNumber & ",""" & Replace( fileUrl, """", "\""" ) & """,""" & Replace( fileName, """", "\""" ) & """,""" & Replace( customMsg , """", "\""" ) & """) ;" Response.Write "window.parent.OnUploadCompleted(" & errorNumber & ",""" & Replace( fileUrl, """", "\""" ) & """,""" & Replace( fileName, """", "\""" ) & """,""" & Replace( customMsg , """", "\""" ) & """) ;"
Response.Write "</script>" Response.Write "</script>"
Response.End Response.End

View File

@@ -5,7 +5,7 @@ Response.Buffer = True
%> %>
<% <%
' FCKeditor - The text editor for Internet - http://www.fckeditor.net ' FCKeditor - The text editor for Internet - http://www.fckeditor.net
' Copyright (C) 2003-2007 Frederico Caldeira Knabben ' Copyright (C) 2003-2008 Frederico Caldeira Knabben
' '
' == BEGIN LICENSE == ' == BEGIN LICENSE ==
' '
@@ -32,6 +32,10 @@ Response.Buffer = True
<!--#include file="class_upload.asp"--> <!--#include file="class_upload.asp"-->
<% <%
Sub SendError( number, text )
SendUploadResults number, "", "", text
End Sub
' Check if this uploader has been enabled. ' Check if this uploader has been enabled.
If ( ConfigIsEnabled = False ) Then If ( ConfigIsEnabled = False ) Then
SendUploadResults "1", "", "", "This file uploader is disabled. Please check the ""editor/filemanager/connectors/asp/config.asp"" file" SendUploadResults "1", "", "", "This file uploader is disabled. Please check the ""editor/filemanager/connectors/asp/config.asp"" file"

View File

@@ -1,6 +1,6 @@
<% <%
' FCKeditor - The text editor for Internet - http://www.fckeditor.net ' FCKeditor - The text editor for Internet - http://www.fckeditor.net
' Copyright (C) 2003-2007 Frederico Caldeira Knabben ' Copyright (C) 2003-2008 Frederico Caldeira Knabben
' '
' == BEGIN LICENSE == ' == BEGIN LICENSE ==
' '

View File

@@ -0,0 +1,98 @@
<%@ Control Language="C#" EnableViewState="false" AutoEventWireup="false" Inherits="FredCK.FCKeditorV2.FileBrowser.Config" %>
<%--
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2008 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
*
* Licensed under the terms of any of the following licenses at your
* choice:
*
* - GNU General Public License Version 2 or later (the "GPL")
* http://www.gnu.org/licenses/gpl.html
*
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
* http://www.gnu.org/licenses/lgpl.html
*
* - Mozilla Public License Version 1.1 or later (the "MPL")
* http://www.mozilla.org/MPL/MPL-1.1.html
*
* == END LICENSE ==
*
* Configuration file for the File Browser Connector for ASP.NET.
--%>
<script runat="server">
/**
* This function must check the user session to be sure that he/she is
* authorized to upload and access files in the File Browser.
*/
private bool CheckAuthentication()
{
// WARNING : DO NOT simply return "true". By doing so, you are allowing
// "anyone" to upload and list the files in your server. You must implement
// some kind of session validation here. Even something very simple as...
//
// return ( Session[ "IsAuthorized" ] != null && (bool)Session[ "IsAuthorized" ] == true );
//
// ... where Session[ "IsAuthorized" ] is set to "true" as soon as the
// user logs in your system.
return false;
}
public override void SetConfig()
{
// SECURITY: You must explicitly enable this "connector". (Set it to "true").
Enabled = CheckAuthentication();
// URL path to user files.
UserFilesPath = "/userfiles/";
// The connector tries to resolve the above UserFilesPath automatically.
// Use the following setting it you prefer to explicitely specify the
// absolute path. Examples: 'C:\\MySite\\userfiles\\' or '/root/mysite/userfiles/'.
// Attention: The above 'UserFilesPath' URL must point to the same directory.
UserFilesAbsolutePath = "";
// Due to security issues with Apache modules, it is recommended to leave the
// following setting enabled.
ForceSingleExtension = true;
// Allowed Resource Types
AllowedTypes = new string[] { "File", "Image", "Flash", "Media" };
// For security, HTML is allowed in the first Kb of data for files having the
// following extensions only.
HtmlExtensions = new string[] { "html", "htm", "xml", "xsd", "txt", "js" };
TypeConfig[ "File" ].AllowedExtensions = new string[] { "7z", "aiff", "asf", "avi", "bmp", "csv", "doc", "fla", "flv", "gif", "gz", "gzip", "jpeg", "jpg", "mid", "mov", "mp3", "mp4", "mpc", "mpeg", "mpg", "ods", "odt", "pdf", "png", "ppt", "pxd", "qt", "ram", "rar", "rm", "rmi", "rmvb", "rtf", "sdc", "sitd", "swf", "sxc", "sxw", "tar", "tgz", "tif", "tiff", "txt", "vsd", "wav", "wma", "wmv", "xls", "xml", "zip" };
TypeConfig[ "File" ].DeniedExtensions = new string[] { };
TypeConfig[ "File" ].FilesPath = "%UserFilesPath%file/";
TypeConfig[ "File" ].FilesAbsolutePath = ( UserFilesAbsolutePath == "" ? "" : "%UserFilesAbsolutePath%file/" );
TypeConfig[ "File" ].QuickUploadPath = "%UserFilesPath%";
TypeConfig[ "File" ].QuickUploadAbsolutePath = ( UserFilesAbsolutePath == "" ? "" : "%UserFilesAbsolutePath%" );
TypeConfig[ "Image" ].AllowedExtensions = new string[] { "bmp", "gif", "jpeg", "jpg", "png" };
TypeConfig[ "Image" ].DeniedExtensions = new string[] { };
TypeConfig[ "Image" ].FilesPath = "%UserFilesPath%image/";
TypeConfig[ "Image" ].FilesAbsolutePath = ( UserFilesAbsolutePath == "" ? "" : "%UserFilesAbsolutePath%image/" );
TypeConfig[ "Image" ].QuickUploadPath = "%UserFilesPath%";
TypeConfig[ "Image" ].QuickUploadAbsolutePath = ( UserFilesAbsolutePath == "" ? "" : "%UserFilesAbsolutePath%" );
TypeConfig[ "Flash" ].AllowedExtensions = new string[] { "swf", "flv" };
TypeConfig[ "Flash" ].DeniedExtensions = new string[] { };
TypeConfig[ "Flash" ].FilesPath = "%UserFilesPath%flash/";
TypeConfig[ "Flash" ].FilesAbsolutePath = ( UserFilesAbsolutePath == "" ? "" : "%UserFilesAbsolutePath%flash/" );
TypeConfig[ "Flash" ].QuickUploadPath = "%UserFilesPath%";
TypeConfig[ "Flash" ].QuickUploadAbsolutePath = ( UserFilesAbsolutePath == "" ? "" : "%UserFilesAbsolutePath%" );
TypeConfig[ "Media" ].AllowedExtensions = new string[] { "aiff", "asf", "avi", "bmp", "fla", "flv", "gif", "jpeg", "jpg", "mid", "mov", "mp3", "mp4", "mpc", "mpeg", "mpg", "png", "qt", "ram", "rm", "rmi", "rmvb", "swf", "tif", "tiff", "wav", "wma", "wmv" };
TypeConfig[ "Media" ].DeniedExtensions = new string[] { };
TypeConfig[ "Media" ].FilesPath = "%UserFilesPath%media/";
TypeConfig[ "Media" ].FilesAbsolutePath = ( UserFilesAbsolutePath == "" ? "" : "%UserFilesAbsolutePath%media/" );
TypeConfig[ "Media" ].QuickUploadPath = "%UserFilesPath%";
TypeConfig[ "Media" ].QuickUploadAbsolutePath = ( UserFilesAbsolutePath == "" ? "" : "%UserFilesAbsolutePath%" );
}
</script>

View File

@@ -1,7 +1,8 @@
<%@ Page language="c#" Trace="false" Inherits="FredCK.FCKeditorV2.FileBrowserConnector" AutoEventWireup="false" %> <%@ Page Language="c#" Trace="false" Inherits="FredCK.FCKeditorV2.FileBrowser.Connector" AutoEventWireup="false" %>
<%@ Register Src="config.ascx" TagName="Config" TagPrefix="FCKeditor" %>
<%-- <%--
* FCKeditor - The text editor for Internet - http://www.fckeditor.net * FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben * Copyright (C) 2003-2008 Frederico Caldeira Knabben
* *
* == BEGIN LICENSE == * == BEGIN LICENSE ==
* *
@@ -27,4 +28,5 @@
* *
* To download the FCKeditor.Net package, go to our official web site: * To download the FCKeditor.Net package, go to our official web site:
* http://www.fckeditor.net * http://www.fckeditor.net
--%> --%>
<FCKeditor:Config id="Config" runat="server"></FCKeditor:Config>

View File

@@ -1,7 +1,8 @@
<%@ Page language="c#" Trace="false" Inherits="FredCK.FCKeditorV2.Uploader" AutoEventWireup="false" %> <%@ Page Language="c#" Trace="false" Inherits="FredCK.FCKeditorV2.FileBrowser.Uploader" AutoEventWireup="false" %>
<%@ Register Src="config.ascx" TagName="Config" TagPrefix="FCKeditor" %>
<%-- <%--
* FCKeditor - The text editor for Internet - http://www.fckeditor.net * FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben * Copyright (C) 2003-2008 Frederico Caldeira Knabben
* *
* == BEGIN LICENSE == * == BEGIN LICENSE ==
* *
@@ -27,4 +28,5 @@
* *
* To download the FCKeditor.Net package, go to our official web site: * To download the FCKeditor.Net package, go to our official web site:
* http://www.fckeditor.net * http://www.fckeditor.net
--%> --%>
<FCKeditor:Config id="Config" runat="server"></FCKeditor:Config>

View File

@@ -1,7 +1,7 @@
<cfcomponent name="ImageObject"> <cfcomponent name="ImageObject">
<!--- <!---
ImageObject.cfc written by Rick Root (rick@webworksllc.com) ImageObject.cfc written by Rick Root (rick@webworksllc.com)
Related Web Sites: Related Web Sites:
- http://www.opensourcecf.com/imagecfc (home page) - http://www.opensourcecf.com/imagecfc (home page)
@@ -32,34 +32,34 @@
Copyright (c) 2006, Rick Root <rick@webworksllc.com> Copyright (c) 2006, Rick Root <rick@webworksllc.com>
All rights reserved. All rights reserved.
Redistribution and use in source and binary forms, with or Redistribution and use in source and binary forms, with or
without modification, are permitted provided that the without modification, are permitted provided that the
following conditions are met: following conditions are met:
- Redistributions of source code must retain the above - Redistributions of source code must retain the above
copyright notice, this list of conditions and the copyright notice, this list of conditions and the
following disclaimer. following disclaimer.
- Redistributions in binary form must reproduce the above - Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the copyright notice, this list of conditions and the
following disclaimer in the documentation and/or other following disclaimer in the documentation and/or other
materials provided with the distribution. materials provided with the distribution.
- Neither the name of the Webworks, LLC. nor the names of - Neither the name of the Webworks, LLC. nor the names of
its contributors may be used to endorse or promote products its contributors may be used to endorse or promote products
derived from this software without specific prior written derived from this software without specific prior written
permission. permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
---> --->
@@ -187,7 +187,7 @@
<cfthrow message="Option Configuration Error" detail="You cannot set the throwOnError option when using ImageObject.cfc"> <cfthrow message="Option Configuration Error" detail="You cannot set the throwOnError option when using ImageObject.cfc">
</cfif> </cfif>
<cfset imageCFC.setOption(key, val)> <cfset imageCFC.setOption(key, val)>
</cffunction> </cffunction>
<cffunction name="getOption" access="public" output="true" returnType="any" hint="Returns the current value for the specified CFC option."> <cffunction name="getOption" access="public" output="true" returnType="any" hint="Returns the current value for the specified CFC option.">

View File

@@ -1,7 +1,7 @@
<cfsetting enablecfoutputonly="yes" showdebugoutput="no"> <cfsetting enablecfoutputonly="yes" showdebugoutput="no">
<!--- <!---
* FCKeditor - The text editor for Internet - http://www.fckeditor.net * FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben * Copyright (C) 2003-2008 Frederico Caldeira Knabben
* *
* == BEGIN LICENSE == * == BEGIN LICENSE ==
* *
@@ -129,7 +129,7 @@
<cfset xmlContent = "<Error number=""1"" text=""This connector is disabled. Please check the 'editor/filemanager/connectors/cfm/config.cfm' file"" />"> <cfset xmlContent = "<Error number=""1"" text=""This connector is disabled. Please check the 'editor/filemanager/connectors/cfm/config.cfm' file"" />">
<cfelseif find("..",url.currentFolder)> <cfelseif find("..",url.currentFolder) or find("\",url.currentFolder)>
<cfset xmlContent = "<Error number=""102"" />"> <cfset xmlContent = "<Error number=""102"" />">

View File

@@ -1,7 +1,7 @@
<cfsetting enablecfoutputonly="Yes"> <cfsetting enablecfoutputonly="Yes">
<!--- <!---
* FCKeditor - The text editor for Internet - http://www.fckeditor.net * FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben * Copyright (C) 2003-2008 Frederico Caldeira Knabben
* *
* == BEGIN LICENSE == * == BEGIN LICENSE ==
* *
@@ -47,6 +47,38 @@
function SendUploadResults(errorNumber, fileUrl, fileName, customMsg) function SendUploadResults(errorNumber, fileUrl, fileName, customMsg)
{ {
WriteOutput('<script type="text/javascript">'); WriteOutput('<script type="text/javascript">');
WriteOutput("(function()"&
"{"&
" var d = document.domain ;"&
""&
" while ( true )"&
" {"&
// Test if we can access a parent property.
" try"&
" {"&
" var test = window.top.opener.document.domain ;"&
" break ;"&
" }"&
" catch( e ) {}"&
""&
// Remove a domain part: www.mytest.example.com => mytest.example.com => example.com ...
" d = d.replace( /.*?(?:\.|$)/, '' ) ;"&
""&
" if ( d.length == 0 )"&
// It was not able to detect the domain.
" break ;"&
""&
" try"&
" {"&
" document.domain = d ;"&
" }"&
" catch (e)"&
" {"&
" break ;"&
" }"&
" }"&
"})() ;");
WriteOutput('window.parent.OnUploadCompleted(' & errorNumber & ', "' & JSStringFormat(fileUrl) & '", "' & JSStringFormat(fileName) & '", "' & JSStringFormat(customMsg) & '");' ); WriteOutput('window.parent.OnUploadCompleted(' & errorNumber & ', "' & JSStringFormat(fileUrl) & '", "' & JSStringFormat(fileName) & '", "' & JSStringFormat(customMsg) & '");' );
WriteOutput('</script>'); WriteOutput('</script>');
} }
@@ -67,7 +99,7 @@
<cfabort> <cfabort>
</cfif> </cfif>
<cfif find( "..", url.currentFolder)> <cfif find( "..", url.currentFolder) or find( "\", url.currentFolder)>
<cfset SendUploadResults(102)> <cfset SendUploadResults(102)>
<cfabort> <cfabort>
</cfif> </cfif>
@@ -293,4 +325,4 @@
<!--- An error occured(202). Submit only the error code and a message (if available). ---> <!--- An error occured(202). Submit only the error code and a message (if available). --->
<cfset SendUploadResults(errorNumber, '', '', customMsg)> <cfset SendUploadResults(errorNumber, '', '', customMsg)>
<cfabort> <cfabort>
</cfif> </cfif>

View File

@@ -1,7 +1,7 @@
<cfsetting enablecfoutputonly="Yes"> <cfsetting enablecfoutputonly="Yes">
<!--- <!---
* FCKeditor - The text editor for Internet - http://www.fckeditor.net * FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben * Copyright (C) 2003-2008 Frederico Caldeira Knabben
* *
* == BEGIN LICENSE == * == BEGIN LICENSE ==
* *
@@ -65,4 +65,4 @@
<cfargument name="number" required="true" type="Numeric"> <cfargument name="number" required="true" type="Numeric">
<cfargument name="text" required="true"> <cfargument name="text" required="true">
<cfoutput><Error number="#ARGUMENTS.number#" text="#htmleditformat(ARGUMENTS.text)#" /></cfoutput> <cfoutput><Error number="#ARGUMENTS.number#" text="#htmleditformat(ARGUMENTS.text)#" /></cfoutput>
</cffunction> </cffunction>

View File

@@ -1,7 +1,7 @@
<cfsetting enablecfoutputonly="Yes"> <cfsetting enablecfoutputonly="Yes">
<!--- <!---
* FCKeditor - The text editor for Internet - http://www.fckeditor.net * FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben * Copyright (C) 2003-2008 Frederico Caldeira Knabben
* *
* == BEGIN LICENSE == * == BEGIN LICENSE ==
* *
@@ -32,14 +32,24 @@
<cfset var sFilePart = ""> <cfset var sFilePart = "">
<cfset var sFileExt = ""> <cfset var sFileExt = "">
<cfset var sFileUrl = ""> <cfset var sFileUrl = "">
<cfset var sTempDir = "">
<cfset var sTempFilePath = ""> <cfset var sTempFilePath = "">
<cfset var errorNumber = 0> <cfset var errorNumber = 0>
<cfset var customMsg = 0> <cfset var customMsg = 0>
<cfset var counter = 0> <cfset var counter = 0>
<cfset var destination = ""> <cfset var destination = "">
<cftry> <cftry>
<cffile action="UPLOAD" filefield="NewFile" destination="#GetTempDirectory()#" nameconflict="makeunique" mode="0755" /> <cfif isDefined( "REQUEST.Config.TempDirectory" )>
<cfset sTempDir = REQUEST.Config.TempDirectory>
<cfelse>
<cfset sTempDir = GetTempDirectory()>
</cfif>
<cfif NOT DirectoryExists (sTempDir)>
<cfthrow message="Invalid temporary directory: #sTempDir#">
</cfif>
<cffile action="UPLOAD" filefield="NewFile" destination="#sTempDir#" nameconflict="makeunique" mode="0755" />
<cfset sTempFilePath = CFFILE.ServerDirectory & REQUEST.fs & CFFILE.ServerFile> <cfset sTempFilePath = CFFILE.ServerDirectory & REQUEST.fs & CFFILE.ServerFile>
<!--- Map the virtual path to the local server path. ---> <!--- Map the virtual path to the local server path. --->
@@ -92,12 +102,7 @@
</cfscript> </cfscript>
<cfset destination = sServerDir & sFileName> <cfset destination = sServerDir & sFileName>
<!---
<cfdump var="#sTempFilePath#">
<cfoutput ><br /></cfoutput>
<cfdump var="#destination#">
<cfabort>
--->
<cflock name="#destination#" timeout="30" type="Exclusive"> <cflock name="#destination#" timeout="30" type="Exclusive">
<cftry> <cftry>
<cffile action="move" source="#sTempFilePath#" destination="#destination#" mode="755"> <cffile action="move" source="#sTempFilePath#" destination="#destination#" mode="755">
@@ -120,7 +125,7 @@
<cfset customMsg = CFCATCH.Message > <cfset customMsg = CFCATCH.Message >
</cfcatch> </cfcatch>
</cftry> </cftry>
<cfset SendUploadResults( errorNumber, sFileUrl, sFileName, customMsg ) > <cfset SendUploadResults( errorNumber, sFileUrl, sFileName, customMsg ) >
</cffunction> </cffunction>

View File

@@ -1,7 +1,7 @@
<cfsetting enablecfoutputonly="yes" showdebugoutput="no"> <cfsetting enablecfoutputonly="yes" showdebugoutput="no">
<!--- <!---
* FCKeditor - The text editor for Internet - http://www.fckeditor.net * FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben * Copyright (C) 2003-2008 Frederico Caldeira Knabben
* *
* == BEGIN LICENSE == * == BEGIN LICENSE ==
* *

View File

@@ -1,7 +1,7 @@
<cfsetting enablecfoutputonly="Yes"> <cfsetting enablecfoutputonly="Yes">
<!--- <!---
* FCKeditor - The text editor for Internet - http://www.fckeditor.net * FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben * Copyright (C) 2003-2008 Frederico Caldeira Knabben
* *
* == BEGIN LICENSE == * == BEGIN LICENSE ==
* *
@@ -174,7 +174,7 @@
<cfreturn true> <cfreturn true>
</cffunction> </cffunction>
<cffunction name="GetCurrentFolder" returntype="String" output="false"> <cffunction name="GetCurrentFolder" returntype="String" output="true">
<cfset var sCurrentFolder = "/"> <cfset var sCurrentFolder = "/">
<cfif isDefined( "URL.CurrentFolder" )> <cfif isDefined( "URL.CurrentFolder" )>
@@ -193,7 +193,7 @@
<!--- Ensure the folder path has no double-slashes, or mkdir may fail on certain platforms ---> <!--- Ensure the folder path has no double-slashes, or mkdir may fail on certain platforms --->
<cfset sCurrentFolder = rereplace( sCurrentFolder, "//+", "/", "all" )> <cfset sCurrentFolder = rereplace( sCurrentFolder, "//+", "/", "all" )>
<cfif find( "..", sCurrentFolder)> <cfif find( "..", sCurrentFolder) or find( "\", sCurrentFolder) >
<cfset SendError( 102, "" )> <cfset SendError( 102, "" )>
</cfif> </cfif>
@@ -204,8 +204,8 @@
<cfargument name="sNewFolderName" required="true"> <cfargument name="sNewFolderName" required="true">
<!--- Do a cleanup of the folder name to avoid possible problems ---> <!--- Do a cleanup of the folder name to avoid possible problems --->
<!--- Remove . \ / | : ? * " < > ---> <!--- Remove . \ / | : ? * " < > and control characters --->
<cfset sNewFolderName = rereplace( sNewFolderName, '\.+|\\+|\/+|\|+|\:+|\?+|\*+|"+|<+|>+', "_", "all" )> <cfset sNewFolderName = rereplace( sNewFolderName, '\.+|\\+|\/+|\|+|\:+|\?+|\*+|"+|<+|>+|[[:cntrl:]]+', "_", "all" )>
<cfreturn sNewFolderName> <cfreturn sNewFolderName>
</cffunction> </cffunction>
@@ -266,7 +266,38 @@
<cfargument name="customMsg" required="false" type="String" default=""> <cfargument name="customMsg" required="false" type="String" default="">
<cfoutput> <cfoutput>
<script type="text/javascript"> <script type="text/javascript">
(function()
{
var d = document.domain ;
while ( true )
{
// Test if we can access a parent property.
try
{
var test = window.top.opener.document.domain ;
break ;
}
catch( e ) {}
// Remove a domain part: www.mytest.example.com => mytest.example.com => example.com ...
d = d.replace( /.*?(?:\.|$)/, '' ) ;
if ( d.length == 0 )
break ; // It was not able to detect the domain.
try
{
document.domain = d ;
}
catch (e)
{
break ;
}
}
})() ;
window.parent.OnUploadCompleted( #errorNumber#, "#JSStringFormat(fileUrl)#", "#JSStringFormat(fileName)#", "#JSStringFormat(customMsg)#" ); window.parent.OnUploadCompleted( #errorNumber#, "#JSStringFormat(fileUrl)#", "#JSStringFormat(fileName)#", "#JSStringFormat(customMsg)#" );
</script> </script>
</cfoutput> </cfoutput>
@@ -281,8 +312,8 @@
</cfif> </cfif>
<!--- Do a cleanup of the file name to avoid possible problems ---> <!--- Do a cleanup of the file name to avoid possible problems --->
<!--- Remove \ / | : ? * " < > ---> <!--- Remove \ / | : ? * " < > and control characters --->
<cfset sNewFileName = rereplace( sNewFileName, '\\[.]+|\\+|\/+|\|+|\:+|\?+|\*+|"+|<+|>+', "_", "all" )> <cfset sNewFileName = rereplace( sNewFileName, '\\[.]+|\\+|\/+|\|+|\:+|\?+|\*+|"+|<+|>+|[[:cntrl:]]+', "_", "all" )>
<cfreturn sNewFileName> <cfreturn sNewFileName>
</cffunction> </cffunction>

View File

@@ -1,7 +1,7 @@
<cfsetting enablecfoutputonly="yes" showdebugoutput="no"> <cfsetting enablecfoutputonly="yes" showdebugoutput="no">
<!--- <!---
* FCKeditor - The text editor for Internet - http://www.fckeditor.net * FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben * Copyright (C) 2003-2008 Frederico Caldeira Knabben
* *
* == BEGIN LICENSE == * == BEGIN LICENSE ==
* *
@@ -33,6 +33,12 @@
<cfinclude template="cf_io.cfm"> <cfinclude template="cf_io.cfm">
<cfinclude template="cf_commands.cfm"> <cfinclude template="cf_commands.cfm">
<cffunction name="SendError" returntype="void" output="true">
<cfargument name="number" required="true" type="Numeric">
<cfargument name="text" required="true">
<cfreturn SendUploadResults( "#ARGUMENTS.number#", "", "", "ARGUMENTS.text" )>
</cffunction>
<cfset REQUEST.Config = Config> <cfset REQUEST.Config = Config>
<cfif find( "/", getBaseTemplatePath() ) > <cfif find( "/", getBaseTemplatePath() ) >
<cfset REQUEST.Fs = "/"> <cfset REQUEST.Fs = "/">
@@ -64,5 +70,3 @@
</cfif> </cfif>
<cfset FileUpload( sType, sCurrentFolder, sCommand )> <cfset FileUpload( sType, sCurrentFolder, sCommand )>

View File

@@ -1,7 +1,7 @@
<cfsetting enablecfoutputonly="Yes"> <cfsetting enablecfoutputonly="Yes">
<!--- <!---
* FCKeditor - The text editor for Internet - http://www.fckeditor.net * FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben * Copyright (C) 2003-2008 Frederico Caldeira Knabben
* *
* == BEGIN LICENSE == * == BEGIN LICENSE ==
* *
@@ -129,4 +129,3 @@ detectionLevel:
<cfreturn false> <cfreturn false>
</cffunction> </cffunction>

View File

@@ -1,7 +1,7 @@
<cfsetting enablecfoutputonly="Yes"> <cfsetting enablecfoutputonly="Yes">
<!--- <!---
* FCKeditor - The text editor for Internet - http://www.fckeditor.net * FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben * Copyright (C) 2003-2008 Frederico Caldeira Knabben
* *
* == BEGIN LICENSE == * == BEGIN LICENSE ==
* *
@@ -26,7 +26,8 @@
Config = StructNew() ; Config = StructNew() ;
// SECURITY: You must explicitly enable this "connector". (Set enabled to "true") // SECURITY: You must explicitly enable this "connector". (Set enabled to "true")
Config.Enabled = true ; Config.Enabled = false ;
// Path to uploaded files relative to the document root. // Path to uploaded files relative to the document root.
Config.UserFilesPath = "/userfiles/" ; Config.UserFilesPath = "/userfiles/" ;
@@ -37,7 +38,7 @@
// Example: C:\inetpub\wwwroot\myDocs\ // Example: C:\inetpub\wwwroot\myDocs\
Config.ServerPath = "" ; Config.ServerPath = "" ;
// Due to security issues with Apache modules, it is reccomended to leave the // Due to security issues with Apache modules, it is recommended to leave the
// following setting enabled. // following setting enabled.
Config.ForceSingleExtension = true ; Config.ForceSingleExtension = true ;
@@ -56,6 +57,11 @@
// (This feature works in MX 6.0 and above)) // (This feature works in MX 6.0 and above))
Config.HtmlExtensions = "html,htm,xml,xsd,txt,js" ; Config.HtmlExtensions = "html,htm,xml,xsd,txt,js" ;
//Due to known issues with GetTempDirectory function, it is
//recommended to set this vairiable to a valid directory
//instead of using the GetTempDirectory function
//(used by MX 6.0 and above)
Config.TempDirectory = GetTempDirectory();
// Configuration settings for each Resource Type // Configuration settings for each Resource Type
// //
@@ -64,7 +70,7 @@
// - DeniedExtensions: The extensions that won't be allowed. // - DeniedExtensions: The extensions that won't be allowed.
// If it is empty then no restrictions are done here. // If it is empty then no restrictions are done here.
// //
// For a file to be uploaded it has to fullfil both the AllowedExtensions // For a file to be uploaded it has to fulfill both the AllowedExtensions
// and DeniedExtensions (that's it: not being denied) conditions. // and DeniedExtensions (that's it: not being denied) conditions.
// //
// - FileTypesPath: the virtual folder relative to the document root where // - FileTypesPath: the virtual folder relative to the document root where
@@ -107,14 +113,14 @@
Config.QuickUploadPath["File"] = Config.FileTypesPath["File"] ; Config.QuickUploadPath["File"] = Config.FileTypesPath["File"] ;
Config.QuickUploadAbsolutePath["File"] = Config.FileTypesAbsolutePath["File"] ; Config.QuickUploadAbsolutePath["File"] = Config.FileTypesAbsolutePath["File"] ;
Config.AllowedExtensions["Image"] = "bmp,gif,jpeg,jpg,png,psd,tif,tiff" ; Config.AllowedExtensions["Image"] = "bmp,gif,jpeg,jpg,png" ;
Config.DeniedExtensions["Image"] = "" ; Config.DeniedExtensions["Image"] = "" ;
Config.FileTypesPath["Image"] = Config.UserFilesPath & 'image/' ; Config.FileTypesPath["Image"] = Config.UserFilesPath & 'image/' ;
Config.FileTypesAbsolutePath["Image"] = iif( Config.ServerPath eq "", de(""), de(Config.ServerPath & 'image/') ) ; Config.FileTypesAbsolutePath["Image"] = iif( Config.ServerPath eq "", de(""), de(Config.ServerPath & 'image/') ) ;
Config.QuickUploadPath["Image"] = Config.FileTypesPath["Image"] ; Config.QuickUploadPath["Image"] = Config.FileTypesPath["Image"] ;
Config.QuickUploadAbsolutePath["Image"] = Config.FileTypesAbsolutePath["Image"] ; Config.QuickUploadAbsolutePath["Image"] = Config.FileTypesAbsolutePath["Image"] ;
Config.AllowedExtensions["Flash"] = "swf,fla" ; Config.AllowedExtensions["Flash"] = "swf,flv" ;
Config.DeniedExtensions["Flash"] = "" ; Config.DeniedExtensions["Flash"] = "" ;
Config.FileTypesPath["Flash"] = Config.UserFilesPath & 'flash/' ; Config.FileTypesPath["Flash"] = Config.UserFilesPath & 'flash/' ;
Config.FileTypesAbsolutePath["Flash"] = iif( Config.ServerPath eq "", de(""), de(Config.ServerPath & 'flash/') ) ; Config.FileTypesAbsolutePath["Flash"] = iif( Config.ServerPath eq "", de(""), de(Config.ServerPath & 'flash/') ) ;

View File

@@ -1,7 +1,7 @@
<cfsetting enablecfoutputonly="Yes"> <cfsetting enablecfoutputonly="Yes">
<!--- <!---
* FCKeditor - The text editor for Internet - http://www.fckeditor.net * FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben * Copyright (C) 2003-2008 Frederico Caldeira Knabben
* *
* == BEGIN LICENSE == * == BEGIN LICENSE ==
* *
@@ -28,4 +28,5 @@
<cfinclude template="cf5_connector.cfm"> <cfinclude template="cf5_connector.cfm">
<cfelse> <cfelse>
<cfinclude template="cf_connector.cfm"> <cfinclude template="cf_connector.cfm">
</cfif> </cfif>
<cfabort>

View File

@@ -1322,4 +1322,3 @@
</cffunction> </cffunction>
</cfcomponent> </cfcomponent>

View File

@@ -1,7 +1,7 @@
<cfsetting enablecfoutputonly="Yes"> <cfsetting enablecfoutputonly="Yes">
<!--- <!---
* FCKeditor - The text editor for Internet - http://www.fckeditor.net * FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben * Copyright (C) 2003-2008 Frederico Caldeira Knabben
* *
* == BEGIN LICENSE == * == BEGIN LICENSE ==
* *
@@ -28,4 +28,4 @@
<cfinclude template="cf5_upload.cfm"> <cfinclude template="cf5_upload.cfm">
<cfelse> <cfelse>
<cfinclude template="cf_upload.cfm"> <cfinclude template="cf_upload.cfm">
</cfif> </cfif>

View File

@@ -1,7 +1,7 @@
[//lasso [//lasso
/* /*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net * FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben * Copyright (C) 2003-2008 Frederico Caldeira Knabben
* *
* == BEGIN LICENSE == * == BEGIN LICENSE ==
* *
@@ -51,8 +51,8 @@
), ),
'AllowedExtensions' = map( 'AllowedExtensions' = map(
'File' = array('7z','aiff','asf','avi','bmp','csv','doc','fla','flv','gif','gz','gzip','jpeg','jpg','mid','mov','mp3','mp4','mpc','mpeg','mpg','ods','odt','pdf','png','ppt','pxd','qt','ram','rar','rm','rmi','rmvb','rtf','sdc','sitd','swf','sxc','sxw','tar','tgz','tif','tiff','txt','vsd','wav','wma','wmv','xls','xml','zip'), 'File' = array('7z','aiff','asf','avi','bmp','csv','doc','fla','flv','gif','gz','gzip','jpeg','jpg','mid','mov','mp3','mp4','mpc','mpeg','mpg','ods','odt','pdf','png','ppt','pxd','qt','ram','rar','rm','rmi','rmvb','rtf','sdc','sitd','swf','sxc','sxw','tar','tgz','tif','tiff','txt','vsd','wav','wma','wmv','xls','xml','zip'),
'Image' = array('bmp','gif','jpeg','jpg','png','psd','tif','tiff'), 'Image' = array('bmp','gif','jpeg','jpg','png'),
'Flash' = array('swf','fla'), 'Flash' = array('swf','flv'),
'Media' = array('aiff','asf','avi','bmp','fla','flv','gif','jpeg','jpg','mid','mov','mp3','mp4','mpc','mpeg','mpg','png','qt','ram','rm','rmi','rmvb','swf','tif','tiff','wav','wma','wmv') 'Media' = array('aiff','asf','avi','bmp','fla','flv','gif','jpeg','jpg','mid','mov','mp3','mp4','mpc','mpeg','mpg','png','qt','ram','rm','rmi','rmvb','swf','tif','tiff','wav','wma','wmv')
), ),
'DeniedExtensions' = map( 'DeniedExtensions' = map(
@@ -62,4 +62,4 @@
'Media' = array() 'Media' = array()
) )
); );
] ]

View File

@@ -1,7 +1,7 @@
[//lasso [//lasso
/* /*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net * FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben * Copyright (C) 2003-2008 Frederico Caldeira Knabben
* *
* == BEGIN LICENSE == * == BEGIN LICENSE ==
* *
@@ -55,6 +55,65 @@
'uploadResult' = '0' 'uploadResult' = '0'
); );
/*.....................................................................
Custom tag sets the HTML response.
*/
define_tag(
'htmlreply',
-namespace='fck_',
-priority='replace',
-required='uploadResult',
-optional='NewFilePath',
-type='string',
-description='Sets the HTML response for the FCKEditor File Upload feature.'
);
$__html_reply__ = '\
<script type="text/javascript">
(function()
{
var d = document.domain ;
while ( true )
{
// Test if we can access a parent property.
try
{
var test = window.top.opener.document.domain ;
break ;
}
catch( e ) {}
// Remove a domain part: www.mytest.example.com => mytest.example.com => example.com ...
d = d.replace( /.*?(?:\\.|$)/, "" ) ;
if ( d.length == 0 )
break ; // It was not able to detect the domain.
try
{
document.domain = d ;
}
catch (e)
{
break ;
}
}
})() ;
';
if($uploadResult == '0' || $uploadResult == '201');
$__html_reply__ = $__html_reply__ + '\
window.parent.OnUploadCompleted(' + $uploadResult + ',\'' + $NewFilePath + '\',\'' + $NewFilePath->split('/')->last + '\');
</script>
';
else;
$__html_reply__ = $__html_reply__ + '\
window.parent.OnUploadCompleted(' + $uploadResult + ');
</script>
';
/if;
/define_tag;
/*..................................................................... /*.....................................................................
Calculate the path to the current folder. Calculate the path to the current folder.
@@ -63,9 +122,21 @@
var('currentFolderURL' = $ServerPath var('currentFolderURL' = $ServerPath
+ $config->find('Subdirectories')->find(action_param('Type')) + $config->find('Subdirectories')->find(action_param('Type'))
+ action_param('CurrentFolder') + $CurrentFolder
); );
if($CurrentFolder->(Find: '..') || $CurrentFolder->(Find: '\\'));
if($Command == 'FileUpload');
$responseType = 'html';
$uploadResult = '102';
fck_htmlreply(
-uploadResult=$uploadResult
);
else;
$errorNumber = 102;
$commandData += '<Error number="' + $errorNumber + '" />\n';
/if;
else;
/*..................................................................... /*.....................................................................
Build the appropriate response per the 'Command' parameter. Wrap the Build the appropriate response per the 'Command' parameter. Wrap the
@@ -110,6 +181,7 @@
Create a directory 'NewFolderName' within the 'Current Folder.' Create a directory 'NewFolderName' within the 'Current Folder.'
*/ */
case('CreateFolder'); case('CreateFolder');
$NewFolderName = (String_ReplaceRegExp: $NewFolderName, -find='\\.|\\\\|\\/|\\||\\:|\\?|\\*|"|<|>', -replace='_');
var('newFolder' = $currentFolderURL + $NewFolderName + '/'); var('newFolder' = $currentFolderURL + $NewFolderName + '/');
file_create($newFolder); file_create($newFolder);
@@ -148,7 +220,11 @@
/*......................................................... /*.........................................................
Was a file actually uploaded? Was a file actually uploaded?
*/ */
file_uploads->size ? $NewFile = file_uploads->get(1) | $uploadResult = '202'; if(file_uploads->size);
$NewFile = file_uploads->get(1);
else;
$uploadResult = '202';
/if;
if($uploadResult == '0'); if($uploadResult == '0');
/*..................................................... /*.....................................................
@@ -157,9 +233,11 @@
files. (Test.txt, Test(1).txt, Test(2).txt, etc.) files. (Test.txt, Test(1).txt, Test(2).txt, etc.)
*/ */
$NewFileName = $NewFile->find('OrigName'); $NewFileName = $NewFile->find('OrigName');
$NewFileName = (String_ReplaceRegExp: $NewFileName, -find='\\\\|\\/|\\||\\:|\\?|\\*|"|<|>', -replace='_');
$OrigFilePath = $currentFolderURL + $NewFileName; $OrigFilePath = $currentFolderURL + $NewFileName;
$NewFilePath = $OrigFilePath; $NewFilePath = $OrigFilePath;
local('fileExtension') = '.' + $NewFile->find('OrigExtension'); local('fileExtension') = '.' + $NewFile->find('OrigExtension');
#fileExtension = (String_ReplaceRegExp: #fileExtension, -find='\\\\|\\/|\\||\\:|\\?|\\*|"|<|>', -replace='_');
local('shortFileName') = $NewFileName->removetrailing(#fileExtension)&; local('shortFileName') = $NewFileName->removetrailing(#fileExtension)&;
@@ -191,31 +269,17 @@
case(0); case(0);
$OrigFilePath != $NewFilePath ? $uploadResult = 201; $OrigFilePath != $NewFilePath ? $uploadResult = 201;
case; case;
$uploadResult = '202'; $uploadResult = file_currenterror( -errorcode);
/select; /select;
/if; /if;
/if; /if;
fck_htmlreply(
-uploadResult=$uploadResult,
/*......................................................... -NewFilePath=$NewFilePath
Set the HTML response. );
*/
if($uploadResult == '0' || $uploadResult == '201');
$__html_reply__ = '\
<script type="text/javascript">
window.parent.frames[\'frmUpload\'].OnUploadCompleted(' + $uploadResult + ',\'' + $NewFilePath + '\',\'' + $NewFilePath->split('/')->last + '\');
</script>
';
else;
$__html_reply__ = '\
<script type="text/javascript">
window.parent.frames[\'frmUpload\'].OnUploadCompleted(' + $uploadResult + ');
</script>
';
/if;
/select; /select;
/inline; /inline;
/if;
/*..................................................................... /*.....................................................................
Send a custom header for xml responses. Send a custom header for xml responses.
@@ -234,24 +298,25 @@ Keep-Alive: timeout=15, max=98
Connection: Keep-Alive Connection: Keep-Alive
Content-Type: text/xml; charset=utf-8 Content-Type: text/xml; charset=utf-8
[//lasso [//lasso
/header; /header;
/*
/*................................................................. Set the content type encoding for Lasso.
Set the content type encoding for Lasso. */
*/
content_type('text/xml; charset=utf-8'); content_type('text/xml; charset=utf-8');
/*
/*................................................................. Wrap the response as XML and output.
Wrap the response as XML and output. */
*/
$__html_reply__ = '\ $__html_reply__ = '\
<?xml version="1.0" encoding="utf-8" ?> <?xml version="1.0" encoding="utf-8" ?>
<Connector command="' + $Command + '" resourceType="' + $Type + '"> <Connector command="' + $Command + '" resourceType="' + $Type + '">';
<CurrentFolder path="' + $CurrentFolder + '" url="' + $currentFolderURL + '" />
' + $commandData + ' if($errorNumber != '102');
</Connector> $__html_reply__ += '<CurrentFolder path="' + $CurrentFolder + '" url="' + $currentFolderURL + '" />';
'; /if;
$__html_reply__ += $commandData + '
</Connector>';
/if; /if;
] ]

View File

@@ -1,7 +1,7 @@
[//lasso [//lasso
/* /*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net * FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben * Copyright (C) 2003-2008 Frederico Caldeira Knabben
* *
* == BEGIN LICENSE == * == BEGIN LICENSE ==
* *
@@ -56,7 +56,6 @@
+ action_param('CurrentFolder') + action_param('CurrentFolder')
); );
/*..................................................................... /*.....................................................................
Custom tag sets the HTML response. Custom tag sets the HTML response.
*/ */
@@ -77,6 +76,36 @@
); );
$__html_reply__ = '\ $__html_reply__ = '\
<script type="text/javascript"> <script type="text/javascript">
(function()
{
var d = document.domain ;
while ( true )
{
// Test if we can access a parent property.
try
{
var test = window.top.opener.document.domain ;
break ;
}
catch( e ) {}
// Remove a domain part: www.mytest.example.com => mytest.example.com => example.com ...
d = d.replace( /.*?(?:\\.|$)/, "" ) ;
if ( d.length == 0 )
break ; // It was not able to detect the domain.
try
{
document.domain = d ;
}
catch (e)
{
break ;
}
}
})() ;
window.parent.OnUploadCompleted(' + #errorNumber + ',"' window.parent.OnUploadCompleted(' + #errorNumber + ',"'
+ string_replace(#fileUrl, -find='"', -replace='\\"') + '","' + string_replace(#fileUrl, -find='"', -replace='\\"') + '","'
+ string_replace(#fileName, -find='"', -replace='\\"') + '","' + string_replace(#fileName, -find='"', -replace='\\"') + '","'
@@ -85,6 +114,9 @@
'; ';
/define_tag; /define_tag;
if($CurrentFolder->(Find: '..') || $CurrentFolder->(Find: '\\'));
$errorNumber = 102;
/if;
if($config->find('Enabled')); if($config->find('Enabled'));
/*................................................................. /*.................................................................
@@ -94,7 +126,9 @@
/*............................................................. /*.............................................................
Was a file actually uploaded? Was a file actually uploaded?
*/ */
file_uploads->size ? $NewFile = file_uploads->get(1) | $errorNumber = 202; if($errorNumber != '102');
file_uploads->size ? $NewFile = file_uploads->get(1) | $errorNumber = 202;
/if;
if($errorNumber == 0); if($errorNumber == 0);
/*......................................................... /*.........................................................

View File

@@ -1,6 +1,6 @@
##### #####
# FCKeditor - The text editor for Internet - http://www.fckeditor.net # FCKeditor - The text editor for Internet - http://www.fckeditor.net
# Copyright (C) 2003-2007 Frederico Caldeira Knabben # Copyright (C) 2003-2008 Frederico Caldeira Knabben
# #
# == BEGIN LICENSE == # == BEGIN LICENSE ==
# #

View File

@@ -1,6 +1,6 @@
##### #####
# FCKeditor - The text editor for Internet - http://www.fckeditor.net # FCKeditor - The text editor for Internet - http://www.fckeditor.net
# Copyright (C) 2003-2007 Frederico Caldeira Knabben # Copyright (C) 2003-2008 Frederico Caldeira Knabben
# #
# == BEGIN LICENSE == # == BEGIN LICENSE ==
# #
@@ -91,6 +91,7 @@ sub CreateFolder
if($FORM{'NewFolderName'} ne "") { if($FORM{'NewFolderName'} ne "") {
$sNewFolderName = $FORM{'NewFolderName'}; $sNewFolderName = $FORM{'NewFolderName'};
$sNewFolderName =~ s/\.|\\|\/|\||\:|\?|\*|\"|<|>|[[:cntrl:]]/_/g;
# Map the virtual path to the local server path of the current folder. # Map the virtual path to the local server path of the current folder.
$sServerDir = &ServerMapFolder($resourceType, $currentFolder); $sServerDir = &ServerMapFolder($resourceType, $currentFolder);
if(-w $sServerDir) { if(-w $sServerDir) {
@@ -128,6 +129,7 @@ eval("use File::Copy;");
# Get the uploaded file name. # Get the uploaded file name.
$sFileName = $new_fname; $sFileName = $new_fname;
$sFileName =~ s/\\|\/|\||\:|\?|\*|\"|<|>|[[:cntrl:]]/_/g;
$sOriginalFileName = $sFileName; $sOriginalFileName = $sFileName;
$iCounter = 0; $iCounter = 0;
@@ -140,7 +142,16 @@ eval("use File::Copy;");
$sErrorNumber = '201'; $sErrorNumber = '201';
} else { } else {
copy("$img_dir/$new_fname","$sFilePath"); copy("$img_dir/$new_fname","$sFilePath");
chmod(0777,$sFilePath); if (defined $CHMOD_ON_UPLOAD) {
if ($CHMOD_ON_UPLOAD) {
umask(000);
chmod($CHMOD_ON_UPLOAD,$sFilePath);
}
}
else {
umask(000);
chmod(0777,$sFilePath);
}
unlink("$img_dir/$new_fname"); unlink("$img_dir/$new_fname");
last; last;
} }
@@ -158,8 +169,43 @@ sub SendUploadResults
local($sErrorNumber, $sFileUrl, $sFileName, $customMsg) = @_; local($sErrorNumber, $sFileUrl, $sFileName, $customMsg) = @_;
print "Content-type: text/html\n\n"; print <<EOF;
print '<script type="text/javascript">'; Content-type: text/html
<script type="text/javascript">
// Automatically detect the correct document.domain (#1919).
(function()
{
var d = document.domain ;
while ( true )
{
// Test if we can access a parent property.
try
{
var test = window.top.opener.document.domain ;
break ;
}
catch( e ) {}
// Remove a domain part: www.mytest.example.com => mytest.example.com => example.com ...
d = d.replace( /.*?(?:\\.|\$)/, '' ) ;
if ( d.length == 0 )
break ; // It was not able to detect the domain.
try
{
document.domain = d ;
}
catch (e)
{
break ;
}
}
})() ;
EOF
print 'window.parent.OnUploadCompleted(' . $sErrorNumber . ',"' . JS_cnv($sFileUrl) . '","' . JS_cnv($sFileName) . '","' . JS_cnv($customMsg) . '") ;'; print 'window.parent.OnUploadCompleted(' . $sErrorNumber . ',"' . JS_cnv($sFileUrl) . '","' . JS_cnv($sFileName) . '","' . JS_cnv($customMsg) . '") ;';
print '</script>'; print '</script>';
exit ; exit ;

View File

@@ -2,7 +2,7 @@
##### #####
# FCKeditor - The text editor for Internet - http://www.fckeditor.net # FCKeditor - The text editor for Internet - http://www.fckeditor.net
# Copyright (C) 2003-2007 Frederico Caldeira Knabben # Copyright (C) 2003-2008 Frederico Caldeira Knabben
# #
# == BEGIN LICENSE == # == BEGIN LICENSE ==
# #
@@ -101,7 +101,7 @@ sub DoResponse
} }
# Check for invalid folder paths (..) # Check for invalid folder paths (..)
if ( $sCurrentFolder =~ /\.\./ ) { if ( $sCurrentFolder =~ /(?:\.\.|\\)/ ) {
SendError( 102, "" ) ; SendError( 102, "" ) ;
} }
@@ -134,4 +134,3 @@ _HTML_HEAD_
exit ; exit ;
} }

View File

@@ -1,6 +1,6 @@
##### #####
# FCKeditor - The text editor for Internet - http://www.fckeditor.net # FCKeditor - The text editor for Internet - http://www.fckeditor.net
# Copyright (C) 2003-2007 Frederico Caldeira Knabben # Copyright (C) 2003-2008 Frederico Caldeira Knabben
# #
# == BEGIN LICENSE == # == BEGIN LICENSE ==
# #
@@ -87,9 +87,19 @@ sub CreateServerFolder
} }
} }
if(!(-e $folderPath)) { if(!(-e $folderPath)) {
umask(000); if (defined $CHMOD_ON_FOLDER_CREATE && !$CHMOD_ON_FOLDER_CREATE) {
mkdir("$folderPath",0777); mkdir("$folderPath");
chmod(0777,"$folderPath"); }
else {
umask(000);
if (defined $CHMOD_ON_FOLDER_CREATE) {
mkdir("$folderPath",$CHMOD_ON_FOLDER_CREATE);
}
else {
mkdir("$folderPath",0777);
}
}
return(0); return(0);
} else { } else {
return(1); return(1);

View File

@@ -2,7 +2,7 @@
##### #####
# FCKeditor - The text editor for Internet - http://www.fckeditor.net # FCKeditor - The text editor for Internet - http://www.fckeditor.net
# Copyright (C) 2003-2007 Frederico Caldeira Knabben # Copyright (C) 2003-2008 Frederico Caldeira Knabben
# #
# == BEGIN LICENSE == # == BEGIN LICENSE ==
# #
@@ -104,7 +104,7 @@ sub DoResponse
} }
# Check for invalid folder paths (..) # Check for invalid folder paths (..)
if ( $sCurrentFolder =~ /\.\./ ) { if ( $sCurrentFolder =~ /(?:\.\.|\\)/ ) {
SendError( 102, "" ) ; SendError( 102, "" ) ;
} }
@@ -115,4 +115,3 @@ sub DoResponse
} }
} }

View File

@@ -1,6 +1,6 @@
##### #####
# FCKeditor - The text editor for Internet - http://www.fckeditor.net # FCKeditor - The text editor for Internet - http://www.fckeditor.net
# Copyright (C) 2003-2007 Frederico Caldeira Knabben # Copyright (C) 2003-2008 Frederico Caldeira Knabben
# #
# == BEGIN LICENSE == # == BEGIN LICENSE ==
# #
@@ -28,6 +28,16 @@ $img_dir = './temp/';
# File size max(unit KB) # File size max(unit KB)
$MAX_CONTENT_SIZE = 30000; $MAX_CONTENT_SIZE = 30000;
# After file is uploaded, sometimes it is required to change its permissions
# so that it was possible to access it at the later time.
# If possible, it is recommended to set more restrictive permissions, like 0755.
# Set to 0 to disable this feature.
$CHMOD_ON_UPLOAD = 0777;
# See comments above.
# Used when creating folders that does not exist.
$CHMOD_ON_FOLDER_CREATE = 0755;
# Filelock (1=use,0=not use) # Filelock (1=use,0=not use)
$PM{'flock'} = '1'; $PM{'flock'} = '1';
@@ -124,9 +134,18 @@ eval("use File::Path;");
my ($FORM) = @_; my ($FORM) = @_;
if (defined $CHMOD_ON_FOLDER_CREATE && !$CHMOD_ON_FOLDER_CREATE) {
mkdir($img_dir,0777); mkdir("$img_dir");
chmod(0777,$img_dir); }
else {
umask(000);
if (defined $CHMOD_ON_FOLDER_CREATE) {
mkdir("$img_dir",$CHMOD_ON_FOLDER_CREATE);
}
else {
mkdir("$img_dir",0777);
}
}
undef $img_data_exists; undef $img_data_exists;
undef @NEWFNAMES; undef @NEWFNAMES;

View File

@@ -1,6 +1,6 @@
##### #####
# FCKeditor - The text editor for Internet - http://www.fckeditor.net # FCKeditor - The text editor for Internet - http://www.fckeditor.net
# Copyright (C) 2003-2007 Frederico Caldeira Knabben # Copyright (C) 2003-2008 Frederico Caldeira Knabben
# #
# == BEGIN LICENSE == # == BEGIN LICENSE ==
# #

View File

@@ -1,7 +1,7 @@
<?php <?php
/* /*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net * FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben * Copyright (C) 2003-2008 Frederico Caldeira Knabben
* *
* == BEGIN LICENSE == * == BEGIN LICENSE ==
* *
@@ -66,7 +66,7 @@ function CreateXmlFooter()
function SendError( $number, $text ) function SendError( $number, $text )
{ {
if ( isset( $GLOBALS['HeaderSent'] ) && $GLOBALS['HeaderSent'] ) if ( isset( $GLOBALS['HeaderSent'] ) && $GLOBALS['HeaderSent'] )
{ {
SendErrorNode( $number, $text ) ; SendErrorNode( $number, $text ) ;
CreateXmlFooter() ; CreateXmlFooter() ;
} }
@@ -78,9 +78,9 @@ function SendError( $number, $text )
echo '<?xml version="1.0" encoding="utf-8" ?>' ; echo '<?xml version="1.0" encoding="utf-8" ?>' ;
echo '<Connector>' ; echo '<Connector>' ;
SendErrorNode( $number, $text ) ; SendErrorNode( $number, $text ) ;
echo '</Connector>' ; echo '</Connector>' ;
} }
exit ; exit ;
@@ -90,4 +90,4 @@ function SendErrorNode( $number, $text )
{ {
echo '<Error number="' . $number . '" text="' . htmlspecialchars( $text ) . '" />' ; echo '<Error number="' . $number . '" text="' . htmlspecialchars( $text ) . '" />' ;
} }
?> ?>

Some files were not shown because too many files have changed in this diff Show More