什么是格式化C#在WordPress的最佳方式? [英] What's best way to format C# in WordPress?

查看:408
本文介绍了什么是格式化C#在WordPress的最佳方式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嘿博客在那里!我创建了我自己的托管WordPress的博客,和我在最困难的时候搞清楚到C#代码片段添加到我的博客的最好方式。你是什​​么都使用

Hey bloggers out there! I've created Wordpress blog that I am hosting myself, and I'm having the hardest time figuring out the best way to add C# snippets to my blog. What do you all use?

我目前使用的孕育SyntaxHighlighter的插件,它的伟大工程的大部分 - 唯一的问题是,切换回可视化编辑器删除所有whitsepace填充。我已经试过包装在<的[源代码]标签;预>的,但随后的格式化不能正常工作

I'm currently using the "SyntaxHighlighter Evolved" plugin, and it works great for the most part - the only problem is that switching back to the Visual Editor removes all of the whitsepace padding. I've tried wrapping the [sourcecode] tags in <pre>'s, but then the formatter doesn't work correctly.

任何帮助将非常感激。我花了约10小时试图想出一个强大的解决方案,也没有运气。
干杯!

Any help would be much appreciated. I've spent about 10 hours trying to come up with a robust solution, and no luck. Cheers!

推荐答案

查看的博客文章,我写这个确切的问题,这也解释了如何使用的 SyntaxHighlighter的和修复TinyMCE的,这样它不会搞砸你的空格或标签(您可以自定义WordPress的TinyMCE的文件之一,或使用的plugin 来为你做它)。

See the blog post that I wrote on this exact question, which explains how to use SyntaxHighlighter and fix TinyMCE so that it doesn't mess up your white space or tags (you can either customize one of the tinymce files in Wordpress, or use a plugin to do it for you).

这篇关于什么是格式化C#在WordPress的最佳方式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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