Hi,

I am currently using:

- Wysiwyg API 6.x-1.x-dev with TinyMCE 3.2.1.1
- Smileys 6.x-1.0-alpha5

when I insert a smiley before a blank space it adds a second black space so the smiley is not shown.

Example: Hello world

inserting the smiley after the blank space results in: Hello :) world ->blank space before and after
inserting the smiley before the blank space results in: Hello :) world ->blank space before and TWO blank spaces after

In this second case the smiley is not show after using the filter. The problem is that, when you read the text, only one of those two blank spaces is shown. As far as I know this is normal but the user cannot find out why the smiley is not shown.

I have checked the code in smileys.js and in line 79 it appears:

var smiley = " " + this.alt + " ";

I have changed it in my local installation to:

var smiley = " " + this.alt + "";

which should be the same as

var smiley = " " + this.alt;

This way, in the second case the result is: Hello :)world -> black space only before

The smiley is still not shown as it should be "Stand-alone" but at least the user can easily realize he should add a blank space.

Comments

neoisme’s picture

just to clarify,

if you change the code as I said the problem with the second case is solved an the new problem comes out with case 1.

The fact is that the new problem is easy to be solved by the user itself as it is obvious that it is not working because it is not stand alone.

As you can see above you cannot see the double blank space I included. If I had not explained you would see both cases exactly the same but only one showing de smiley (if the filter was on)