Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Displaying HTML code on pages
#4
mvlcek Wrote:
Angryboy Wrote:I want to be able to display code such as:

Code:
<?php
function get_author_username($blogusername) {
...
?>

This works just fine for me in the page!?

Angryboy Wrote:This even goes for showing other bracketed codes:
Code:
(% stuff in here %)

This is a real problem.
There is a workaround if you have htmlentities in ckeditor switched on (which is the default at least for GS 3.0): before saving the page go to source view and replace all % by %, then save immediately without switching to WYSIWYG mode.
I know it works fine for you, which is why I am a little jealous to be frank XD As you can see on the page link I gave, the code is still being processed as though the < and > were actual markers instead of entities. The HTML I view when I look at the CKEditor source on the page content tells me that they are entities, yet the page still processes them as non-entities. What is more annoying is that the code is displaying just fine from within the CKEditor!

@marcco: thanks for the contribution. Because I have a lot of code snippets in my tutorials however, it would be a bit cumbersome to produce a component for every code snippet I produced XD
Reply


Messages In This Thread
Displaying HTML code on pages - by Angryboy - 2012-04-03, 18:52:54
Displaying HTML code on pages - by mvlcek - 2012-04-03, 19:09:59
Displaying HTML code on pages - by marrco - 2012-04-03, 19:42:18
Displaying HTML code on pages - by Angryboy - 2012-04-03, 20:11:25
Displaying HTML code on pages - by mvlcek - 2012-04-03, 20:48:56
Displaying HTML code on pages - by eatons - 2012-04-04, 06:39:35
Displaying HTML code on pages - by Angryboy - 2012-04-04, 17:08:44
Displaying HTML code on pages - by eatons - 2012-04-04, 20:32:05
Displaying HTML code on pages - by Angryboy - 2012-04-04, 21:07:46



Users browsing this thread: 1 Guest(s)