We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 32577
    • 2 Posts
    Hi,

    Just looking at MODx on my local machine {TextPattern - seems to fall over too easily}.

    Question:

    I have created a new page and have used html tags in the MODx editor - the published page just shows the exact code - ie not rendered in html.

    Obviously, I am not creating the MODx way!

    Can anyone point me in the right direction, please?

    Cheers!

    Mike
      • 1764
      • 680 Posts
      There are a couple of reasons this could happen. My first guess would be that the Content Type (in the Page Settings tab) was set to text/plain. It could also possibly be dependent on the Template you are using.

      If it’s not being caused by the Content Type, would you mind posting the source of one of your pages so that I can give it a look?
        • 33453
        • 141 Posts
        Hi Mike.

        It would appear that you are indeed not ’doing it the MODx way’.

        By default, when creating/editing a page the page contents input area uses a rich text editor, similar to a word processor. Things like headings, font characteristics, lists etc. are effected using a toolbar at the top of the edit area. It is not possible to directly enter HTML.

        There are 3 ways (that I can think of) to enable you to do this:
        1. You can turn off RT editing for the page. This is a checkbox somewhere near the top of the page, I believe (I am typing this from memory). this will give you just a plain text area which you can use for HTML.

        2. There is a button somewhere in the toolbar which will open another window contaning the HTML equivalent of whatever is in the RT window at the time. You can then edit this and save it. The changes will be reflected back into the RT area.

        3. You can write HTML into a named ’chunk’ (manage resources/chunks from the main menu). This can then be referred to from the page contents as {{chunkname}} using either the RT or the plain text editor. The HTML will then be insrted into the page at that point when the page is rendered.

        Hope this helps.
          • 32577
          • 2 Posts
          Thanks for the rapid feedback.

          Yep - the simplest way is to view the source in the editor.

          Thanks again.

          Cheers!

          Mike
            • 33337
            • 3,975 Posts
            Thanks zenmaster for detailed reply, and in addition to zenmaster’s post:

            If you are going to use pure html to input your data into MODx documents, then do not use RTE, because RTE automatically convert the sysmbols into their HTML entities, so it prevents MODx to render the desired output.

            There can be another case, say you are inserting a preformatted text in middle of your existing document, you can use the "SOURCE" button from FCKeditor to input your html.

            I hope this helps... and yes, Welcome to MODx community smiley.

            best regards,

            zi
            [edit] Oops, I am late laugh
              Zaigham R - MODX Professional | Skype | Email | Twitter

              Digging the interwebs for #MODX gems and bringing it to you. modx.link
              • 33453
              • 141 Posts
              Quote from: zi at Jan 19, 2006, 02:08 PM

              There can be another case, say you are inserting a preformatted text in middle of your existing document, you can use the "SOURCE" button from FCKeditor to input your html.

              That’s the button I meant. I couldn’t remember what it was called.