我正在使用HTML代码段在博客Joomla中突出显示HTML和Javascript代码.但保存后执行 [英] I am using HTML snippet in to Highlight HTML and Javascript code in blog Joomla. but it's executed after saving it

查看:63
本文介绍了我正在使用HTML代码段在博客Joomla中突出显示HTML和Javascript代码.但保存后执行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在创建文章时,我想显示一些HTML代码作为内容的一部分,但是保存该文章后,将执行HTML代码的特定代码段.

while creating a article I want to show some HTML code as part of content, but after saving that article that particular snippet of HTML code get executed.

我正在使用joomla 1.5 |文章中插入代码的代码引用扩展.有什么解决办法吗?

I am using joomla 1.5 | code citation extension for insert code in article. Is there any solution?

推荐答案

正确的方法应该是将代码粘贴到所见即所得(设计视图,而不是原始代码视图)中-只要您有一个不错的编辑器,尖括号即可应该应转换为html实体,并且应该可以正常工作.

The correct way should be to paste the code into the wysiwyg (design view, not raw code view) - as long as you have a decent editor the angle brackets should be converted to html entities and it should just work.

内置的Geshi插件(虽然有些陈旧)通常是添加彩色突出显示所需的全部.该插件有些过时,但是在插入代码后,您需要做的就是添加它:

The built-in Geshi plugin - though a little dated - is usually all that is needed to make add colored highlighting. The plugin is a little dated but after inserting your code all you need to do to make it work is add:

<pre class="html"> ... </pre>

围绕您的html.将HTML转换为js,css等HTML,具体取决于要显示的代码.

around your html. Chenge HTML to js, css, etc depending upon the code to be shown.

这篇关于我正在使用HTML代码段在博客Joomla中突出显示HTML和Javascript代码.但保存后执行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