0

When inserting code into <pre> elements in CKEditor it picks up on strongly type objects like

public IQueryable<Post> PostArchive

it then adds a closing tag <post/> tag which messes up the syntax highlighting.

Any help please.

Tried config.allowedContent = true; in ckeditor but with no luck..

4

1 回答 1

0

我很确定您没有正确编码代码。

这就是您的数据的样子:

<pre>
public IQueryable&lt;Post&gt; PostArchive
</pre>

请注意,<Post>必须将其转换为&lt;Post&gt;,否则它是自定义 HTML 标记,这就是 parse 尝试修复它的原因。

于 2013-10-21T06:49:05.443 回答