ASP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 



Go Back   Dev Articles Community ForumsProgrammingASP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old February 6th, 2003, 11:11 AM
mark0 mark0 is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Posts: 9 mark0 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Another WYSIWYG question

I'm not sure if this is the place to post a question to this issue or the javascript forum, anyway...

When I insert text into the iFrame the space in between each line is very big, for example:

----------------
Line one

Line two
----------------

what I want is:

----------------
Line one
Line two
----------------

Even if I change the font type the space remains the same how can I adjust this?

Thanks in advance...

Reply With Quote
  #2  
Old February 6th, 2003, 08:14 PM
stumpy's Avatar
stumpy stumpy is offline
May contain nuts.
Dev Articles Regular (2000 - 2499 posts)
 
Join Date: Aug 2002
Posts: 2,056 stumpy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 44 m 22 sec
Reputation Power: 0
When typing in HTML mode in the WYSIWYG, hitting enter will create a new paragraph.

If you only want a line break, type: SHIFT + ENTER

Reply With Quote
  #3  
Old February 7th, 2003, 03:05 AM
mark0 mark0 is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Posts: 9 mark0 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Thumbs up Thanks, however....

Thanks that worked perfect, however, what would really be good is to allow this spacing when the user presses enter, as this is what they would normally do. Any ideas???

Obviously it is a simple training exercise for them but it would be good if there were a simple solution.

Thanks in advance...

Reply With Quote
  #4  
Old February 7th, 2003, 04:51 AM
stumpy's Avatar
stumpy stumpy is offline
May contain nuts.
Dev Articles Regular (2000 - 2499 posts)
 
Join Date: Aug 2002
Posts: 2,056 stumpy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 44 m 22 sec
Reputation Power: 0
No can do amigo - It's a standard "feature" built into most HTML editors (On the windows platform anyway - can't speak for linux). Even Dreamweaver does it. It's just one of those things you've gotta get used to.


Unless anyone knows a workaround?!?!

Reply With Quote
  #5  
Old February 21st, 2003, 01:54 AM
christian christian is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2002
Location: Aalborg, Denmark
Posts: 3 christian User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
its quite easy...

just change the style for the <p> paragraph.
f.example:

p{margin-bottom:0}

thats it !

;-)

/Christian Rasmussen

Reply With Quote
  #6  
Old February 21st, 2003, 02:00 AM
stumpy's Avatar
stumpy stumpy is offline
May contain nuts.
Dev Articles Regular (2000 - 2499 posts)
 
Join Date: Aug 2002
Posts: 2,056 stumpy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 44 m 22 sec
Reputation Power: 0
if you do that tho - there is no way of distinguishing which is a paragraph and which is a line break.

btw - A paragraph (P) is a paragraph element for a reason. - if you wanna change the "padding" - change it to a block or inline element type.

Last edited by stumpy : February 21st, 2003 at 02:04 AM.

Reply With Quote
  #7  
Old February 21st, 2003, 10:46 AM
christian christian is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2002
Location: Aalborg, Denmark
Posts: 3 christian User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
well, if we concentrate on what Mark0 originally asked for; it was a solution to

-----------
line 1
line 2
-----------

instead of

-----------
line 1

line 2
-----------

I know that hitting enter will make a new paragraph, but i do NOT agree, that by remove the margins on the paragraps style will make it the same as a line break. there is still a huge difference between a paragraph (without top- and bottom-margins) and the line break.

As far as I know, the only style you can put on a line break is the display style, while the paragraph takes almost all styles.

I think it makes perfect sense to remove the margin the paragraph styles in a WYSIWYG editor. I have done that myself, in my own editor. However I do not use an Iframe - I think the div-tag is better. My experiences tells me that u can do more with the div than with iframe. for instance removing the sunken edge effect on the iframe. setting the div border to 1px solid gray looks much better....

but what the ****...u can arrive in many ways, and the above is just my humble opinion :-)

/Christian

Reply With Quote
  #8  
Old February 21st, 2003, 07:38 PM
stumpy's Avatar
stumpy stumpy is offline
May contain nuts.
Dev Articles Regular (2000 - 2499 posts)
 
Join Date: Aug 2002
Posts: 2,056 stumpy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 44 m 22 sec
Reputation Power: 0
So by that logic - if you want a proper paragraph, you need press enter twice?

That will then destroy the document structure. Sure it might 'look' right, but this is not what P tags were meant for. You are talking about a <br>

The w3.org doc on document structure and P tags

Reply With Quote
  #9  
Old February 22nd, 2003, 03:56 AM
christian christian is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2002
Location: Aalborg, Denmark
Posts: 3 christian User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
OK I can follow your way of reasoning, but I still disagree.

I must ask you a question: Can you please tell me why it isn't the same in Microsoft Word??? Why does hitting enter in word not "look like" hitting enter in a WYSIWYG ???? After all you create a new paragraph i both situations.

When hitting enter in Word, the visual response isn't different from a line break. But the code behind is much different.

Roughly speaking I dont see any difference between the paragraph style on the web, and the normal style in Word. They are alike and the user expects them to be alike.....cause the user is in most cases used to Word.

So by removing the top and bottom margins on the paragraph you get closer to Word.

/C.

Reply With Quote
  #10  
Old February 22nd, 2003, 10:50 PM
stumpy's Avatar
stumpy stumpy is offline
May contain nuts.
Dev Articles Regular (2000 - 2499 posts)
 
Join Date: Aug 2002
Posts: 2,056 stumpy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 44 m 22 sec
Reputation Power: 0
Yeah - but you need to maintain the document structure. Altering predefined structure blocks for another purpose, generally isn't a good idea.

What MS should do is reverse the enter/shift-enter functionality - so pressing enter creates a new line, and shift-enter creates a new paragraph.

As more and more office management tools move online, browsers are becoming more key tools, they'll need have the familiar functionlity of word processors.

Reply With Quote
  #11  
Old April 12th, 2003, 12:05 PM
seamonkey seamonkey is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2003
Posts: 18 seamonkey User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
suggestion.....

Try giving your users a check box functionality so that they can decide if they want normal line breaks by default or paragraphs....amybe you can implement some javascript in the Irame src (if that's possible.....I am not quite well versed in javascript) so that it reacts to the changes in the main page.....if anyone knows how to do this..............

Reply With Quote
  #12  
Old April 16th, 2003, 03:39 AM
fakker fakker is offline
The calm b4 the storm
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2002
Location: Manchester, UK
Posts: 404 fakker User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 17
Send a message via Yahoo to fakker
I my head I can do it, in code, I cant...

capture the key press of enter or return (dont know what these are)... might be like 54 or sommit like that.....

anyway.... once that is captured using JS listener or something.... enter a <BR> in the iFrame window. Some how, stop anything from going in the iFrame other than the <BR>

thats how I imagine it'd work... but I've not had time to try coding it!!

The other way is to add a <DIV> tag at the top of the iFrame code. Then when the user presses enter, it only drops one line.

Just some suggestions!!
__________________
Matt 'Fakker' Facer

mattfacer.com

Reply With Quote
  #13  
Old April 17th, 2003, 12:21 AM
seamonkey seamonkey is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2003
Posts: 18 seamonkey User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Exclamation .....I think I've seen it before........

I am almost positive that this is possible......will anyone that knows enough about JSCRIPT please answer this and finally put this topic to rest.....(maybe this is being posted in the wrong fourm.....?)

Reply With Quote
  #14  
Old April 17th, 2003, 01:48 AM
stumpy's Avatar
stumpy stumpy is offline
May contain nuts.
Dev Articles Regular (2000 - 2499 posts)
 
Join Date: Aug 2002
Posts: 2,056 stumpy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 44 m 22 sec
Reputation Power: 0
Check out the javascript forum for the answer to fakker question. There's about 3 threads in there on key capturing.

Reply With Quote
  #15  
Old April 17th, 2003, 10:20 AM
seamonkey seamonkey is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2003
Posts: 18 seamonkey User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
:)

I'll go check it out.....I've seen some key capturing techniques before.....but they're always so hard to find when you need them........if I do it, I'll post it here.

Reply With Quote
  #16  
Old April 24th, 2003, 10:43 AM
mark0 mark0 is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Posts: 9 mark0 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Cool

Didnít realise this would create such a big discussion ;-)

Thanks for your input guys...

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingASP Development > Another WYSIWYG question


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.

© 2003-2018 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap