CKEditor 添加更多符号

发布于 2024-09-27 21:40:11 字数 45 浏览 4 评论 0原文

如何在“插入特殊字符”面板中添加更多“自定义”符号?

谢谢。

How can I add more "custom" symbols in the Insert Special Character panel please?

Thank you.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

梦中楼上月下 2024-10-04 21:40:11

请注意,这也可以在配置文件中完成:

http:// docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-specialChars

Note this can be done in the config file as well:

http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-specialChars

段念尘 2024-10-04 21:40:11

在你的配置文件中 => config.js

CKeditor 文档:http: //docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-specialChars

config.specialChars = [ '"', '’', [ '&custom;', 'Custom label' ] ];
config.specialChars = config.specialChars.concat( [ '"', [ '’', 'Custom label' ] ] );

如果要添加特殊字符(例如希腊语):

config.specialChars = config.specialChars.concat( [ [ 'α', 'alpha' ],
      [ 'β', 'beta' ],
      [ 'γ', 'gamma' ],
      [ 'δ', 'delta' ],
      [ 'ε', 'epsilon' ],
      [ 'ζ', 'zeta' ],
      [ 'η', 'eta' ],
      [ 'θ', 'theta' ],
      [ 'ι', 'iota' ],
      [ 'κ', 'kappa' ],
      [ 'λ', 'lambda' ],
      [ 'μ', 'mu' ],
      [ 'ν', 'nu' ],
      [ 'ξ', 'xi' ],
      [ 'ο', 'omicron' ],
      [ 'π', 'pi' ],
      [ 'ρ', 'rho' ],
      [ 'σ', 'sigma' ],
      [ 'τ', 'tau' ],
      [ 'υ', 'upsilon' ],
      [ 'φ', 'phi' ],
      [ 'χ', 'chi' ],
      [ 'ψ', 'psi' ],
      [ 'ω', 'omega' ] ] );

In your config file => config.js

CKeditor Documentation: http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-specialChars

config.specialChars = [ '"', '’', [ '&custom;', 'Custom label' ] ];
config.specialChars = config.specialChars.concat( [ '"', [ '’', 'Custom label' ] ] );

If you want to add special characters (Greek for example):

config.specialChars = config.specialChars.concat( [ [ 'α', 'alpha' ],
      [ 'β', 'beta' ],
      [ 'γ', 'gamma' ],
      [ 'δ', 'delta' ],
      [ 'ε', 'epsilon' ],
      [ 'ζ', 'zeta' ],
      [ 'η', 'eta' ],
      [ 'θ', 'theta' ],
      [ 'ι', 'iota' ],
      [ 'κ', 'kappa' ],
      [ 'λ', 'lambda' ],
      [ 'μ', 'mu' ],
      [ 'ν', 'nu' ],
      [ 'ξ', 'xi' ],
      [ 'ο', 'omicron' ],
      [ 'π', 'pi' ],
      [ 'ρ', 'rho' ],
      [ 'σ', 'sigma' ],
      [ 'τ', 'tau' ],
      [ 'υ', 'upsilon' ],
      [ 'φ', 'phi' ],
      [ 'χ', 'chi' ],
      [ 'ψ', 'psi' ],
      [ 'ω', 'omega' ] ] );
Bonjour°[大白 2024-10-04 21:40:11

添加自定义符号实际上非常简单。在 ckeditor 文件夹中转到该文件:

ckeditor/plugins/specialchar/dialogs/specialchar.js

您将在文件中间看到一个大代码块,其中包含大量实体代码,最后一个是 - 在该代码之后,添加任何您想要的新内容以逗号分隔并用单引号括起来。 ,'新','新'。

我希望这有帮助!

Adding custom symbols is actually pretty easy. Within the ckeditor folder go to the file:

ckeditor/plugins/specialchar/dialogs/specialchar.js

You'll see a large code block halfway through the file containing a ton of entity codes, the last one is - after that one, add any new ones you want separated by commas and surrounded in single quotes. ,'new','new'.

I hope that helps!

庆幸我还是我 2024-10-04 21:40:11

打开您的 config.js 文件,

如果您想插入男性(♂)符号,请在配置文件中使用以下代码,

config.specialChars = config.specialChars.concat('♂');

如果您想插入带有自定义标签的男性符号,

config.specialChars = config.specialChars.concat(['♂', 'Male']);

Open up your config.js file,

If you want to insert male(♂) symbol use the below code in the config file,

config.specialChars = config.specialChars.concat('♂');

If you want to insert male symbol with custom label,

config.specialChars = config.specialChars.concat(['♂', 'Male']);
我不在是我 2024-10-04 21:40:11

我安装了 CKeditor 4,就我而言,我必须转到 root > >资产>后端> ckeditor > ckeditor.js

代码如下所示

Code as it was

然后我添加了这个补丁
γ δ ε ζ η θ ι κ λ μ ν ϋ ο π ρ σ τ υ φ χ ψ ω

它有效

I have a CKeditor 4 installed, in my case I had to go to root > assets > backend > ckeditor > ckeditor.js

The code looks like this

Code as it was

I then added this patch
γ  δ ε ζ η θ ι κ λ μ ν ξ ο π ρ σ τ υ φ χ ψ ω

and it works

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文