Forum WYSIWYG Issues

This discussion was created from comments split from: Smart+/PropGoto+ HANDPROXYDATA list (UPDATED FOR RELEASE 3).

Comments

  • 3dcheapskate3dcheapskate Posts: 2,728
    edited March 2016

    (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:

    • I originally used 'Formatted' (from the right-hand "Paragraph Format" dropdown) - that caused the offending behaviour since the long lines didn't wrap.
    • I've just removed that and tried 'Computer code' (from the left-hand "Block Styles" drop down) - that totally cacks it up! (which was why I used 'Formatted' in the first place)
    • 'Typewriter' from "Block Styles"seems to do the trick  :angel

    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 /> # &lt;propName&gt;,&lt;vertexCount&gt;,&lt;poserGeometryName&gt;,&lt;poserInternalName&gt;,&lt;poserExternalName&gt;,&lt;dsGeometryName&gt;,&lt;ds4Name&gt;,&lt;yR&gt;,&lt;xR&gt;,&lt;zR&gt;,&lt;xT&gt;,&lt;yT&gt;,&lt;zT&gt;<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&#39;s post and 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'

    &nbsp;&nbsp;&nbsp; var wDlg = new DzBasicDialog;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;<br /> &nbsp;&nbsp;&nbsp; var wWbLbl = new DzLabel( wDlg );<br /> &nbsp;&nbsp;&nbsp; wWbLbl.text = &quot;Blah, blah, blah, blah, ...ad infinitum...&quot;

    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)

    Post edited by 3dcheapskate on
  • ChoholeChohole Posts: 33,604

    Thank you

     

  • DAZ_BenjamDAZ_Benjam Posts: 25
    edited February 2016

    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:

    • I originally used 'Formatted' (from the right-hand "Paragraph Format" dropdown) - that caused the offending behaviour since the long lines didn't wrap.
    • I've just removed that and tried 'Computer code' (from the left-hand "Block Styles" drop down) - that totally cacks it up! (which was why I used 'Formatted' in the first place)
    • 'Typewriter' from "Block Styles"seems to do the trick  :angel

    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 /># &lt;propName&gt;,&lt;vertexCount&gt;,&lt;poserGeometryName&gt;,&lt;poserInternalName&gt;,&lt;poserExternalName&gt;,&lt;dsGeometryName&gt;,&lt;ds4Name&gt;,&lt;yR&gt;,&lt;xR&gt;,&lt;zR&gt;,&lt;xT&gt;,&lt;yT&gt;,&lt;zT&gt;<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&#39;s post and 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'

    &nbsp;&nbsp;&nbsp; var wDlg = new DzBasicDialog;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;<br />&nbsp;&nbsp;&nbsp; var wWbLbl = new DzLabel( wDlg );<br />&nbsp;&nbsp;&nbsp; wWbLbl.text = &quot;Blah, blah, blah, blah, ...ad infinitum...&quot;

    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)

    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 (&nbsp;) 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:

    &lt;?php        $url = 'example.com';        // create curl resource         $ch = curl_init();         // set url         curl_setopt($ch, CURLOPT_URL, $url);         //return the transfer as a string         curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);         // $output contains the output string         $output = curl_exec($ch);         // close curl resource to free up system resources         curl_close($ch);   

     

    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 (&lt;) 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.

    Post edited by DAZ_Benjam on
  • 3dcheapskate3dcheapskate Posts: 2,728
    edited March 2016

    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 &lt; and &gt; (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 &lt; and &gt (same after Ctrl-F5 hard page refresh);

    :HANDPROXYDATA

    # Dataline Syntax

    # &lt;propName&gt;,&lt;vertexCount&gt;,etc

     

    TEST 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 /># &lt;propName&gt;,&lt;vertexCount&gt;,&lt;poserGeometryName&gt;,&lt;poserInternalName&gt;,&lt;poserExternalName&gt;,&lt;dsGeometryName&gt;,&lt;ds4Name&gt;,&lt;yR&gt;,&lt;xR&gt;,&lt;zR&gt;,&lt;xT&gt;,&lt;yT&gt;,&lt;zT&gt;<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):

    :HANDPROXYDATA# Dataline Syntax:# &lt;propName&gt;,&lt;vertexCount&gt;,&lt;poserGeometryName&gt;,&lt;poserInternalName&gt;,&lt;poserExternalName&gt;,&lt;dsGeometryName&gt;,&lt;ds4Name&gt;,&lt;yR&gt;,&lt;xR&gt;,&lt;zR&gt;,&lt;xT&gt;,&lt;yT&gt;,&lt;zT&gt;# Details:

     

    Test 4: Insert Code Snippet again with just the three lines starting with # and 'Python' (i.e. Python comments). Same observations as test 3.

    # Dataline Syntax:# &lt;propName&gt;,&lt;vertexCount&gt;,&lt;poserGeometryName&gt;,&lt;poserInternalName&gt;,&lt;poserExternalName&gt;,&lt;dsGeometryName&gt;,&lt;ds4Name&gt;,&lt;yR&gt;,&lt;xR&gt;,&lt;zR&gt;,&lt;xT&gt;,&lt;yT&gt;,&lt;zT&gt;# Details:

     

    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 /># &lt;propName&gt;,&lt;vertexCount&gt;,&lt;poserGeometryName&gt;,&lt;poserInternalName&gt;,&lt;poserExternalName&gt;,&lt;dsGeometryName&gt;,&lt;ds4Name&gt;,&lt;yR&gt;,&lt;xR&gt;,&lt;zR&gt;,&lt;xT&gt;,&lt;yT&gt;,&lt;zT&gt;<br /># Details:
     

     

    I'm using Firefox 44.0 on a Windows 7 system.

     

    whatIsee.jpg
    937 x 408 - 48K
    whatIsee2.jpg
    782 x 270 - 30K
    WhatISawAfterPosting.jpg
    1119 x 463 - 82K
    Finally.jpg
    1366 x 768 - 166K
    test5.jpg
    676 x 390 - 49K
    Post edited by 3dcheapskate on
  • 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:

    • Using the "Insert Code Snippet" plus a page refresh after posting/editing
    • Using the "Typewriter" block style (as noted earlier)

    That'll keep me happy enough for now. smiley

    (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)

Sign In or Register to comment.