简体   繁体   English

在CKEditor中,如何使用Ruby注释元素和CKEditor以外的其他HTML?

[英]In CKEditor, how can I use Ruby annotation elements and other HTML not core to CKEditor?

I need to input this code through CKEditor: 我需要通过CKEditor输入以下代码:

 <ruby>niroj adhikary<rp>(</rp><rt>this is name</rt><rp>)</rp></ruby> 

CKEditor is not accepting these elements. CKEditor不接受这些元素。 Is there any plugin that will add support or another way to add those elements? 是否有任何插件会增加支持或添加这些元素的其他方式?

It should render like this: 它应该这样渲染:

Ruby注释示例

You need to have some plugin installed to put code snippets in the posts. 您需要安装一些插件才能将代码段添加到帖子中。 There is one called codesnippets. 有一个称为codenippets。 Get it from here for ckeditor: 从此处获取ckeditor:

  1. http://ckeditor.com/addon/codesnippet http://ckeditor.com/addon/codesnippet
  2. http://sdk.ckeditor.com/samples/codesnippet.html http://sdk.ckeditor.com/samples/codesnippet.html

changing these things in my config file helped 更改我的配置文件中的这些内容有助于

config.allowedContent = true;
config.entities = false;
CKEDITOR.filter.disabled = true;

on pasting above code on source, The result is as in image. 在源代码上粘贴以上代码时,结果如图所示。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM