文档中心 scp2 集成

WordPress 3.7.1整合

集成发布于 2023-03-07更新于 2026-06-15 16:10

相关资料:官方网站示例下载产品源代码授权生成器开发文档报价单OEM版价格源码版价格Discuz!X2截屏插件,

在线演示:标准版专业版fckeditor2,ckeditor3, KindEditor3,xhEditor,

配置:图片格式图片地址正则自定义域名文件字段名称扩展字体原始图片文字特效Session授权码快捷键区域选框颜色上传地址截取指定区域屏幕提示窗口请求参数

源码编译:ActiveX(x86),ActiveX(x64),npapi,NativeMessage,macOS,linux(海光,兆芯),arm(鲲鹏,飞腾),mips,LoongArch,

asp示例:普通示例,FCKEditor2x,CKEditor3xCKEditor4xKindEditor3xKindEditor4xTinyMCE3xTinyMCE4xUEditor1xxhEditor1xeWebEditor9x
.net示例:普通示例, FCKEditor2x,CKEditor3x,CKEditor4x,KindEditor3x,KindEditor4x,TinyMCE3x,TinyMCE4x,UEditor1x,xhEditor1x,eWebEditor9x
JSP示例:普通示例FCKEditor2xCKEditor3xCKEditor4xKindEditor3xKindEditor4xTinyMCE3xTinyMCE4xUEditor1xxhEditor1x
示例下载(PHP):普通示例, FCKEditor2.x,CKEditor3.x,CKEditor4.x,KindEditor3.x,KindEditor4.x,TinyMCE3.x,TinyMCE4.x,UEditor1.x,xhEditor1.x,eWebEditor9.x,HDwik5.0,CuteEditor6.x,WordPress3.x,,Joomla 3.4.7Drupal 7.34
vue-clickeditor5,tinymce5,ueditor
联系我们:QQ:1269085759(技术)QQ:3040217208(售后)QQ:1085617561(商务)微信:13235643658邮箱:1269085759@qq.com1085617561@qq.comqwl@ncmem.com

       


插件下载(PHP):wordpress 3.7.1,


说明:由于许多插件可能使用相同钩子,导致冲突,所以提供手支方式整合。

1.上传插件目录。

说明:WordPress 3.7.1 使用的是TinyMCE4.x。插件目录必须是TinyMCE4.x的插件目录

2.在functions.php中增加插件初始化代码和编辑器工具栏按钮

为编辑器增加工具栏按钮

增加插件初始化代码:

示例代码:

//WordPaster插件-加载

function ScreenCapture_Plugin()

{

$plugins = array('screencapture'); //Add any more plugins you want to load here

$plugins_array = array();

//Build the response - the key is the plugin name, value is the URL to the plugin JS

foreach ($plugins as $plugin ) {

$plugins_array[ $plugin ] = plugins_url($plugin."/") . 'editor_plugin.js';

}

return $plugins_array;

}

add_filter('mce_external_plugins',"ScreenCapture_Plugin");

//WordPaster插件-初始化

function ScreenCapture_init(){

echo '<link type="text/css" rel="stylesheet" href="' . WP_PLUGIN_URL . '/wordpaster/css/ui-lightness/jquery-ui-1.8.11.custom.css" />'." ";

echo '<script type="text/javascript" src="' . WP_PLUGIN_URL . '/wordpaster/js/jquery.min.js" charset="utf-8"></script>'." ";

echo '<script type="text/javascript" src="' . WP_PLUGIN_URL . '/wordpaster/js/jquery-ui-1.8.11.custom.min.js"></script>'." ";

//截屏插件

echo '<link type="text/css" rel="Stylesheet" href="' . WP_PLUGIN_URL . '/screencapture/css/ScreenCapture.css"/>'." ";

echo '<script type="text/javascript" src="' . WP_PLUGIN_URL . '/screencapture/js/ScreenCapture.js" charset="utf-8"></script>'." ";

echo '<script language="javascript" type="text/javascript">'." ";

//截屏插件

echo ' var scpMgr = new CaptureManager();'." ";

echo ' scpMgr.Init(null);'." ";

echo '</script>';

}

add_action( 'admin_print_scripts', ScreenCapture_init' );

3.修改upload.php返回路径。

4.修改ScreenCapture.js中的PostUrl

整合效果: