Welcome to Geeklog, Anonymous Friday, November 08 2024 @ 08:47 pm EST

Geeklog Forums

HTMLAREA 2 - Installed fine but no story text on edits


Status: offline

aj

Forum User
Newbie
Registered: 07/16/04
Posts: 3
Hi,

I installed the HTMLAREA 2.x code and modified a test Geeklog (1.3.9 - latest) on my laptop.

Beautiful package and works great, except for one thing: Edited stories do not come up with the story text in the textarea.

When I turn off the HTMLAREA by changing the textarea reference in the JavaScript to some other name, then the story text loads fine, so it doesn't look like the template files and variables are at fault.

Any ideas? Would appreciate some clue as to what to look for - Want to use this neat tool on my site.

AJ
 Quote

Status: offline

tomw

Forum User
Full Member
Registered: 08/12/02
Posts: 300
Works fine for me. Check you code.
 Quote

Status: offline

aj

Forum User
Newbie
Registered: 07/16/04
Posts: 3
Hmmm.... I did - Perhaps a fragment of one of your working templates so I can compare against it?
 Quote

Status: offline

aj

Forum User
Newbie
Registered: 07/16/04
Posts: 3
Here is my code from the storyeditor.thtml file - I'm using the "clean" theme.

Here is the code I used for the textarea tags

<tr>
<td valign="top" align="right">{lang_introtext}:</td>
<td><textarea name="introtext" cols="65" rows="5" wrap="virtual">{story_introtext}
 Quote

Status: offline

tomw

Forum User
Full Member
Registered: 08/12/02
Posts: 300
cheerful
For HTMLAREA 2 see the package I put together at sourceforge.


For HTMLAREA 3 (easier) I use this code in the beggining of each template that I want the editor in.

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

Status: offline

destr0yr

Forum User
Full Member
Registered: 07/06/02
Posts: 324
The following is also using HTMLArea 3 with the SpellChecker plugin loaded (from CVS).
In your theme header.thtml add the following with in the head section.
Text Formatted Code

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

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


 

Then, for each editor that you want to replace, open the appropriate .thtml, such as /path/to/geeklog/layout/YOURLAYOUT/submit/submitstory.thtml, submitlink.thtml, commentform.thtml and add the following at the top of the file
Text Formatted Code

<script type="text/javascript">
HTMLArea.loadPlugin("SpellChecker");
HTMLArea.onload = function() {
var editor1 = new HTMLArea("editor1");
editor1.registerPlugin(SpellChecker);
editor1.generate();
};
HTMLArea.init();
</script>


 

Next, do a search for the textarea in that particular file and add id="editor1"
Text Formatted Code

<textarea id="editor1" name="introtext" ...


 

if you have two textareas in one file (such as admin/story/storyeditor.thtml) use the following and be sure to add id="editor2" to the second textarea field:
Text Formatted Code

<script type="text/javascript">
HTMLArea.loadPlugin("SpellChecker");
HTMLArea.onload = function() {
var editor1 = new HTMLArea("editor1");
editor1.registerPlugin(SpellChecker);
editor1.generate();
var editor2 = new HTMLArea("editor2");
editor2.registerPlugin(SpellChecker);
editor2.generate();
};
HTMLArea.init();
</script>


 

Good Luck.
-- destr0yr
"I love deadlines. I like the whooshing sound they make as they fly by." -- Douglas Adams
 Quote

Status: offline

samstone

Forum User
Full Member
Registered: 09/29/02
Posts: 820
HTMLArea 3 is my most favorite add on, especially with the ImageEditor plugin. You just need to dig a little bit in their support forum to refine it since it is a beta (RC) version. The author is busy with his wedding and has stopped working on it for the time being.

I recommend that you use version 3 rather than 2 because, like TomW said, it is much easier to make it work and more compatible.

It will be nice if GL 2.0 comes pre-install with it.

Sam

 Quote

Status: offline

inspiremin

Forum User
Regular Poster
Registered: 01/07/04
Posts: 111
I know I am a little slow about some of this . . .

I followed Tom's instructions to a 'T' and it still does not show up on storyeditor.thtml.

At least it is 'graceful' enough to not crash my system.

I placed /htmlarea/ in public_htm, but my GL sites are in subdirectories.

In the header script, I changed /htmlarea/ to the absolute url, in this case, http://www.inspireministries.com/htmlarea/.

Is this the screw-up, or am I missing something totally?

Appreciate any help you can give me.

Blessings!

inSPIREmin
www.Scripturetoolkit.com www.inSPIREministries.com
 Quote

Status: offline

inspiremin

Forum User
Regular Poster
Registered: 01/07/04
Posts: 111
Would someone who has htmlarea3 working on their site let me know where it is so I can go look at it?

Thanks!

Blessings!

inSPIREmin
www.Scripturetoolkit.com www.inSPIREministries.com
 Quote

Status: offline

seannyob

Forum User
Newbie
Registered: 11/29/04
Posts: 1
destr0yr,

I use
Text Formatted Code
_editor_url = "{site_url}/htmlarea/";
 . . .
<script type="text/javascript" src="{site_url}/htmlarea/htmlarea.js"></script>

 

...so that if i move the site later (for a different client, say) it'll port gracefully.

Quote by destr0yr:
Text Formatted Code

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

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




 
 Quote

Status: offline

sammykrupa

Forum User
Junior
Registered: 12/05/04
Posts: 28
http://www.geeklog.net/filemgmt/singlefile.php?lid=464
Sam Krupa
 Quote

All times are EST. The time is now 08:47 pm.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content