Results 1 to 2 of 2

Thread: How to insert a script (code snippet) inside html editor

  1. #1
    New user
    Join Date
    02-08-17.
    Posts
    1

    Frage How to insert a script (code snippet) inside html editor

    Hi there!
    Hope someone can help me with the problem that I can not insert a javascript (code snippet) in the html editor. The contao version is 2.9.5. I added <script> under system -> settings -> allowed HTML tags but it still does not show up on the frontpage. When I insert the code and press update it wraps the code with <![CDATA[ ... ]]> like WordPress does but when I look a bit further in the source code of the site I see that Google Maps (for example) gets wrapped with /*<![CDATA[*/ ... /*]]>*/ so it is somehow commented out. So the specific question is how can I add a code snippet inside the html editor?
    Thanks in advance for your help. The customer I am working for is very impatient so I need to come up with a solution asap.
    - Philipp

  2. #2
    User Andreas's Avatar
    Join Date
    07-11-09.
    Location
    Mönchengladbach
    Posts
    499

    Default

    This CDATA is correct if your site is XHTML.
    Web-Development, Freelancer, Burgtech, XHTML, HTML5, CSS, PHP, Javascript, MooTools, MySQL and more
    Amazon wishlist

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •