Forum WYSIWYG Issues
in The Commons
This discussion was created from comments split from: Smart+/PropGoto+ HANDPROXYDATA list (UPDATED FOR RELEASE 3).

Comments
(This was a response to this post by chohole in the original thread)
A Brief Off Topic Aside...
Okey dokey, I'm working on it... :) Done - looks fine to me now.
Notes to self follow: how to get a monospace (monotype?) font on this forum that displays what I enter and doesn't break the rules:
The following is information for a bug report I'm putting in about the forum. Here's the text using the default settings:
# Dataline Syntax:
# <propName>,<vertexCount>,<poserGeometryName>,<poserInternalName>,<poserExternalName>,<dsGeometryName>,<ds4Name>,<yR>,<xR>,<zR>,<xT>,<yT>,<zT>
# Details:
# To create a full dataline you need both Poser and DAZ Studio.
Here's the same text using 'Computer code' (from the left-hand "Block Styles" drop down)
:HANDPROXYDATA<br /> # Dataline Syntax:<br /> # <propName>,<vertexCount>,<poserGeometryName>,<poserInternalName>,<poserExternalName>,<dsGeometryName>,<ds4Name>,<yR>,<xR>,<zR>,<xT>,<yT>,<zT><br /> # Details:Did 'computer code'display that correctly ?
No
(I'm using FF 44.0)
I applied the style by pasting the text from Notepad (Microsoft's one), then selecting it, then applying the style.
Here's the text of the bug report:
Request #211143
Website/Forum Bug: 'Computer Code' Doesn't work (at least for me)
I'm writing/editing forum posts using Windows 7 and Firefox 44.0, and when I apply the 'Computer Code' style to a block of text in my post it totally screws up the text.
I'd guess it's something to do with the <and > characters, and maybe the forum software thinking it's HTML.
A workaround was to use the 'Typewriter' style, but that doesn't negate the fact that there's a problem.
See this post http://www.daz3d.com/forums/discussion/comment/1000906/#Comment_1000906
(The following is not in the bug report - it's additional information)
P.S. it definitely seems to be the < and > incorrectly triggering the forum software to consider it as HTML. 'Computer Code' seemed to work okay in
erostew's postand in my post (where I'd manually edited the text to replace < and > with { and })P.S.2 Another example - a section of DAZ Script. Here's the text:
var wDlg = new DzBasicDialog;
var wWbLbl = new DzLabel( wDlg );
wWbLbl.text = "Blah, blah, blah, blah, ...ad infinitum..."
And here it is as 'Computer Code'
var wDlg = new DzBasicDialog; <br /> var wWbLbl = new DzLabel( wDlg );<br /> wWbLbl.text = "Blah, blah, blah, blah, ...ad infinitum..."Or not. But nothing to confuse the forun software into thinking it's HTML this time. Maybe it just detects that I'm posting and goes into 'garble' mode ? ;o)
Thank you
If you're pasting actual computer code (and not just wanting it to be in a monospaced font) then use the "Insert Code Snippet" button. (Top row, just after the image button).
Also, it seems like you're copy-pasting code from the website, which includes things like non-breaking spaces ( ) and BR tags (<br/>). If you use the "Paste as plain text" button, it will strip out all the HTML and prevent it from looking "garbled".
Here is an exampe of code posted using the "Insert code snippet" button:
The reason your "code" looks garbled is because it is outputting it exactly as it's input (as the <code> tag should), but because it was copied from a website, it didn't look the way that it was entered because the browser converts things like html tags (<br />) and entities (<) to their visual counterparts. The code is actually what's posted. If you either use the "Paste as plain text" or paste the copied code into a text editor and then re-copy it and paste it here, it should look more like what you're expecting.
A (Not So) Brief Off Topic Aside...
Thanks DAZ_BenJam, that could very well explain it - I'd completely missed the "Insert Code Snippet" button. In addition, even though I'm convinced that I cut-and-pasted from Notepad I could well be mistaken...
( <--- what it says over there ;o) )
...but unfortunately it doesn't (explain things that is).
- 'Computer Code' block style converts manually typed < and > to < and > (test 1 below)
- I'm 100% definitely NOT pasting text from a website (test 2 below) - 'Computer Code' garbles text cut-and-pasted from Microsoft Notepad.
- The "Insert Code Snippet" does work, but infuriatingly it displays incorrectly until I do a hard page refresh (Firefox 44.0/Win7) - tests 3 and 4
- 'Paste as plain text' doesn't make any difference (test 5)
TEST 1: the following is typed in by hand, then I select the block of text and apply 'Computer Code' from the 'Block Styles' drop-down. The typed < and > have been replaced by the HTML entities < and > (same after Ctrl-F5 hard page refresh);
:HANDPROXYDATA# Dataline Syntax# <propName>,<vertexCount>,etcTEST 2: I cut a block of text from Notepad (100% definitely this time!) paste it below, select it, apply 'Computer Code' style from the 'Block Styles' dropdown' and then 'Save Comment'. It's garbled exactly as in the previous post (same after Ctrl-F5 hard page refresh)
:HANDPROXYDATA<br /># Dataline Syntax:<br /># <propName>,<vertexCount>,<poserGeometryName>,<poserInternalName>,<poserExternalName>,<dsGeometryName>,<ds4Name>,<yR>,<xR>,<zR>,<xT>,<yT>,<zT><br /># Details:TEST 3: Using the "Insert code snippet" button and selecting C++. What I see in the edit box after inserting the code snippet looks correct (first attached image), but what appears in the post doesn't (third attached image) - at least not until I do a Ctrl-F5 hard page refresh (fourth attached image):
Test 4: Insert Code Snippet again with just the three lines starting with # and 'Python' (i.e. Python comments). Same observations as test 3.
Test 5: Cut(from Microsoft Notepad)-and-paste(using 'Paste as plain text') and apply 'Computer Code' block style (fifth image is a screenshot of 'Paste as plain text' dialogue)
# Dataline Syntax:<br /># <propName>,<vertexCount>,<poserGeometryName>,<poserInternalName>,<poserExternalName>,<dsGeometryName>,<ds4Name>,<yR>,<xR>,<zR>,<xT>,<yT>,<zT><br /># Details:I'm using Firefox 44.0 on a Windows 7 system.
Regarding what the post looks like immediately after you post: it looks that way because the post is submitted and returned via AJAX and has not had the full styling applied yet. A simple page refresh will fix the issue, and anybody else looking at the post will see it as it was meant to be seen. You are the only one who ever sees it in that semi-formatted state. Because of this, it's very low on our priority list. It will probably get fixed at some point, but in the meantime, take solace in the fact that you are the only one that sees it that way, and a simple page refresh will fix it.
As for the other issues, I'll take a look at them when I can. Thanks for the bug reports.
Thanks for the reply, and for splitting this off into a separate thread.
So there are a couple of workaround options for the "Computer Code" block style problems:
That'll keep me happy enough for now.
(N.B. The AJAX delay you mention may also be part of the rather weird Support Request #205254 - "Forum Image Problem: If you attach an image, make it inline, and then delete the attachment some people now see it, others don't" that I raised with this post)