| verzia 1.5, 2003/11/20 11:53:05 |
verzia 1.6, 2003/12/30 18:13:09 |
|
|
| * http://platon.sk/projects/phpMyEdit/ |
* http://platon.sk/projects/phpMyEdit/ |
| */ |
*/ |
| |
|
| /* $Platon: phpMyEdit/extensions/phpMyEdit-htmlarea.class.php,v 1.4 2003/11/20 11:52:30 nepto Exp $ */ |
/* $Platon: phpMyEdit/extensions/phpMyEdit-htmlarea.class.php,v 1.5 2003/11/20 11:53:05 nepto Exp $ */ |
| |
|
| /* |
/* |
| OVERVIEW |
OVERVIEW |
| -------- |
-------- |
| |
|
| htmlArea is a free WYSIWYG textarea replacement from |
htmlArea is a free WYSIWYG textarea replacement from |
| http://www.interactivetools.com/ website. |
http://www.interactivetools.com/ website. |
| |
|
| REQUIREMENTS |
REQUIREMENTS |
| ------------ |
------------ |
| |
|
| The extension requires a properly installed htmlArea script |
The extension requires a properly installed htmlArea script |
| as described on the http://www.interactivetools.com/ site. |
as described on the http://www.interactivetools.com/ site. |
| |
|
| USAGE |
USAGE |
| ----- |
----- |
| |
|
| This extension enables WYSIWYG editing of a textarea field. |
This extension enables WYSIWYG editing of a textarea field. |
| In order to use it, you should: |
In order to use it, you should: |
| |
|
| 1. Load htmlArea script in the <head>...</head> section of your |
1. Load htmlArea script in the <head>...</head> section of your |
| phpMyEdit calling program as described in the htmlarea manual. |
phpMyEdit calling program as described in the htmlarea manual. |
| |
|
| NOTE: To avoid an unwanted side effect in css style produced |
NOTE: To avoid an unwanted side effect in css style produced |
| by phpMyEditSetup.php, delete 'table-width:100%' property. |
by phpMyEditSetup.php, delete 'table-width:100%' property. |
| |
|
| 2. Call to phpMyEdit-htmlarea.class.php instead |
2. Call to phpMyEdit-htmlarea.class.php instead |
| of phpMyEdit.class.php. |
of phpMyEdit.class.php. |
| |
|
| Example: |
Example: |
| |
|
| require_once 'extensions/phpMyEdit-htmlarea.class.php'; |
require_once 'extensions/phpMyEdit-htmlarea.class.php'; |
| new phpMyEdit-htmlarea($opts); |
new phpMyEdit_htmlarea($opts); |
| |
|
| 3. Add 'html'=>true parameter to the textarea field definition |
3. Add 'html'=>true parameter to the textarea field definition |
| in your phpMyEdit calling program. |
in your phpMyEdit calling program. |
| |
|
| Example: |
Example: |
| |
|
| $opts['fdd']['body'] = array( |
$opts['fdd']['col_name'] = array( |
| 'name' => 'Content', |
'name' => 'Column', |
| 'select' => 'T', |
'select' => 'T', |
| 'options' => 'ACPVD', |
'options' => 'ACPVD', |
| 'maxlen' => 65535, |
'required' => true, |
| 'required' => true, |
'textarea' => array( |
| 'textarea' => array( |
'html' => true, |
| 'html' => true, |
'rows' => 11, |
| 'rows' => 11, |
'cols' => 81) |
| 'cols' => 81) |
); |
| ); |
|
| |
SEARCH KEYWORD |
| |
-------------- |
| |
|
| |
Search for "htmlArea" string in this source code, |
| |
to find all extension related modifications. |
| */ |
*/ |
| |
|
| require_once dirname(__FILE__).'/../phpMyEdit.class.php'; |
require_once dirname(__FILE__).'/../phpMyEdit.class.php'; |
| Riadok 116 class phpMyEdit_htmlearea extends phpMyE |
|
| Riadok 121 class phpMyEdit_htmlearea extends phpMyE |
|
| } |
} |
| echo '>',htmlspecialchars($this->fdd[$k]['default']),'</textarea>',"\n"; |
echo '>',htmlspecialchars($this->fdd[$k]['default']),'</textarea>',"\n"; |
| |
|
| //EK code modification is here |
// EK htmlArea code modification is here |
| if (isset($this->fdd[$k]['textarea']['html'])) { |
if (isset($this->fdd[$k]['textarea']['html'])) { |
| echo '<script language="javascript1.2">editor_generate("'; |
echo '<script type="text/javascript" language="javascript1.2"><!--',"\n"; |
| echo $this->fds[$k]; |
echo 'editor_generate("',$this->fds[$k],'");',"\n"; |
| echo '");</script>'; |
echo '// --></script>'; |
| } |
} |
| |
|
| |
|
| } else { |
} else { |
| // Simple edit box required |
// Simple edit box required |
| $size_ml_props = ''; |
$size_ml_props = ''; |
| Riadok 173 class phpMyEdit_htmlearea extends phpMyE |
|
| Riadok 176 class phpMyEdit_htmlearea extends phpMyE |
|
| } |
} |
| echo '>',htmlspecialchars($row["qf$k"]),'</textarea>',"\n"; |
echo '>',htmlspecialchars($row["qf$k"]),'</textarea>',"\n"; |
| |
|
| //EK code modification here |
// EK htmlArea code modification is here |
| if (isset($this->fdd[$k]['textarea']['html'])) { |
if (isset($this->fdd[$k]['textarea']['html'])) { |
| echo '<script language="javascript1.2">editor_generate("'; |
echo '<script type="text/javascript" language="javascript1.2"><!--',"\n"; |
| echo $this->fds[$k]; |
echo 'editor_generate("',$this->fds[$k],'");',"\n"; |
| echo '");</script>'; |
echo '// --></script>'; |
| } |
} |
| |
|
| } else { |
} else { |
| $size_ml_props = ''; |
$size_ml_props = ''; |
| $maxlen = intval($this->fdd[$k]['maxlen']); |
$maxlen = intval($this->fdd[$k]['maxlen']); |