Jump to content
Sign in to follow this  
straider

HTMLArea v3.0

Recommended Posts

Having problems with htmlArea v2.02 wherby the following tag <?xml:namespace prefix = o /> is being added and it causes the error:

Parse error: parse error, unexpected ':' in .....

Exactly as in the thread here at htmlarea.com/forum .

 

Is v3.0 an update which might solve the problem? If not then can anyone explain how they have fixed it? The htmlarea.com forum thread says there's a function called editor_filterOutput, but I'm not sure what string to add there.

Share this post


Link to post
Share on other sites

You should install HTML Area 3.0


L8r,

PopTheTop

 

Published osC Contributions:

- eCheck Payment Module v3.1

- Reviews in Product Display v2.0

- Fancier Invoice & Packingslip v6.1

- Admin Notes / Customer Notes v2.2

- Customer Zip & State Validation v2.2

- Search Box with Dropdown Category Menu v1.0

 

Pop your camper's top today!

It's a popup thing...

You wouldn't understand

Share this post


Link to post
Share on other sites

Hello,

 

I have installed htmlarea and it worked fine til last sunday.

Suddenly I got script error and i don?t know why ....

I got no plugin for product description and no calendar.

I have described it here:

Error description

I have changed installation, the options in IE, the database but now i am at the end of my knowledge .

 

Anyone can help ?

 

 

greetings, Manfred (!)

Share this post


Link to post
Share on other sites

Hi

 

Problem with HTML Area

 

I have uploaded all the html area files to www.mysite.com/catalog/admin/htmlarea/

 

I have included the folowing text in admin/categories.php

 

<head>

<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">

<title><?php echo TITLE; ?></title>

<link rel="stylesheet" type="text/css" href="includes/stylesheet.css">

<script language="javascript" src="includes/general.js"></script>

<!-- Load HTMLArea Core Files. !-->

<script type="text/javascript" src="/catalog/admin/htmlarea/htmlarea.js"></script>

<script type="text/javascript" src="/catalog/admin/htmlarea/dialog.js"></script>

<script type="text/javascript" src="/catalog/admin/htmlarea/lang/en.js"></script>

 

<!-- Load HTMLArea Plugins. !-->

<script type="text/javascript">

HTMLArea.loadPlugin("TableOperations");

HTMLArea.loadPlugin("SpellChecker");

</script>

 

<!-- Load HTMLArea StyleSheet. !-->

<style type="text/css">

@import url(/catalog/admin/htmlarea/htmlarea.css);

</style>

</head>

<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF" onload="SetFocus();" onload="SetFocus(); HTMLArea.replaceAll()">

 

 

 

Problem is... I dont get an html editor in the text area on the admin/categories.php page.. just a plain text box

 

 

I am using IE 6 on win XP.. the examples in the distribution file work on my system.

Share this post


Link to post
Share on other sites

Move your htmlarea folder to this...

catalog/htmlarea

 

Then update all the paths to this:

@import url(/catalog/htmlarea/htmlarea.css);

 

<script type="text/javascript" src="/catalog/htmlarea/htmlarea.js"></script>

00380: <script type="text/javascript" src="/catalog/htmlarea/dialog.js"></script>

00381: <script type="text/javascript" src="/catalog/htmlarea/lang/en.js"></script>

00382:

00383: <script type="text/javascript" src="/catalog/htmlarea/popupwin.js"></script>

00384: <script type="text/javascript" src="/catalog/htmlarea/plugins/SpellChecker/spell-checker.js"></script>

00385: <script type="text/javascript" src="/catalog/htmlarea/plugins/SpellChecker/lang/en.js"></script>


L8r,

PopTheTop

 

Published osC Contributions:

- eCheck Payment Module v3.1

- Reviews in Product Display v2.0

- Fancier Invoice & Packingslip v6.1

- Admin Notes / Customer Notes v2.2

- Customer Zip & State Validation v2.2

- Search Box with Dropdown Category Menu v1.0

 

Pop your camper's top today!

It's a popup thing...

You wouldn't understand

Share this post


Link to post
Share on other sites

:thumbsup: Thanks for Straider contribution this fantastic tool.

At beginning, according to 4 steps, it did not work. Finally I do 2 changes as follows then it works!

 

1. In step 4, "htmlarea" folder should copy to <wwwroot>/htmlarea/ folder, not under <wwwroot>/catalog/htmlarea/ folder.

 

