I am using HTML snippet in to Highlight HTML and Javascript code in blog Joomla. but it's executed after saving it

蓝咒 提交于 2019-12-25 02:21:57

问题


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.

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


回答1:


You should turn off HTML stripping, or include it as a Custom HTML Module, and writing the position in the article with load position. to load the custom HTML you've put in the Module. i.e.

{loadposition YourModulePosition}

Will load anything you place within a Custom HTML Module.




回答2:


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.

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>

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



来源:https://stackoverflow.com/questions/8306553/i-am-using-html-snippet-in-to-highlight-html-and-javascript-code-in-blog-joomla

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!