In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-10 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
How to add plug-ins to Imperial CMS FCKeditor? This problem may be often seen in our daily study or work. I hope you can gain a lot from this question. The following is the reference content that the editor brings to you, let's take a look at it!
How does Imperial CMS FCKeditor add plug-ins?
The Imperial Editor (FCK) does not have the function of inserting code by default, so it is customary to use reference when adding code, but this is too unprofessional, isn't it? What about it? Just add a plug-in to FCK. Here is the famous SyntaxHighlighter.
First of all, you can go to the official website to download the latest version, but the download is not available, but also some configuration, it is more difficult for beginners. The configured version (version 2.1.382) provided by hated Snow can be used directly here, and this tutorial is also based on that version.
After downloading and decompressing, there are two folders:
First, upload the SyntaxHighlighter2.1.382 folder to the root of the site, or any other place you like, and rename the folder, but the path should be correct when calling CSS and js in the later template file. Here I'll upload it to the root directory.
Second, add the following code to the content template, and pay attention to the first step here.
The code is as follows:
SyntaxHighlighter.config.clipboardSwf ='[!-news.url-] SyntaxHighlighter2.1.382/scripts/clipboard.swf';SyntaxHighlighter.all ()
It is worth mentioning that these JS, such as shBrushSql.js, are not always called. These JS have their own meaning (brushes), you can see the official documentation. Because I use css, html, php, and sql more often, I just write the js shown above. Of course, you can call it all if you want. But that would be slow. However, assuming that you do not call php, when you insert the code, the language selects php, then in the foreground, an error will be prompted. (shCore.js must be available, otherwise the front desk will have no effect.)
Third, transfer the folder "syntaxhighlight2" to the "e/admin/ecmseditor/infoeditor/editor/plugins" directory, that is, this is a plug-in to the FCK editor.
Fourth, modify the configuration file of the FCK editor, requiring the editor to add plug-ins and buttons.
1. Background configuration file path: / e/admin/ecmseditor/infoeditor/fckconfig.js
2. Foreground profile path: / e/data/ecmseditor/infoeditor/fckconfig.js
Find FCKConfig.PluginsPath = FCKConfig.BasePath + 'plugins/'; about line 51
Insert below
The code is as follows:
FCKConfig.Plugins.Add ('syntaxhighlight2','zh-cn'); / / default language options: CsharpGradeAccording to csharpGradeCssGradeDelphirewouldjavaforcejscriptptyrexhtmlFCKConfig.SyntaxHighlight2LangDefault =' clockwise'
Then find 'InsertTBr'] and enter' SyntaxHighLight2' 'after' InsertTBr''.
This is done, and the interface of the editor is roughly as follows:
The effect of the front desk is roughly as follows:
Thank you for reading! After reading the above, do you have a general idea of how to add plug-ins to Imperial CMS FCKeditor? I hope the content of the article will be helpful to all of you. If you want to know more about the relevant articles, you are welcome to follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.