2. In htmlarea.js, find following code.

 

if (typeof _editor_url == "string") {

// Leave exactly one backslash at the end of _editor_url

_editor_url = _editor_url.replace(/\x2f*$/, '/');

} else {

alert("WARNING: _editor_url is not set! You should set this variable to the editor files path; it should preferably be an absolute path, like in '/htmlarea', but it can be relative if you prefer. Further we will try to load the editor files correctly but we'll probably fail.");

_editor_url = '';

}

 

remark alert and put /htmlarea/ in _editor_url like follows:

 

if (typeof _editor_url == "string") {

// Leave exactly one backslash at the end of _editor_url

_editor_url = _editor_url.replace(/\x2f*$/, '/');

} else {

// alert("WARNING: _editor_url is not set! You should set this variable to the editor files path; it should preferably be an absolute path, like in '/htmlarea', but it can be relative if you prefer. Further we will try to load the editor files correctly but we'll probably fail.");

_editor_url = '/htmlarea/';

}

 

My OSC info:

Web server: Apache/1.3.27 (Win32) PHP/4.3.3RC1

Database: MySQL 4.0.13-nt

OS: Chinese Windows XP Pro with SP2

OSC: 2.2-MS2

Share this post


Link to post
Share on other sites

Hi,

 

Great contribution !

 

Did anyone actually manage to set the cont. to apply to ONLY ONE textarea on a page instead of using HTMLArea.replaceAll()" ?

 

if so, i could really use your valued help!

 

Also, does anyone know how to set the default values? e.g. setting text size to start at 10, Arial etc etc... ?

 

Any help would be most appreciated.

 

Thank You,

 

Garry


Garry

Share this post


Link to post
Share on other sites

Hello,

 

Excellent mod. Thanks!

 

I think you should make afew changes to the install:

 

The additions are the use of the constant "DIR_WS_CATALOG" and the use of "HTMLArea.Config();":

 

    <!-- DWD Modify -> Add: HTMLArea v3.0 !-->
   <!-- Load HTMLArea Core Files. !-->
   <script type="text/javascript" src="<?php echo DIR_WS_CATALOG; ?>htmlarea/htmlarea.js"></script>
   <script type="text/javascript" src="<?php echo DIR_WS_CATALOG; ?>htmlarea/dialog.js"></script>
   <script type="text/javascript" src="<?php echo DIR_WS_CATALOG; ?>htmlarea/lang/en.js"></script>
   <!-- Load HTMLArea Config & Plugins. !-->
   <script type="text/javascript">
     <!--
     var config = new HTMLArea.Config();
     config.editorURL = '<?php echo DIR_WS_CATALOG; ?>htmlarea/';
     HTMLArea.loadPlugin("TableOperations");
     HTMLArea.loadPlugin("SpellChecker");
     //-->
   </script>

   <!-- Load HTMLArea StyleSheet. !-->
   <style type="text/css">
     @import url(<?php echo DIR_WS_CATALOG; ?>htmlarea/htmlarea.css);
   </style>
   <!-- DWD Modify End. !-->

 

 

Also, I was reading the forums at htmlarea.com and they day you can use something like this to get the plugins to work:

 

OPEN htmlarea.js

 

FIND

HTMLArea.replaceAll = function(config) {
var tas = document.getElementsByTagName("textarea");
for (var i = tas.length; i > 0; (HTMLAreaList[i] = new HTMLArea(tas[--i], config)).generate());
};

 

REPLACE WITH

HTMLArea.replaceAll = function(config) {
var tas = document.getElementsByTagName("textarea");
for (var i = tas.length; i > 0;) {
 editor = new HTMLArea(tas[--i], config);
 if (i == 1) {
	 editor.registerPlugin(CharacterMap);
	 editor.registerPlugin(SpellChecker);
 }
 editor.generate();
}
};

 

I couldnt get it to work but perhaps this will help someone who can.

 

 

Best regards,

Brett

Share this post


Link to post
Share on other sites

Hello,

 

Ok - got the plugins to work - YAY! :)

 

IN YOUR PAGES

 ? ?<!-- DWD Modify -> Add: HTMLArea v3.0 !-->
