|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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? |
|
#2
|
|||
|
|||
|
RE: Editor development: synchronizing code/wysiwyg
Could you possibly convert all '/n' to '<br>' for the HTML to read it as such?
|
|
#3
|
|||
|
|||
|
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.
|
|
#4
|
|||
|
|||
|
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. |
|
#5
|
|||
|
|||
|
RE: Editor development: synchronizing code/wysiwyg
can we see a demo of what you are working on (if it is not a secret)?
|
![]() |
| Viewing: Codewalkers Forums > Other Technologies > Client Side Things > Editor development: synchronizing code/wysiwyg |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|