Welcome, Guest. Please login or register.
Did you miss your activation email?


Login with username, password and session length

Search

 
Advanced search

8026 Posts in 1851 Topics- by 2099 Members - Latest Member: roi
Pages: [1] 2 3   Go Down
Print
Author Topic: WYSIWYG input area  (Read 2027 times)
0 Members and 1 Guest are viewing this topic.
ben
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« on: August 28, 2002, 10:28:00 AM »

Hi Guys, if you haven't seen it already, go to
http://www.interactivetools.com/products/htmlarea/

which lets you change any textarea field to a WYSIWYG editor field by adding a few bits of code to the page.

I'm trying to mod the Add Field page to include an extra Input type of WYSIWYG, which will then include the necessary code to the Add Events page to bring up the htmlarea field.
However, it's a bit more tricky than I thought, so I wondered if anyone has any pointers to which file(s) I should be looking in - I guess its somewhere in the admin templates, or should I be looking in calendar_admin itself?

Ben.

Logged
ben
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« Reply #1 on: August 28, 2002, 12:19:00 PM »

OK, well I've figured out what to change, there's a bit in DBFileUtil.INC, a bit in add_edit_event.html and a bit in add_edit_field.html

Unfortunately I have discovered that the WYSIWYG bit chokes on underscores in a TEXTAREA name - and the format in calendarscript is FIELD_<fieldname>.

Hmm, well when I've figured out a way round it I'll post back with the modified files so everyone can have funky field editing in their calendars!

Ben.

------------------

Logged
ben
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« Reply #2 on: August 29, 2002, 06:02:00 AM »

Right the nice chaps at InteractiveTools have patched their htmlarea program to work with underscores.

First of all you should download V1.05 from: http://www.interactivetools.com/products/htmlarea/

and install in the document root of your site (if you put it somewhere else you'll have to make a couple of mods to the scripts in my zip file).

Then download the three modified Calendarscript files from: http://www.willcoxonline.com/cs-htmlarea/cs-htmlarea.zip

and copy these into your calendarscript directory, overwriting the existing ones(after backing them up of course!) I have preserved the directory structure in the zip so you know where they go.


And thats it! In the Customise Event Fields screen the Input Type box now has WYSIWYG as an option. If you set a field with this option and go to the Add/Modify Event page you will get a graphical HTML editor so you can bold, underline, justify etc etc. Note: it will only work with IE 5.5 and above (see the htmlarea docs). Oh, and make sure you've allowed HTML in in the Admin/Calendar Settings screen.

Have fun,

Ben.

------------------

Logged
Oliver
New Member
*

Karma: 0
Offline Offline

Posts: 0

web designer


WWW
« Reply #3 on: September 01, 2002, 07:07:00 PM »

Hi, a bit off topic, but I got there from the link to that html area thing:

One of my prospective customers is managing about 25 bands right now. He'd like to be able to not only update a calendar, but also add/delete pages, change page content (text+images, maybe link to soundfiles later on). And all that w/o knowing or wanting to know html. He also can't afford to have all updating and editing done by me, so he's looking for a sollution that would allow him to do just that, log in, and change/add/delete pages and their content.

Would this be the right program? Or their page publisher?


Anybody got any other ideas/links? Anything pointing me in a good direction is very appreciated!

Thanks!
Oliver

------------------

Logged
Kriis
New Member
*

Karma: 0
Offline Offline

Posts: 0


« Reply #4 on: January 16, 2003, 05:35:00 PM »

I am trying to add this to my calendar but it doesn't seem to be working. Does this not work with the lates version of HTMLarea?

------------------

Logged

Kriis
beneath_the_ashes
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« Reply #5 on: January 16, 2003, 11:42:00 PM »

i got the editor working perfectly...however, when i go to search, for the feild that i wanted the editor on, it says:

Invalid input type: 'wysiwyg'!

Any thoughts?

thanks
ryan

------------------

Logged
TubaDave
New Member
*

Karma: 0
Offline Offline

Posts: 0

Student


WWW
« Reply #6 on: January 17, 2003, 08:21:00 AM »

Quick comment for Oliver, Google for skyWriter.... it is part of a larger package (I forget the name) that allows you to manage files, including a WYSIWYG editor.

Ben, great work!  I'll definitely be patching a few calendars this evening.

Kriis, is it doing anything, giving an error message at all, or just acting like nothing ever happened?

Ryan, I'll look into the search issues when I install it tonight if ben hasn't figured it out by then.

------------------
David Whittaker
http://www.uabcm.com
http://bama.ua.edu/~whitt013

Logged

DanO
Moderator
Full Member
*****

Karma: 13
Offline Offline

Posts: 221

Please don't PM me. Post in the open forum.


WWW
« Reply #7 on: January 19, 2003, 08:04:00 PM »

ryan,

Go to the modified DBFileUtil.inc used for the 'wysiwyg' display and change one line towards the end of it. In the sub GetSearchFieldInput find the line following
# Define input field based on type
which is:

if (($type =~ /^text(?!area)/) | | ($type =~ /^password/) | | ($type =~ /^textarea/)) {

and change it to:

code:
if (($type =~ /^text(?!area)/) | | ($type =~ /^password/) | | ($type =~ /^textarea/) | | ($type =~ /^wysiwyg/)) {

See if that makes any difference. Be sure to make a backup of the original!

Dan O.

    BTW. This forum adds spaces between the | | which will have to be removed before pasting into the script file.


[This message has been edited by DanO (edited January 19, 2003).]

Logged
beneath_the_ashes
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« Reply #8 on: January 20, 2003, 12:49:00 AM »

worked great!  thnx

but has anyone figured out how to add the:

margin-top: 0; margin-bottom: 0

properties to the textarea to prevent the enter key doublespacing between lines?  I tried putting in the javscript on the page itself, and also in the editor.js.

I can change colors, and fonts, etc..., but i cant change that. Any thoughts?

thanks
ryan

------------------

[This message has been edited by beneath_the_ashes (edited January 20, 2003).]

Logged
ben
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« Reply #9 on: January 20, 2003, 03:19:00 AM »

Thanks for that fix DanO, I have to admit I've never actually used the search function so never saw the error before!

Can anyone confirm that the mod works with the latest version of HTMLArea? I have only tested it myself with version 1.5.

Thanks,
Ben

------------------

Logged
Kriis
New Member
*

Karma: 0
Offline Offline

Posts: 0


« Reply #10 on: January 20, 2003, 06:34:00 PM »

TubaDave - Thanks for responding.

I am not getting any errors, the WYSYWIG editor just isn't showing up in the description box and for the life of my I can't figure out why!

I will greatly appreciate any help you offer.

------------------

Logged

Kriis
DanO
Moderator
Full Member
*****

Karma: 13
Offline Offline

Posts: 221

Please don't PM me. Post in the open forum.


WWW
« Reply #11 on: January 20, 2003, 07:20:00 PM »

** the WYSYWIG editor just isn't showing up in the description box **

What browser are you using?
Any popup ad killer software running?
Do you have JavaScript turned on in the browser you're using?

Dan O.

------------------

Logged
Dave Anderson
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« Reply #12 on: January 21, 2003, 09:30:00 AM »

I'm having the same issue as well. I downloaded and installed htmlarea 2.03 into the root of my site:

/htmlarea
http://206.159.167.123/htmlarea/example.html  proves that it does function...

I installed the three modified files into the proper locations within Calendarscript.

When I go to add event, no html shows up... Wait a minute, I bet I have html turned 'off'.

I'll be right back....

Still no dice. I switched 'allow html' to 'on' and tried to 'add event'. The page took 10 times longer to load, but it finally did. However, no WYSWYG options...

What shall I try?

Thanks

Dave

Logged
beneath_the_ashes
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« Reply #13 on: January 25, 2003, 09:54:00 PM »

just checking back to see if anyone figured out how to add

margin-top: 0; margin-bottom: 0

properties to the textarea to prevent doublespacing between lines when you hit enter? I tried putting in the javscript on the page itself, and also in the editor.js.

I can change colors, and fonts, etc..., but i cant change that.

thanks
ryan

------------------

Logged
ben
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« Reply #14 on: January 27, 2003, 03:21:00 AM »

Dave,
have you remembered to set a field type to WYSIWYG in the 'Customize event fields' screen?

If you don't set that, it won't do anything!

Ben

------------------

Logged
Pages: [1] 2 3   Go Up
Print
Jump to: