syntaxhighlighter

Extra Lines using SyntaxHighlighter for Chrome Only?

房东的猫 提交于 2019-12-03 04:49:06
Extra lines are being inserted when I am using Chrome to look at a draft blog post (on blogger) that uses syntax highlighter e.g. But on IE it looks fine: Any ideas what I am doing wrong here? edit: The config/setup for SyntaxHighlighter I am using is below: <!-- Syntax Highlighter Additions START --> <link href='http://alexgorbatchev.com/pub/sh/current/styles/shCore.css' rel='stylesheet' type='text/css'/> <link href='http://alexgorbatchev.com/pub/sh/current/styles/shThemeDefault.css' rel='stylesheet' type='text/css'/> <script src='http://alexgorbatchev.com/pub/sh/current/scripts/shCore.js'

How can I show code (specifically C++) in an HTML page?

风流意气都作罢 提交于 2019-12-03 02:28:18
How can I show code in a website using HTML? Basically, I have a C++ program that I'd like to share on my website and I want to show it in the page. Is there anyway to show a C++ code in HTML other than using HTML text? jessegavin You can use SyntaxHighlighter . It will unobtrusively enhance code samples on your page with specific syntax highlighting for a wide range of languages. Here's an example for C++ <head> <link href="css/shCore.css" rel="stylesheet" type="text/css" /> <link href="css/shThemeDefault.css" rel="stylesheet" type="text/css" /> </head> <body> <pre class='brush: cpp'> // my

Automatic line break in js SyntaxHighlighter

时光毁灭记忆、已成空白 提交于 2019-11-30 08:29:19
Im using the js SyntaxHighlighter 3.0.83 from http://alexgorbatchev.com/SyntaxHighlighter/ I've been googling the entire world now it seem but cant really find how to enable line breaks. Instad i get a horizontal scrollbar, which is good sometimes but not in my scenario. In example Anyone out there who know the way around this? I don't actually use SyntaxHighlight, but it seems to be possible to attach an white-space: pre-wrap CSS style to the <pre> or <script> tag that SyntaxHighlight uses. HTML (using <pre> ): <pre class="brush: js" class="syntaxhighlight"> /** * SyntaxHighlighter */

Blogger SyntaxHighlighter doesn't work at all

泄露秘密 提交于 2019-11-30 08:24:28
I've been trying to install SyntaxHighlighter 3.0.83 on Blogger for couple hours. I've tried many tutorials but it still doesn't work. I mean it looks just as normal text inserted nto pre tag. I created a new blog and pasted: <link href='http://alexgorbatchev.com/pub/sh/current/styles/shCore.css' rel='stylesheet' type='text/css'/> <link href='http://alexgorbatchev.com/pub/sh/current/styles/shThemeDefault.css' rel='stylesheet' type='text/css'/> <script src='http://alexgorbatchev.com/pub/sh/current/scripts/shCore.js' type='text/javascript'></script> <script src='http://alexgorbatchev.com/pub/sh

kindeditor3.x升级到4.x 加入代码高亮功能

假装没事ソ 提交于 2019-11-29 19:31:55
目前kindeditor已经升级到了4.1.2版本,其中4.0以上版本已经加入了代码高亮功能,所以决定把系统中kindeditor从3.x升级到最新的4.1.2, 不过官方对于代码高亮功能,并未给予太多的说明,还需要自己做一些摸索,好在kindeditor的用户还是比较多的,相对资料也比较多。 对于kindeditor升级,官方给了一个说明文档,相对还是比较详细的: http://www.kindsoft.net/docs/upgrade.html 首先在kindeditor官网下载最新4.1.2版本的插件包: http://kindeditor.googlecode.com/files/kindeditor-4.1.2.zip 下载完毕后进行解压,目录中: asp、jsp、php:这几个目录主要放着对应语言的示例程序 那么我们需要的主要是:lang、plugins、themes这几个文件夹,分别对应着是:语言包、插件包、主题样式 将这三个包,复制放到我们项目里去。 1.在要显示kindeditor的页面引入下面文件 <script charset="utf-8" src="/ke4/kindeditor.js"></script> <script charset="utf-8" src="/ke4/lang/zh_CN.js"></script> 2.然后加入初始化代码

How do I set up a syntax highlighter on Blogger? [closed]

孤街醉人 提交于 2019-11-29 19:14:11
How do I set up a syntax highlighter on Blogger's new interface? I did try with many options but nothing has worked. Please give any suggestions. 1. First, take backup of your blogger template 2. After that open your blogger template (In Edit HTML mode) & copy the all css given in this link before </b:skin> tag 3. Paste the followig code before </head> tag <script src='http://syntaxhighlighter.googlecode.com/svn/trunk/Scripts/shCore.js' type='text/javascript'></script> <script src='http://syntaxhighlighter.googlecode.com/svn/trunk/Scripts/shBrushCpp.js' type='text/javascript'></script> <script

Blogger SyntaxHighlighter doesn't work at all

*爱你&永不变心* 提交于 2019-11-29 11:40:18
问题 I've been trying to install SyntaxHighlighter 3.0.83 on Blogger for couple hours. I've tried many tutorials but it still doesn't work. I mean it looks just as normal text inserted nto pre tag. I created a new blog and pasted: <link href='http://alexgorbatchev.com/pub/sh/current/styles/shCore.css' rel='stylesheet' type='text/css'/> <link href='http://alexgorbatchev.com/pub/sh/current/styles/shThemeDefault.css' rel='stylesheet' type='text/css'/> <script src='http://alexgorbatchev.com/pub/sh

kindeditor4.x整合SyntaxHighlighter代码高亮

只谈情不闲聊 提交于 2019-11-28 19:20:54
kindeditor4.x代码高亮功能默认使用的是prettify插件,prettify是Google提供的一款源代码语法高亮着色器,它提供一种简单的形式来着色HTML页面上的程序代码,不过因为SyntaxHighlighter的应用非常广泛,所以将kindeditor默认的prettify替换为SyntaxHighlighter代码高亮插件。 1.第一步首先修改kindeditor代码高亮写入pre标签时的class类名: 打开/kindeditor4/plugins/code/code.js,找到类似于这样一行: html = '<pre class="prettyprint' + cls + '">\n' + K.escape(code)'</pre>'; 改为以下的内容: //html = '<pre class="prettyprint' + cls + '">\n' + K.escape(code) +'</pre>'; //将代码高亮替换为SyntaxHighlighter插件需要的类名 html = '<pre class="brush:' + type + ';">\n' + K.escape(code) +'</pre>'; //此处为将原有写法注释,上一行为修改后的内容。 2.自定义页面中kindeditor中选择“插入代码”的图标,下拉菜单中的语言选择项:

How do I set up a syntax highlighter on Blogger? [closed]

六眼飞鱼酱① 提交于 2019-11-28 14:53:14
问题 How do I set up a syntax highlighter on Blogger's new interface? I did try with many options but nothing has worked. Please give any suggestions. 回答1: 1. First, take backup of your blogger template 2. After that open your blogger template (In Edit HTML mode) & copy the all css given in this link before </b:skin> tag 3. Paste the followig code before </head> tag <script src='http://syntaxhighlighter.googlecode.com/svn/trunk/Scripts/shCore.js' type='text/javascript'></script> <script src='http:

我的网站搭建 (第十天) Ueditor编辑器

半城伤御伤魂 提交于 2019-11-27 14:57:16
之前说过,我的网站编辑器一开始是tinymce,然后才用的ckeditor。可是最近我发现,ckeditor的小图标不是很美观,看久了有点low的样子。我是不是应该换一个编辑器呢,一想到这里,马上打开谷歌搜索有没有更加美观的富文本编辑器。翻了几页,才发现百度Ueditor编辑器就很不错,其实之前我就了解过,但是并没有学习去怎么使用,这回好了,换个富文本编辑器顺便把Ueditor给学会了 安装及使用 1.Ueditor其实对python2和python3有一定的区别,在写程序时想通过Django的form表单顺便把评论框也改成Ueditor,但是没有将其实现却发现了错误提示为: from widgets import UEditorWidget,AdminUEditorWidget ImportError: No module named ‘widgets’ 经查发现,DjangoUeditor是基于Python 2.7的,对Python3的支持有问题。导致widgets.py文件出错,不能import,解决方法可以修改widgets.py或者采用网上修改好的版本DjangoUeditor3,github就有很多Ueditor的代码,有些不能直接使用,可能太久没更新了吧,然后才找到了: https://github.com/twz915/DjangoUeditor3 2