Announcement

Do not use the forums to submit bug reports, feature requests or patches, submit a New Ticket instead.

#1 2006-03-17 19:22:37

keepkool_pt
New member
From: Portugal
Registered: 2006-03-17
Posts: 5
Website

Firefox ;  Problems with Xinha

Hi first thanks for this great wysiwyg editor wink
  (I search so many, but this seems the best)

  Now my problem:

  I have problems with FireFox and Xinha when the content as BreakSpaces Entities [ ]

  I try to explain here with a simple example:

  I edit the \examples\testbed.html and add a sample line inside of textarea to prove the problem, this way when the file open, it as the sample text inside xinha textarea
 
  sample text:
  XXX[   ]XXX

  If I read it with IExplorer all Ok we can view the 3 spaces inside the [   ] smile

  But if we open it with Firefox, we view the 3 spaces [   ] when xinha is not initiated, but after it initiate or show, the 3 spaces are converted in one space [ ], this is the problem, it turns all spaces into on space........:(

  If i add HTMLArea.setMode('text'); I can see the 3 spaces [   ] inside the normal textarea smile

  Can anyone help me solve this, I have Tryed many things, like utf-8, htmlentities, search the forum etc, but nothing

  Its strange that this problems is not reported, or may it has, and I cannot find it

  I cannot post this topic, if the forum editor rips my spaces, this way my post turnt into an unformatted space post
  (note my spaces like here [   ] <<< turns into this >>> [ ])

  PS-Strange I try to add a double space in first line (here Hi first thanks... and it dont works!!!, try to post a topic with first chars as 4 spaces, and it rip off the 4 spaces, bad luck, seems that this is a bad day for my space theories LOL

  Thanks in advance, ppl smile

Last edited by keepkool_pt (2006-03-17 19:54:52)

Offline

#2 2006-03-18 07:45:52

mharrisonline
Xinha Administrator
From: Denver, Colorado
Registered: 2005-04-11
Posts: 110
Website

Re: Firefox ;  Problems with Xinha

I'm curious, why do you need three spaces in a row, and would this always be preloaded content, or user entered content?

Offline

#3 2006-03-18 08:53:21

keepkool_pt
New member
From: Portugal
Registered: 2006-03-17
Posts: 5
Website

Re: Firefox ;  Problems with Xinha

First Thanks for the Repply

Q: why do you need three spaces in a row?
The three spaces are here only to prove the bug theory in a simple way

The problem arrises everywhere, not only in rows....
Example
  <textarea>  BYE BYE Spaces</textarea>

  Many of my users uses spaces as a format indentation method,
like this (me too, is simple and is a must have funcionality):

EX OK (IExplorer Without Ripped Spaces)
TOC
  1
    1.1
    1.2
    1.3
      1.3.1
      1.3.2
  ...

(this is impossible to achive if xinha+firefox converts more than 1 space   into one visible html space)

EX BAD (FireFox + Xinha Ripped Spaces)
TOC
1
1.1
1.2
1.3
1.3.1
1.3.2
...

  I know there many other ways that users can achieve this, but THEY cant do that,
in fact is more simple to add spaces than create tables and other complicated things for a newbie users......

Q: would this always be preloaded content?
yes is always a preloaded content like the example in first topic
<textarea>XXX[   ]XXX</textarea>

  if I edit a blank content (<textarea></textarea>) with Xinha + FireFox everything works well,
even when I store and/or output it from database, but when I try to edit it, load the content in a preloaded way, it rips the spaces

  I upload the modified testbed.html to this link, please try to load the link with FireFox and IExplorer and the Error in FireFox is obvious, when Xinha inits, The spaces are ripped, look at the link above
  http://www.softcontrolweb.com/~xinha/ex … stbed.html

    ...
    line 146    <textarea id="myTextArea" name="myTextArea" style="width:100%;height:320px;">
    line 147       <B>TOC</B><br />
    line 148        1<br />
    line 149         1.1<br />
    line 150         1.2<br />
    line 151         1.3<br />
    line 152         1.4<br />
    line 153          1.4.1<br />
    line 154          1.4.2<br />
    line 155          ....<br />
    line 156    </textarea>
    ...

Last edited by keepkool_pt (2006-03-18 16:18:26)

Offline

#4 2006-03-19 03:16:29

mharrisonline
Xinha Administrator
From: Denver, Colorado
Registered: 2005-04-11
Posts: 110
Website

Re: Firefox ;  Problems with Xinha

Have you considered doing the same thing with blockquotes, which users create when they use the indent right button?

You could try defining a smaller indentation distance for blockqoutes in CSS, if you wanted to.

The reason I asked was because Xinha primarily just controls HTML changes in IE, Mozilla is usually trusted and free to decide what it wants to do. Sometimes this has very undesirable results, such as body events being stripped from full-page HTML.

But, it seems to me that the reason that you want to be able to use multiple unbreakable spaces is something of a hack, why not use indent right instead, which is the proper way to do what you provided as an example?

Offline

#5 2006-03-19 10:26:56

keepkool_pt
New member
From: Portugal
Registered: 2006-03-17
Posts: 5
Website

Re: Firefox ;  Problems with Xinha

Thanks once again for your answear mharrisonline wink

mharrisonline wrote:

Q: Have you considered doing the same thing with blockquotes, which users create when they use the indent right button?

A: No, I will try, but its not the same thing..........

mharrisonline wrote:

Q: You could try defining a smaller indentation distance for blockqoutes in CSS, if you wanted to.

A: OK, I will try It

mharrisonline wrote:

...Mozilla is usually trusted and free to decide what it wants to do. Sometimes this has very undesirable results...

yes its seems right, maybe this is a undesirable firefox result

mharrisonline wrote:

But, it seems to me that the reason that you want to be able to use multiple unbreakable spaces is something of a hack, why not use indent right instead, which is the proper way to do what you provided as an example?

Belive me its not a hack, think this way please:

1) A user creates a content with spaces and other entities, everything fine
2) but when he trys to re-edit the same content, it notes that the spaces are ripped off, and the html is corrupted, and what do you think he thinks?

