Client Side Things
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsOther TechnologiesClient Side Things

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
  #1  
Old May 18th, 2004, 07:34 PM
axinya axinya is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Vienna
Posts: 3 axinya User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Editor development: synchronizing code/wysiwyg

I am working on a Dreamweaver like editor
(javascript,php,browser)
The editor should be fully functional in code-view.
(inserting/editing tags, code snippets, etc.)
I am running into this:

exchanging data from wysiwyg to code view

form.value = div.innerHTML;

linebreaks 'n' are lost, or messed up!

Apparently all wysiwyg-editors(like html-area,spaw)
have the same problem.

Anyone out there who has a clue how to keep
the linebreaks the way they were set?

Reply With Quote
  #2  
Old May 19th, 2004, 05:04 PM
jeremywilken jeremywilken is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Central Illinois soon to be moved
Posts: 16 jeremywilken User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via AIM to jeremywilken Send a message via Yahoo to jeremywilken
RE: Editor development: synchronizing code/wysiwyg

Could you possibly convert all '/n' to '<br>' for the HTML to read it as such?

Reply With Quote
  #3  
Old May 19th, 2004, 06:54 PM
nawlej nawlej is offline
Contributing User
Codewalkers Regular (2000 - 2499 posts)
 
Join Date: Apr 2007
Location: Dallas, Tx. USA
Posts: 2,008 nawlej User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 11 h 7 m 51 sec
Reputation Power: 4
RE: Editor development: synchronizing code/wysiwyg

I agree....if you are doing it in PHP, theres a handy function called nl2br(); for doing just that.

Reply With Quote
  #4  
Old May 20th, 2004, 12:21 PM
axinya axinya is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Vienna
Posts: 3 axinya User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
RE: Editor development: synchronizing code/wysiwyg

HI!

Thanks for your feedback.
Exchanging line breaks with <br> would mess up the layout,
but putting something like <ln> could substitute all n temporarely.
I guess I'll have a try.

Reply With Quote
  #5  
Old May 26th, 2004, 07:24 PM
zombie zombie is offline
Codewalkers Intermediate (1500 - 1999 posts)
 
Join Date: Apr 2007
Location: serbia
Posts: 1,876 zombie User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 3
RE: Editor development: synchronizing code/wysiwyg

can we see a demo of what you are working on (if it is not a secret)?

Reply With Quote
Reply

Viewing: Codewalkers ForumsOther TechnologiesClient Side Things > Editor development: synchronizing code/wysiwyg


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 | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway