News:

Wondering if this will always be free?  See why free is better.

Main Menu

2.0.4 WYSIWYG Editor bug (double spacing things?)

Started by MechSpecs, June 27, 2013, 08:57:27 AM

Previous topic - Next topic

MechSpecs

Lately I've been running across errors in our stock WYSIWYG Editor but only with some users. Basically it double spaces the lines between their paragraphs


So that it would look like this.

Does anyone have any thoughts on this? Have they encountered it? Solved it?

One of the guys who is a PHP guy on our site said...

Quote
Thats a classic issue with wysiwyg editors, comes from the way the editor parses and returns the content. Most editors have a config file which has a setting to allow you to change it.

Since I'm not a coder I figured I would come here to see if anyone else had this issue.

Cheers

P.S - I looked on these forums for a solution however could not find one going back as far as early 2012.

P.S.S - I am using the WYSIWYG Quick Reply mod but I'm not sure if that has anything to do with it or not. Haven't found a connection in that monster thread.

MrPhil

Perhaps they're on Macs? Possibly the editor is adding <br> tags but failing to recognize the end-of-line marks (\r, \n, \r\n, \n\r) that the OS and/or browser is inserting? Just a thought -- maybe what is intended to be a single end-of-line is being recognized as two end-of-lines (\n and \r separately, rather than \n\r as a single). The first thing would be to see what the failing cases have in common, such as a specific machine type or browser. Try displaying the page source (HTML) in the browser and see if what should be single empty lines in the <textarea> have an extra <br> or extra line-ends or something, compared to a setup that works as expected.

Kindred

actually...

if you post as paste from windows notepad via IE , you get the same crap - even with the non-wysiwyg editor.

I blame it on Windows...
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

MechSpecs

Quote from: MrPhil on June 27, 2013, 09:53:29 AM
Try displaying the page source (HTML) in the browser and see if what should be single empty lines in the <textarea> have an extra <br> or extra line-ends or something, compared to a setup that works as expected.

This is what I found

<div class="post">
<div class="inner" id="msg_11142">When I try to put in a smurfy link manually, I get this when I preview (minus the spaces, of course):<br /><br /><br />[ smurfy ] [ size=78% ]LinkAddress[ /size ][ /size ][ /smurfy ]<br /><br /><br />The duplicate size terminator causes the smurfy preview to fail.&nbsp; I&#039;m not sure why it does, this, but the editor always posts links in a smaller font size, and I think that messes up smurfy tagging.
        </div>
</div>


Looks like it is putting in an extra BR /

MrPhil

So that text was entered with the Enter key hit twice (once to end the paragraph, and once to enter a blank line)? Odd that it would produce 3 <br>s rather than 2 or 4. Was it entered directly into the forum or was it cut and pasted from another application? Can you narrow it down to specific OS's, browsers, and operations?

MechSpecs

Quote from: MrPhil on June 27, 2013, 10:53:11 AM
So that text was entered with the Enter key hit twice (once to end the paragraph, and once to enter a blank line)? Odd that it would produce 3 <br>s rather than 2 or 4. Was it entered directly into the forum or was it cut and pasted from another application? Can you narrow it down to specific OS's, browsers, and operations?

I am investigating this now.

We have over 2600 registered users on our forums so I'm sending PMs to people I notice that have double spaces in their posts and attempting to isolate the requested data.

We think it might be browser based because Chrome and FF handle Javascript different ways? We will see. Should have a better idea in a few hours.

MechSpecs

Ok so what we have discovered

Chrome (tested on Android phone and Desktop) cause a double space issue
Safari (tested on iPad and iPhone) causes a double space issue

Apparently both chrome and safari use the webkit rendering engine. The issue only appears in those browsers so it'll be a quirk of the way the javascript is being run on them.

MechSpecs

Nobody else has experienced this particular little nugget or know of a configuration that can be played with / edited?

MechSpecs

Hey Folks,

Is there a configuration file or someplace that all the information for the WYSIWYG Editor is stored for SMF 2.0.4? We have run across an issue where on Firefox and Internet Explorer everything works fine but when using Chrome and Safari (which a lot of people are doing now days) we get double spaces whenever they try and put a single space between paragraphs.

It looks like this....



We believe it is because of how Chrome and Safari handle rendering info. Something about them using "Webkit"

Anyone have an idea where to start looking for a fix for this?

NanoSector

Hello MechSpecs,

Fixing the WYSIWYG editor is a task that nobody has dared to tackle ;)
It's completely bugged, and we advise you to not use it. I'd wish it was disabled by default with a switch available which was hidden deep deep inside, but unfortunately that's not there :-\

In SMF 2.1 a new editor will replace the WYSIWYG editor, which is way more stable, so if you are keen on the editor I'd suggest you to wait until 2.1 is released or try it on a test site or a localhost and see if it fixes the problem.
My Mods / Mod Builder - A tool to easily create mods / Blog
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

MechSpecs

Quote from: Yoshi on July 04, 2013, 11:49:50 AM
Hello MechSpecs,

Fixing the WYSIWYG editor is a task that nobody has dared to tackle ;)
It's completely bugged, and we advise you to not use it. I'd wish it was disabled by default with a switch available which was hidden deep deep inside, but unfortunately that's not there :-\

In SMF 2.1 a new editor will replace the WYSIWYG editor, which is way more stable, so if you are keen on the editor I'd suggest you to wait until 2.1 is released or try it on a test site or a localhost and see if it fixes the problem.

LOL is exactly the answer I was afraid of ;)

Vivanto, the theme we are using, was made for 2.0.4 as well as many of the mods we are using too. When 2.1 comes around I would love to upgrade but it would break just about everything from what I am understanding; there are moderate to significant changes.

Someone on this site is working with an Alpha copy of 2.1 and I've been over there to check it out. Looks great but we have over 2500 active users on our forums and 10,500 posts. That would be a LOT to have to start over for.

NanoSector

Quote from: MechSpecs on July 04, 2013, 11:59:18 AM
LOL is exactly the answer I was afraid of ;)

Vivanto, the theme we are using, was made for 2.0.4 as well as many of the mods we are using too. When 2.1 comes around I would love to upgrade but it would break just about everything from what I am understanding; there are moderate to significant changes.
There's still a long road to go before 2.1 is released. When it hits RC stage (if it hits RC, that is) I think many mod authors will be upgrading their mods to work with 2.1. You can always contact an author to check if he has plans for updating his or her mods.
As for custom changes, there's a significant chance that the changes you made will still work on 2.1.

Tell you what, most mods that use hooks don't even need updating :)

QuoteSomeone on this site is working with an Alpha copy of 2.1 and I've been over there to check it out. Looks great but we have over 2500 active users on our forums and 10,500 posts. That would be a LOT to have to start over for.
Why would you need to start over?
My Mods / Mod Builder - A tool to easily create mods / Blog
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

shadow82x

You can always look into using SCEditor. There is a modification on the modification site that replaces the default SMF editor.

http://custom.simplemachines.org/mods/index.php?mod=3594

I haven't used it but I'm sure it's more stable than the SMF editor.
Colin B
Former Spammer, Customize, & Support Team Member

NanoSector

Quote from: shadow82x on July 04, 2013, 01:07:09 PM
You can always look into using SCEditor. There is a modification on the modification site that replaces the default SMF editor.

http://custom.simplemachines.org/mods/index.php?mod=3594

I haven't used it but I'm sure it's more stable than the SMF editor.
Oh, I forgot about that one, nice find :)

Well, it's the editor that's going to be used in SMF 2.1, so if you install that it should give you an indication of how stable it is.
My Mods / Mod Builder - A tool to easily create mods / Blog
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

MechSpecs

We actually tried the SCEditor4 mod originally but ran in to a lot of problems with it; formatting when quoting replies etc.

We will just have to suck it up with what we have until 2.1 is released somewhere down the road and then re-evaluate at that time.

Our guy is going to go through the WYSIWYG code...

Quote
yeah its going to be a line by line read through of the code to see which of the functions are wrong, or which designators are wrong.

We have no idea when that will begin though.




MrPhil

Please don't keep starting new topics on this.

http://www.simplemachines.org/community/index.php?topic=506653.msg3567842#msg3567842
http://www.simplemachines.org/community/index.php?topic=380639.0

It's broken. It won't be fixed until 2.1 (hopefully). It's not going to be fixed any faster by repeatedly posting on it.

MechSpecs

Sure thing Phil... Thanks for coming in here and giving me an answer on it.

Antechinus

Quote from: shadow82x on July 04, 2013, 01:07:09 PM
You can always look into using SCEditor. There is a modification on the modification site that replaces the default SMF editor.

http://custom.simplemachines.org/mods/index.php?mod=3594

I haven't used it but I'm sure it's more stable than the SMF editor.

I have used it. It's the default in Elk, same as in 2.1. It still has significant problems at the moment. Editing posts that contain code blocks is a particular problem, with Firefox at least. Not sure if the 2.1 mplementation is any better than Elk's. Haven't done much testing on it.

* Antechinus hatez wysiwyg editors.... :P

The really annoying thing about SCE is that it's still borking things even though I have it set to bbc mode. :P

MechSpecs

I've been going through the editor.js file. Wow who would have thought 56kb could be 1720 lines of code!!!

I've been looking for CHROME and SAFARI specific entries because those are the only two editors I have a problem adding the second line of code.

So far it is all Greek to me but with those being the only issues hopefully i can nail it down and post a fix for others that may be having this issue.

Advertisement: