You are not logged in.
I'm running into a problem where Xinha in FireFox (on Windows and Linux) is for some reason losing some spaces. For example "this is a test" might become "thisisatest".
It might be due to my changes I've made so I haven't created a ticket until I can demonstrate that it's not something I've done.
What is the preferred way of setting content loaded from a database into Xinha? I'm currently just setting the value of the textarea field to some html as in:
document.text_01.staging_text_content.value='<p>this is atest</p>';
Is there a better way?
-----------------------------------------------------------------------------------------
Content Management with Business Intelligence [url]http://www.formvista.com[/url]
Offline
I just put the content in the textarea as one normally would (run through htmlspecialchars() in PHP to avoid problems), e.g.
<textarea name="ta" id="ta"><?php echo htmlspecialschars($content); ?></textarea>
EDIT: added the PHP in to possibly explain better
Last edited by adamp (2005-03-19 18:15:22)
Offline
I just put the content in the textarea as one normally would (run through htmlspecialchars() in PHP to avoid problems), e.g.
<textarea name="ta" id="ta"><?php echo htmlspecialschars($content); ?></textarea>
EDIT: added the PHP in to possibly explain better
I used to do it that way but ran into alot of trouble when users started trying to enter HTML .. it was screwing up the editor itself. I believe the &blah; characters were getting interpreted or some such as the editor was loaded.
It's always possible I was doing something incorrectly.
-----------------------------------------------------------------------------------------
Content Management with Business Intelligence [url]http://www.formvista.com[/url]
Offline
That's what htmlspecialchars() is for. Can't say I've had any trouble with it.
Offline
Offline
That said, setting textarea.value should work fine too.
Check it out against a fresh copy of the nightly, I can't think of anything that would do that.
See bug 78. There's some issue around line 258 "var holdEnd = this.forEachNodeUnder(pEnd[2], this._fenEmptySet, true, false, true);" in EnterParagraphs.
holdEnd is assumed to be an object but in the case described in the bug it contains false so the "sel.collapse(holdEnd, 0);" fails. I believe this is probably related to the spaces problem. When the spaces problem occurs it generates an exception on the same line ...
I'll delve into further. This one is causing me an immediate headache.
-----------------------------------------------------------------------------------------
Content Management with Business Intelligence [url]http://www.formvista.com[/url]
Offline
That said, setting textarea.value should work fine too.
Check it out against a fresh copy of the nightly, I can't think of anything that would do that.
Turns out the stripping out spaces issue is my own bug and probably has nothing to do with Xinha.
-----------------------------------------------------------------------------------------
Content Management with Business Intelligence [url]http://www.formvista.com[/url]
Offline