htmlArea

A directory of browser-based WYSIWYG editors

  MAIN
INDEX
SEARCH
POSTS
WHO'S
ONLINE
LOG
IN

Home: htmlArea 3 (beta): htmlArea 2 & 3 archive (read only): htmlArea v3.0 - Discussion:
HTMLArea3 install and Firefox


The htmlArea 2 & 3 editors have been discontinued.

We've made these forums available as a read-only reference and knowledge-base for people using or developing editors based on htmlArea 2 or 3.

Anyone who is interested in taking over version 2 or 3 is free to do so. All we ask is that you choose a new name that doesn't have "htmlarea" in it to avoid confusion with this site. We'll even give you a link in the directory to make it easier for people to find you. If you are developing or hosting an htmlArea based-editor under a new name, please submit it to our directory.

 


kindley
New User

Dec 20, 2004, 8:49 PM

Post #1 of 5 (5646 views)
Shortcut
HTMLArea3 install and Firefox Can't Post

Sorry if this question is repetitious, but I'm exhausted and haven't found anything yet.

I am using Mambo want to switch to the Firefox browser. When I try to edit content in Firefox, I get a plain text box instead of HTMLarea.

So, I tried downloading and installing HTMLArea3. No change. So, my questions:

1. Does HTMLArea work with any browser other than IE6?
2. If so, does anyone have any idea why my install fails?

I have installed several ways:

- Using HTML3xtd normal via the install compontents route.
- 'raw' by uploading HTML3 files to the editor folder

And various permutations of above.

Nada. Nor do I see anything different when I enter via IE6.


iamdecal
Novice

Dec 21, 2004, 3:14 AM

Post #2 of 5 (5616 views)
Shortcut
Re: [kindley] HTMLArea3 install and Firefox [In reply to] Can't Post

yes - it works just fine in firefox,

my first question is though - how is the editor being init 'd - its a different method between vs 2 & 3 , it might be worth downloading the cvs version or RC1 and seeing if it looks the same method.

do you get any js errors ? i know its in your admin area so its going to be locked down, but could you post the code for us to look at ?

(sorry if im sounding patronising - its hard to judge someones ability from a forum post)


kindley
New User

Dec 21, 2004, 12:56 PM

Post #3 of 5 (5580 views)
Shortcut
Re: [iamdecal] HTMLArea3 install and Firefox [In reply to] Can't Post

1. I've done the cvs version too. In fact, all shapes and varieties of 1,2, and 3, including 3xtd and now the HTMLArea-4.0-rc1. Ditto on all.

2. No JS errors.

I believe the problem is that it determines browser type and defaults to a plain text box. I tried just calling the htmleditor from outside Mambo and that works. E.g., (http://www.dynarch.com/demos/htmlarea/examples/fully-loaded.html)

But nothing I can do to install it in Mambo works - either the standard components (HTMLarea3_xtd) or any of the other HTMLarea releases. I am not sure how the browser detection and triggering mechanism works (e.g., in the file below) and am loathe to tear into it. I want to make the transition to Firefox, but this is holding me up.

Here is the code from htmlarea3_xtd.php (the file one places [usually] in the editor folder.


Code
 
<?php
// $Id: editor.htmlarea3_xtd.php, v 1.0 2004/04/19 16:23:28 bpfeifer Exp $
/**
* Advanced Handler for HTMLAarea3 XTD
* @package HTMLAarea3 XTD
* @Copyright © 2004 Bernhard Pfeifer aka novocaine
* @ All rights reserved
* @ Released under GNU/GPL License : http://www.gnu.org/copyleft/gpl.html
* @version $Revision: 1.0 $
**/


defined( '_VALID_MOS' ) or die( 'Direct access to this location is not allowed!' );

$_MAMBOTS->registerFunction( 'onInitEditor', 'botHTMLArea3_XTDEditorInit' );
$_MAMBOTS->registerFunction( 'onGetEditorContents', 'botHTMLArea3_XTDEditorGetContents' );
$_MAMBOTS->registerFunction( 'onEditorArea', 'botHTMLArea3_XTDEditorArea' );

function botHTMLArea3_XTDEditorInit() {
global $mosConfig_live_site, $database;
$query = "SELECT id FROM #__mambots WHERE element = 'htmlarea3_xtd' AND folder = 'editors'";
$database->setQuery( $query );
$id = $database->loadResult();
$mambot = new mosMambot( $database );
$mambot->load( $id );
$params =& new mosParameters( $mambot->params );

?>
<script type="text/javascript">
<!--
_editor_url = "<?php echo $mosConfig_live_site; ?>/editor/htmlarea3_xtd/";
<?php
$language = $params->get( 'language', 'en' );
?>
_editor_lang = "<?php echo $language?>";
//-->
</script>
<script type="text/javascript" src="<?php echo $mosConfig_live_site; ?>/editor/htmlarea3_xtd/htmlarea_xtd.js"></script>
<script type="text/javascript" src="<?php echo $mosConfig_live_site; ?>/editor/htmlarea3_xtd/dialog.js"></script>
<script type="text/javascript" src="<?php echo $mosConfig_live_site; ?>/editor/htmlarea3_xtd/lang/<?php echo $language?>.js"></script>
<style type="text/css">@import url(<?php echo $mosConfig_live_site; ?>/editor/htmlarea3_xtd/htmlarea.css)</style>
<script type="text/javascript">
<!--
// load the plugin files
<?php
if( $params->get( 'tableoperations', '0' ) ) {
?>
HTMLArea.loadPlugin("TableOperations");
<?php
}
if( $params->get( 'phpspell', '0' ) ) {
?>
HTMLArea.loadPlugin("PhpSpell");
<?php
}
if( $params->get( 'enterparagraphs', '0' ) ) {
?>
HTMLArea.loadPlugin("EnterParagraphs");
<?php
}
if( $params->get( 'contextmenu', '0' ) ) {
?>
HTMLArea.loadPlugin("ContextMenu");
<?php
}
if( $params->get( 'css', '0' ) ) {
?>
HTMLArea.loadPlugin("CSS");
<?php
}
if( $params->get( 'insertsmiley', '0' ) ) {
?>
HTMLArea.loadPlugin("InsertSmiley");
<?php
}
?>
var editor = null;
//-->
</script>
<?php
}

function botHTMLArea3_XTDEditorArea( $name, $content, $hiddenField, $width, $height, $col, $row ) {
global $database, $mosConfig_live_site;
$database->setQuery( "SELECT template FROM #__templates_menu WHERE client_id='0' AND menuid='0'" );
$template = $database->loadResult();
$query = "SELECT id FROM #__mambots WHERE element = 'htmlarea3_xtd' AND folder = 'editors'";
$database->setQuery( $query );
$id = $database->loadResult();
$mambot = new mosMambot( $database );
$mambot->load( $id );
$params =& new mosParameters( $mambot->params );
?>
<textarea name="<?php echo $hiddenField; ?>" id="<?php echo $hiddenField; ?>" cols="<?php echo $col; ?>" rows="<?php echo $row; ?>" style="width:<?php echo $width; ?>; height:<?php echo $height; ?>"><?php echo $content; ?></textarea>
<script language="JavaScript1.2" defer="defer">
<!--
// build a style for the spellchecker
_phpspell_mystyle = "<link rel=\"stylesheet\" href=\"<?php echo $mosConfig_live_site; ?>/templates/<?php echo $template; ?>/css/template_css.css\" type=\"text/css\" />";
// create the editor
var editor<?php echo $name ?> = new HTMLArea("<?php echo $hiddenField ?>");

// retrieve the config object
var config<?php echo $name ?> = editor<?php echo $name ?>.config;
config<?php echo $name ?>.pageStyle='@import url(<?php echo $mosConfig_live_site ."/templates/". $template ."/css/template_css.css";?>);'
config<?php echo $name ?>.sizeIncludesToolbar = false;
config<?php echo $name ?>.height = "300px";
config<?php echo $name ?>.width = "625px";

config<?php echo $name ?>.registerButton({
id : "mosimage",
tooltip : "Insert {mosimage} tag",
image : _editor_url + "images/ed_mos_image.gif",
textMode : false,
action : function(editor<?php echo $name ?>, id) {
editor<?php echo $name ?>.focusEditor();
editor<?php echo $name ?>.insertHTML('{mosimage}');
}
});

config<?php echo $name ?>.registerButton({
id : "mospagebreak",
tooltip : "Insert {mospagebreak} tag",
image : _editor_url + "images/ed_mos_pagebreak.gif",
textMode : false,
action : function(editor<?php echo $name ?>, id) {
editor<?php echo $name ?>.focusEditor();
editor<?php echo $name ?>.insertHTML('{mospagebreak}');
}
});

config<?php echo $name ?>.toolbar = [
[ "fontname", "space",
"fontsize", "space",
"formatblock", "space",
"bold", "italic", "underline", "separator",
"strikethrough", "subscript", "superscript", "separator",
"createlink", "mosimage", "mospagebreak", "separator", "htmlmode" ],

[ "justifyleft", "justifycenter", "justifyright", "justifyfull", "separator",
"insertorderedlist", "insertunorderedlist", "outdent", "indent", "separator",
"forecolor", "hilitecolor", "space", "textindicator", "space", "removeformat", "separator", "undo", "redo" ],

[ "inserthorizontalrule", "insertcharacter", "insertimage", "insertfile", "separator",
"inserttable", "toggleborders", "separator", "cut", "copy", "paste", "separator",
"killword", "separator", "popupeditor" ],
];

<?php
if( $params->get( 'tableoperations', '0' ) ) {
?>
editor<?php echo $name ?>.registerPlugin(TableOperations);
<?php
}
if( $params->get( 'phpspell', '0' ) ) {
?>
editor<?php echo $name ?>.registerPlugin(PhpSpell);
<?php
}
if( $params->get( 'enterparagraphs', '0' ) ) {
?>
editor<?php echo $name ?>.registerPlugin(EnterParagraphs);
<?php
}
if( $params->get( 'contextmenu', '0' ) ) {
?>
editor<?php echo $name ?>.registerPlugin(ContextMenu);
<?php
}
if( $params->get( 'css', '0' ) ) {
?>
editor<?php echo $name ?>.registerPlugin(CSS, {
combos : [ { label: "CSS Styles:",
// 6 standard Mambo CSS template classes contained
// add your own CSS classes like this (but leave [None selected] for removal of classes)
// "Class name to be shown in the drop down": "name of the class like typed in your CSS file",
// Note: you mustn't put a comma to the last line!
options: { "[None selected]": "",
"Small": "small",
"Small Dark": "smalldark",
"Contentheading": "contentheading",
"Componentheading": "componentheading",
"Moscode": "moscode",
"Message": "message"
}
} ]
}
);
<?php
}
if( $params->get( 'insertsmiley', '0' ) ) {
?>
editor<?php echo $name ?>.registerPlugin(InsertSmiley);
<?php
}
if ($name != "editor2") {
?>
HTMLArea.agt = navigator.userAgent.toLowerCase();
HTMLArea.is_gecko = (navigator.product == "Gecko");


if (HTMLArea.is_gecko) {
setTimeout('editor<?php echo $name ?>.generate("<?php echo $hiddenField ?>")', 3000); // Mozilla needs a rest here, especially on Mac OS
} else {
editor<?php echo $name ?>.generate('<?php echo $hiddenField ?>');
}

<?php
} else if ($name == "editor2") {
?>
editor<?php echo $name ?>.generate('<?php echo $hiddenField ?>');
<?php
}
?>

//-->
</script>
<?php
}
function botHTMLArea3_XTDEditorGetContents( $editorArea, $hiddenField ) {
}
?>


iamdecal
Novice

Dec 22, 2004, 2:27 AM

Post #4 of 5 (5524 views)
Shortcut
Re: [kindley] HTMLArea3 install and Firefox [In reply to] Can't Post

>>>>HTMLArea-4.0-rc1.

what? where ? when?

i cant see the problem, however as it happens i'm just about to do a mambo install, i'll let you know of any problems i get an how(if) i reslove them.


kindley
New User

Dec 22, 2004, 12:25 PM

Post #5 of 5 (5468 views)
Shortcut
Re: [iamdecal] HTMLArea3 install and Firefox [In reply to] Can't Post

Found my problem. I thought I had Mambo 4.5.1 installed, but it was actually 4.5. I installed the correct version and it worked.

Strange, because the 4.5.1 version did work in IE6, so I wasn't clued into the version incompatibility.

html4 is the zip file name - it actually contains html3 rc1.

Thanks for your patience!!

 
 
 


Search for (options)