We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 10339
    • 2 Posts
    I’m new to ModX and so far it has been a breeze to work with. I’m a C++ programmer and want to add a blog to my software site. Well I got the blog created just fine and installed the Geshi syntax highlighting plugin.

    When I go to make a post using the FCKeditor and choose the formatted text option( which uses the <pre> tags) it works fine unless I use a line break( via return key not manual editing). In that case it outputs my source code example in the blog like so: <pre>int main()
    {
    return 0;
    }</pre> and that is exactly how it outputs it to my website.

    Since it is a source code example I want the actual souce formatted just like I had coded it. I’ve done this before via a wordpress plugin so I know it’s possible. I feeling is I’m doing something wrong with the FCKeditor. So my question is is there a way to just display my code just like it was coded enclosed in the <pre> tag like the geshi plugin requires?

    Thanks alot ahead of time. I’m a C++ programmer and my experience with web related technolgies is a little lacking smiley
    • FCK editor will very helpfully encode all your tags so that they won’t work as expected. Turn off the editor for that page when you want to use tags, or use the "source" button.
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
      • "helpfully" ... hehe

        :)

        (can’t stand that $#%&$!@ code butcher)
          Ryan Thrash, MODX Co-Founder
          Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
        • When my husband and I bought a small house, one of the reasons I liked it (it was 90 years old, very shabby and run-down; needed a lot of work) was because there was an enourmous, ancient flowering vine draped across the entire side porch roof. As we were clearing the yard of weeds and trash, my youngest child "helpfully" took up a hatchet (which was forbidden the children to handle) and chopped through the vine where it climbed up a tree next to the porch. Then, undaunted in his determination to be "helpful" he pulled up all the wild grapevines on the old stone wall on the other side of the house. I wonder if the authors of FCK are acquainted with him?

            Studying MODX in the desert - http://sottwell.com
            Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
            Join the Slack Community - http://modx.org
            • 33337
            • 3,975 Posts
            Zaigham (aka zi) Reply #5, 18 years ago
            Though its my personal opinion, but I suggest to use TinyMCE ... far better than FCK.

            enjoy your MODx ride man smiley

            best regards,

            zi
              Zaigham R - MODX Professional | Skype | Email | Twitter

              Digging the interwebs for #MODX gems and bringing it to you. modx.link
              • 5683
              • 96 Posts
              I’m facing the same problem. For the moment, I am writing the general content of the page, disabling the RTE and adding the code inside <pre> tags, but it’s definitely not a good solution.

              In the near future, I plan to integrate the Textile plugin with the Geshi one, and write my pages using Textile.
                • 10339
                • 2 Posts
                Wow thanks everyone. Can’t believe I got that many helpful replies with some of you in the same boat as me. I’ll disable the editor and just use the source route. Thanks alot!

                *Edit* Yeah I got it to work by disabling the Rich Text option that was suggested. It’s working great. Thanks again.