? ?<!-- Load HTMLArea Core Files. !-->
? ?<script type="text/javascript" src="<?php echo DIR_WS_CATALOG; ?>htmlarea/htmlarea.js"></script>
? ?<script type="text/javascript" src="<?php echo DIR_WS_CATALOG; ?>htmlarea/dialog.js"></script>
? ?<script type="text/javascript" src="<?php echo DIR_WS_CATALOG; ?>htmlarea/lang/en.js"></script>
? ?<!-- Load HTMLArea Config & Plugins. !-->
? ?<script type="text/javascript">
? ? ?<!--
? ? ?var _editor_url = '<?php echo DIR_WS_CATALOG; ?>htmlarea/';
? ? ?var config = new HTMLArea.Config();
? ? ?config.editorURL = '<?php echo DIR_WS_CATALOG; ?>htmlarea/';
? ? ?HTMLArea.loadPlugin("TableOperations");
? ? ?HTMLArea.loadPlugin("SpellChecker");
? ? ?//-->
? ?</script>

? ?<!-- Load HTMLArea StyleSheet. !-->
? ?<style type="text/css">
? ? ?@import url(<?php echo DIR_WS_CATALOG; ?>htmlarea/htmlarea.css);
? ?</style>
? ?<!-- DWD Modify End. !-->

 

 

IN htmlarea.js

 

REPLACE:

HTMLArea.replaceAll = function(config) {
var tas = document.getElementsByTagName("textarea");
for (var i = tas.length; i > 0; (HTMLAreaList[i] = new HTMLArea(tas[--i], config)).generate());
};

 

WITH:

HTMLArea.replaceAll = function(config) {
var tas = document.getElementsByTagName("textarea");
for (var i = tas.length; i > 0; --i) {
?editor = new HTMLArea(tas[--i], config);
?editor.registerPlugin("TableOperations");
?editor.registerPlugin("SpellChecker");
?editor.generate();
}
};

Edited by cornernote

Share this post


Link to post
Share on other sites
Ok - got the plugins to work - YAY!  :)

 

Well, they work... However... the HTML you generate from the WYSIWYG does not submit to the next page. DOH!

 

If there is a JS wiz looking at this then your help would be much appriciated.

Share this post


Link to post
Share on other sites
Well, they work... However... the HTML you generate from the WYSIWYG does not submit to the next page.  DOH!

 

If there is a JS wiz looking at this then your help would be much appriciated.

 

Ok - got it working. I will append it to the mod by Eric Ballweber and post it all to the contributions.

Share this post


Link to post
Share on other sites

Cornernote,

 

Having trouble getting your most recent version working (3.1.1 w/ modules).

 

Have uploaded the Htmlarea folder to 'catalog/manage/htmlarea/' and have created a folder called 'htmlarea' in both my 'catalog/images' folder and my 'catalog/manage/images' just in case.

 

Here's my relevant code:

<link rel="stylesheet" type="text/css" href="includes/stylesheet.css">
<?php include(DIR_FS_CATALOG . 'manage/htmlarea/htmlarea.php'); ?>
</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF" onload="HTMLArea.replaceAll(config);">
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>

and

<tr>
<td class="main"><?php echo tep_draw_textarea_field('file_contents', 'soft', '100%', '20', $file_contents, (($file_writeable) ? '' : 'readonly')); ?></td>

 

Any ideas? Do I have to change something in the htmlarea.js file? We i access the particular page (my Define_mainpage in my manage directory), i get no errors...just a standard text entry box without the HTML menu.

Share this post


Link to post
Share on other sites

I installled this fine, but I want to be able to use

 

tep_href in the html description of a product so that I can include a link to another part of my site.

 

How Can I use php code with this?

 

or should I just remove it completely?

Share this post


Link to post
Share on other sites

Why not just make a direct HTML link in the description?

 

Example: <a href="../catalog/xxx">LINK TEXT or PIC</a>


L8r,

PopTheTop

 

Published osC Contributions:

- eCheck Payment Module v3.1

- Reviews in Product Display v2.0

- Fancier Invoice & Packingslip v6.1

- Admin Notes / Customer Notes v2.2

- Customer Zip & State Validation v2.2

- Search Box with Dropdown Category Menu v1.0

 

Pop your camper's top today!

It's a popup thing...

You wouldn't understand

Share this post


Link to post
Share on other sites

I installed the html area to my orders.php page where I use the 'comments' section extensively. I got the wsywig installed, but after clicking update, my return message says 'No Update submitted' and in return no new text is posted and no update email is sent from orders.php.

 

Ideally, I want this script to post clickable links inside of orders.php.

 

Any help?

 

thx,

 

Eric

Share this post


Link to post
Share on other sites

Hello All, I have been trying to get the HTMLarea 3 contribution to work on my oscommerce, I downloaded and copied the entire HTMLarea folder into my admin folder, then made a "htmlarea" folder in catalogue/images and set to CHMOD 777 as required.

 

Editing categories.php I have added this:

 

<script type="text/javascript">
 _editor_url = "/htmlarea/";
 _editor_lang = "en";
 </script>
 <script type="text/javascript" src="/htmlarea/htmlarea.js"></script>
<script type="text/javascript" defer="1">
  HTMLArea.replaceAll();
</script>

 

 

I have also tried _editor_url = "admin/htmlarea/";

 

It simply does not appear when I try to edit products etc, what am I doing wrong?

 

Andy

Share this post


Link to post
Share on other sites
It simply does not appear when I try to edit products etc, what am I doing wrong?

 

Andy

 

 

Hello.

I have the same problem

I've tried several times installing this, and I couldn't see the HTML AREA ever...

 

I gave up doing this... until someone has made some changes to the contribution...

Edited by sitespt

Share this post


Link to post
Share on other sites

Make some cahnges to the path it calls for the /htmlarea/ folder. I had to do this and then it began to work.

 

Try...

 

/htmlarea/

htmlarea/

../htmlarea/

./htmlarea/

../catalog/htmlarea/

/catalog/htmlarea/

 

Get the idea?


L8r,

PopTheTop

 

Published osC Contributions:

- eCheck Payment Module v3.1

- Reviews in Product Display v2.0

- Fancier Invoice & Packingslip v6.1

- Admin Notes / Customer Notes v2.2

- Customer Zip & State Validation v2.2

- Search Box with Dropdown Category Menu v1.0

 

Pop your camper's top today!

It's a popup thing...

You wouldn't understand

Share this post


Link to post
Share on other sites

Now that I think of it, I actually had to make a duplicate copy of the /htmlarea/ folder. one in the root and one in the admin folder.


L8r,

PopTheTop

 

Published osC Contributions:

- eCheck Payment Module v3.1

- Reviews in Product Display v2.0

- Fancier Invoice & Packingslip v6.1

- Admin Notes / Customer Notes v2.2

- Customer Zip & State Validation v2.2

- Search Box with Dropdown Category Menu v1.0

 

Pop your camper's top today!

It's a popup thing...

You wouldn't understand

Share this post


Link to post
Share on other sites
Now that I think of it, I actually had to make a duplicate copy of the /htmlarea/ folder. one in the root and one in the admin folder.

 

I am still plugging away trying to get this sorted, I am wondering if I am inserting the code in the right place in the categories.php file, I know nothing about php code but it looks in my editor that scripts have a grey background to highlight them, what I am typing has white background, or some places I put it the 1st part i.e.

<script type="text/javascript">
  _editor_url = "/htmlarea/";
  _editor_lang = "en";
</script>

has a grey background but the other 2 lines are white still..... looks odd

 

Andy

Share this post


Link to post
Share on other sites

OK, I have now modified the code as follows:

<script language="JavaScript"
<script type="text/javascript">
  _editor_url = "/catalog/admin/htmlarea/";
  _editor_lang = "en";
</script>
<script language="JavaScript"
<script type="text/javascript" src="/htmlarea/htmlarea.js"></script>
<script language="JavaScript"
<script type="text/javascript" defer="1">
   HTMLArea.replaceAll();
</script>

 

I am at least getting something different, when loading the categories.php in the admin all loads as normal (still no HTMLarea) but I have a script error "HTMLarea not defined" on line 151

Line 151 is:

$product_categories_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_TO_CATEGORIES . " where products_id = '" . (int)$product_id . "'");

 

Does this give anyone any clues?

 

Cheers

 

Andy

Share this post


Link to post
Share on other sites

I really like the code you modified, and applied it to the description field in the product info page in Admin. It works great! Unfortunately, I assumed it work work for the other text fields in the page, only to discover that they aren't text fields at all, but are "input fields."

 

How can I apply your code to these input fields, to convert them to HTMLAREA fields?

 

 

Thanks,

 

 

Rob

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×