如何将TinyMCE的代码示例插件放在phpfox中? [英] How to put Code Sample Plugin of TinyMCE in phpfox?

查看:115
本文介绍了如何将TinyMCE的代码示例插件放在phpfox中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个像图像波纹管这样的小型mce编辑器:

I have an tiny mce editor like image bellow:

我想将tinymce编辑器的代码示例插件放在phpfox中,例如:

and I want to put Code Sample Plugin of tinymce editor in phpfox like:

请告诉我该怎么办

推荐答案

  1. 如果未安装代码示例,则可以从 tinymce.com 下载整个捆绑软件,并包含来自目录js/tinymce/plugins/codesample/

  1. In case you don't have codesample installed, you can download entire bundle from tinymce.com and include plugin.min.js from directory js/tinymce/plugins/codesample/

prismjs.com 下载并包含在您的HTML页面中

Download prism.js and prism.css from prismjs.com and include in your HTML page

修改您的tinymce_setup.js并将代码样本添加到tinymce_setup.js 我的tinymce_setup.js看起来像

Modify your tinymce_setup.js and add codesample to your tinymce_setup.js My tinymce_setup.js looks like

tinymce.init({
  selector: 'textarea',
  height: 500,
  plugins: [
    'advlist autolink lists link image charmap print preview anchor',
    'searchreplace visualblocks code fullscreen',
    'insertdatetime media table contextmenu paste code codesample'
  ],
  toolbar: ("insertfile undo redo | styleselect | bold italic | " +
            "alignleft aligncenter alignright alignjustify | " +
            "bullist numlist outdent indent | link image table | " +
            "code fullscreen codesample"),
});

这篇关于如何将TinyMCE的代码示例插件放在phpfox中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