More code formatting options

Page 1 of 2 12 LastLast
  1. #1

    More code formatting options

    GitHub Gist code samples can now be added to forum posts by using the [gist] tag



    The id of the Gist is added between the [gist] tags.

    Example

    [gist]7c2fdbcf1b6b2485b26b[/ gist] <-- remove that space in closing tag
    The Gist ID is easily copied from the url of your Gist. You'll need to copy the last string of characters from the url, then paste between the [gist] tags.

    Attached Thumbnails Click image for larger version. 

Name:	Screenshot 2015-01-16 01.01.14.png 
Views:	119 
Size:	41.1 KB 
ID:	18981  
    Last edited by geoffrey.mcgill; Jan 19, 2015 at 4:07 AM.
    Geoffrey McGill
    Founder
  2. #2

    New [HTML] tag option for formatting markup syntax

    A new [HTML] tag has been added to the WYSIWYG editor. Located to the right of the [CODE] button.

    While the [CODE] and [HTML] buttons both provides code sample formatting, they each specialize in the type of code sample.

    The [HTML] tag is better suited for markup type code samples, such as pasting ASP.NET markup syntax.

    The [CODE] tag is better suited for C# or JavaScript syntax.

    The following sample demonstrates using an [HTML] tag to format a block of ASP.NET markup.

    <ext:Viewport runat="server" Layout="HBoxLayout">
        <LayoutConfig>
            <ext:HBoxLayoutConfig Align="Stretch" />
        </LayoutConfig>
        <Items>
            <ext:TextArea ID="txtOne" runat="server" Flex="1" />
            <ext:TextArea ID="txtTwo" runat="server" Flex="1">
                <Listeners>
                    <Focus Handler="this.selectText()" />
                </Listeners>
            </ext:TextArea>
            <ext:TextArea ID="txtThree" runat="server" Flex="1" />
        </Items>
    </ext:Viewport>
    As always, your block of code should be added between opening [HTML] and closing [/ HTML] tags.
    Last edited by geoffrey.mcgill; Jan 19, 2015 at 4:46 AM.
    Geoffrey McGill
    Founder
  3. #3

    New [var] tag option for formatting inline code

    We also just added a new var bbcode. The var bbcode allows for inline formatting of small code fragments, such as highlighting a variable or class name.

    The var tag can be added two way. First by manually wrapping a small chunk of code or class name in var tags. Second, by highlighting the string in the WYSIWYG editor and clicking the new <> button.



    Example

    [var]public[/ var] <-- remove that extra space in the closing tag
    The following example demonstrates a response which includes several highlighted code fragments, and the final parsed output is added below.

    Input

    Decorating a server-side [var]public[/ var] or [var]public static[/ var] Method with the [var][DirectMethod][/ var] Attribute
    Output

    Decorating a server-side public or public static Method with the [DirectMethod] Attribute

    Hope this helps.
    Attached Thumbnails Click image for larger version. 

Name:	var_button.png 
Views:	19 
Size:	17.0 KB 
ID:	20611  
    Last edited by geoffrey.mcgill; Feb 08, 2015 at 7:11 PM.
    Geoffrey McGill
    Founder
  4. #4
    Helpful, needed and ... sweet.
  5. #5
    I think previous tag more efficient.double click ,copy and pest.but now we need to copy manually.
  6. #6
    I think previous tag more efficient.double click ,copy and pest.but now we need to copy manually.
    Thank you for the feedback. We hope to get this functionality back.
  7. #7
    We've added a Copy to clipboard feature to the code samples.

    Hope this helps.
    Geoffrey McGill
    Founder
  8. #8
    Speaking of formatting and layout changes, is it possible we make forum font colors darker or maybe a dark theme option?
  9. #9
    Hi Dimitris, font color is darker now. Thanks!
    Last edited by Ozgur; Feb 11, 2015 at 8:27 AM.
  10. #10
    Thank you, the forum reads excellent now.
Page 1 of 2 12 LastLast

Similar Threads

  1. [CLOSED] EXT.NET MVC Razor view Code Formatting tool
    By matrixwebtech in forum 2.x Legacy Premium Help
    Replies: 2
    Last Post: Feb 20, 2018, 7:11 PM
  2. [CLOSED] How to get store's last applied options in Ext.NET 3
    By anup in forum 3.x Legacy Premium Help
    Replies: 3
    Last Post: Dec 24, 2014, 11:54 AM
  3. Search options forum
    By CarWise in forum Open Discussions
    Replies: 2
    Last Post: Sep 13, 2012, 6:47 AM
  4. More options for Cookie Provider?
    By knave in forum 1.x Help
    Replies: 1
    Last Post: Sep 17, 2011, 10:34 AM
  5. Store.getRowsValue(options)
    By sonnt in forum 1.x Help
    Replies: 1
    Last Post: Jun 23, 2009, 3:56 AM

Posting Permissions