It Thinks its a Bug, and ask where are my spaces!!!!!!!!!

It is not a hack, its only to prevent future problems for me and my contentmanager, in fact If I choose this great wysiwyg from many that exits, I want thrust that this is the one for all my future projects, and it must be stable and works well, and corrupt code is not a good thing to explain to a client....

  I belive someone as the solution and helps me/us,
in fact I make it work with php and htmlentities, its easy, but for this work I must store the content in a database with entities replaced by its character codes!!!!,
It works well, but I dont want to store the content in dabase this way ...........

  Please try to help me solve this problem, I know someone as the solution.........

  Thanks once again

Last edited by keepkool_pt (2006-03-19 10:38:39)

Offline

#6 2006-03-19 20:10:22

keepkool_pt
New member
From: Portugal
Registered: 2006-03-17
Posts: 5
Website

Re: Firefox ;  Problems with Xinha

I have made like you said, and it works well smile
its not the same thing, 
but it bypasses the indentation problem and works even better (after the newbiews learn it)

I used this css

blockquote{
    padding-left: 10px;
    margin: 0px;
}

thanks for the excelent tip and your help (mharrisonline) wink

Last edited by keepkool_pt (2006-03-19 20:15:32)

Offline

#7 2006-03-20 05:08:05

mharrisonline
Xinha Administrator
From: Denver, Colorado
Registered: 2005-04-11
Posts: 110
Website

Re: Firefox ;  Problems with Xinha

I understand the way you feel. I think you're right, the end user should be able to enter anything, and be able to trust that it won't be altered.

Currently I process my HTML before and after Xinha in the PHP page that loads it with a series of regular expressions to fix other problems. I grab the body events and then put them back in because I know Mozilla will remove them, I convert php to long script notation because otherwise Mozilla will destroy it, and I strip any surviving unwanted absolute paths. I block JavaScript execution in the editor by changing the name of the script language, and then return it to JavaScript on save.

Xinha is the only higher end WYSIWYG that I know of that does not support HTML entities, but as I do not have control over encoding in my server environment or the CMS I use, I very much do have to convert special characters into HTMLentities. Every time the GetHtml plugin is changed, I save its js file as UTF-8 and add a regular expression for every character I need to prevent the destruction of.

In other words, I feel your pain.

Despite all of these things, I think Xinha is the most powerful editor you will find, and I really like it best. When I do find something that it breaks or doesn't do well, I always seem to find a way to either fix it, a work around that works as well, or someone here figures out a great way to fix it perfectly. Either way, nothing has ever been impossible. big_smile

Last edited by mharrisonline (2006-03-20 05:16:31)

Offline

#8 2006-03-20 16:51:57

keepkool_pt
New member
From: Portugal
Registered: 2006-03-17
Posts: 5
Website

Re: Firefox ;  Problems with Xinha

mharrisonline wrote:

I understand the way you feel. I think you're right, the end user should be able to enter anything, and be able to trust that it won't be altered.

Thats the Point wink

mharrisonline wrote:

I In other words, I feel your pain.

Despite all of these things, I think Xinha is the most powerful editor you will find, and I really like it best.
big_smile

First thanks for your repply, so well written smile

I m with you, this is the best,
I view so many, that i dont waste more time only to talk about it, but I know one thing, theres no perfect wysiwyg in the world, I try all and all have common problems, like table manager, imagemanager, DOM (very Important Feature), Multi Language, Custimization, Royalityes, CSS etc.....
and In my point of view this is the best I know, Comercial and Free/OpenSource

  And the best is......we have this forum to share our knowledge about it (Not me, I´m a Newbie, I´m just learning)

Last edited by keepkool_pt (2006-03-20 16:53:32)

Offline

Board footer

Powered by FluxBB