Welcome to Geeklog, Anonymous Wednesday, November 27 2024 @ 03:37 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
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
18
13
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}
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}
12
12
Quote
For HTMLAREA 2 see the package I put together at sourceforge.
_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>
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>
13
15
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.
<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
<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"
<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:
<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
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
13
7
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
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
13
13
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
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
16
19
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
Thanks!
Blessings!
inSPIREmin
www.Scripturetoolkit.com www.inSPIREministries.com
13
12
Quote
Status: offline
seannyob
Forum User
Newbie
Registered: 11/29/04
Posts: 1
destr0yr,
I use
. . .
<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.
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:
<script type="text/javascript">
_editor_url = "/htmlarea/";
_editor_lang = "en";
</script>
<script type="text/javascript" src="/htmlarea/htmlarea.js"></script>
Text Formatted Code
<script type="text/javascript">
_editor_url = "/htmlarea/";
_editor_lang = "en";
</script>
<script type="text/javascript" src="/htmlarea/htmlarea.js"></script>
15
14
Quote
Status: offline
sammykrupa
Forum User
Junior
Registered: 12/05/04
Posts: 28
http://www.geeklog.net/filemgmt/singlefile.php?lid=464
Sam Krupa
Sam Krupa
15
15
Quote
All times are EST. The time is now 03:37 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