By Clayton Dukes on Wednesday, 29 October 2014
Likes 0
Views 804
Votes 0
I tried posting an entry where I wanted to include my Perl script in the post, but whenever I save changes, it would set htmlentities on things even though I had them marked as preformatted.
Using <pre> tags don’t work - even when my source code was wrapped inside pre tags, it still displayed the code wrong, like converting <cdukes@cdukes.com> to <cdukes@cdukes.com>

I also notice that with the tinymce editor, I can't select a group of text and make it preformatted - doing so made every single line of my script show as a separate preformatted line followed by a regular line followed by a preformatted line again. Quite ugly as you can imagine.
I ended up having to remove the script entirely from the post and just make it a download link - but this is not optimal since I want Google, etc. to crawl it.

Also, on the lines of preformatted text I was able to include (command outputs from running the script), I had to manually edit the html and set <p><pre>all of my code, etc, multiple lines</pre></p>
If I did it in the wysiwyg editor it completely hosed it.

Is there a better editor I can use that supports source code/preformatted text better?
It would be even better if there was an editor that could detect the type of code and do syntax highlighting, but I suppose I am dreaming now
Hello Clayton,

If you are an advanced user, you should use the CodeMirror editor that is shipped with Joomla. In EasyBlog 5, we'll be adding a Code block which you can paste block of code snippets
·
Wednesday, 29 October 2014 12:21
·
0 Likes
·
0 Votes
·
0 Comments
·
The problem was indeed TinyMCE.
I installed jck from http://www.joomlackeditor.com/downloads/viewcategory/46-jck-suite and it's working as it should be now.

Thanks!
·
Wednesday, 29 October 2014 15:43
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Clayton Dukes ,

You're welcome.
·
Wednesday, 29 October 2014 15:52
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post