[wordpress插件] Code Snippet DM程式码片段DM

wordpress 插件 文章 2020-03-26 17:00 447 0 全屏看文

AI助手支持GPT4.0

评分
100
描述

Display your code snippets in a stylish way inside your content.

以一种时尚的方式在您的内容中显示您的代码段。

The plugin uses shortcodes and also very intuitive TinyMCE interface.

该插件使用短代码和非常直观的TinyMCE界面。

Code Snippet DM was inspired by the Carbon project.

代码段DM的灵感来自 Carbon 项目。

We created a simple way to display your code snippets but also have control over the way it appears, thus making it more stylish.

我们创建了一种简单的方法来显示您的代码段,但也可以控制其代码段的显示方式,从而使其更加时尚。

Also, on the front end in the top right you will find a Copy Code button that allows you to copy to clipboard the entired code snippet.

另外,在右上角的前端,您会发现一个 Copy Code 按钮,可用于将整个代码段复制到剪贴板。

The plugin provides you with a TinyMCE button that will allow you to display the code or an option to use a shortcode.

该插件为您提供了一个TinyMCE按钮,可让您显示代码或使用简码的选项。

You can open the shorcode [dm_code_snippet] and in the content inside and close it [/dm_code_snippet].

您可以打开短代码 [dm_code_snippet] ,然后在其中的内容中将其关闭,并关闭 [/ dm_code_snippet]

Options

选项

There are a number of options that you can use in the shortcode:

您可以在简码中使用许多选项:

    • background with options yes or no will enable/disable the color background (Default yes)

    • 背景以及选项将启用/禁用彩色背景(默认为

      li>

      li>

    • background-mobile with options yes or no will enable/disable the color background for mobile devices (Default yes

    • 背景移动设备,具有选项的选项将启用/禁用移动设备的彩色背景(默认为

      strong>)

    • strong>)

    • bg-color accepts any HEX, RGB or RGBA value to change the background color (Default #abb8c3)
    • bg-color 接受任何HEX,RGB或RGBA值以更改背景颜色(默认#abb8c3

    • theme with options light or dark that changes the code editor theme (Default dark)

    • 主题,带有选项 light dark 可以更改代码编辑器主题(默认为 dark

      >

      >

    • language with options php, javascript, css, markup, <

    • 语言,带有选项 php javascript css 标记,<

      strong>clike, python, ruby will highlight the syntaxes based on what you select for your code (Default php)

      strong> clike python ruby​​ 将根据您为代码选择的语法(默认为 php )突出显示语法

      li>

      li>

    • wrap with options yes or no will wrap the code or add a horizontal scroll bar to display it as it is (Default

    • 自动换行,并带有选项 yes 将自动换行代码或添加水平滚动条以将其原样显示(默认

      >no)

    • >否

    • copy-text this is used for the text shown on the copy button.

    • 复制文本,用于复制按钮上显示的文本。

      If it’s not added it will use the default option.

      如果未添加,它将使用默认选项。

      (Default Copy Code)

    • (默认复制代码

    • copy-confirmed this is used for the text shown after you click the copy button.

    • 已复制确认,用于单击“复制”按钮后显示的文本。

      If it’s not added it will use the default option.

      如果未添加,它将使用默认选项。

      (Default Copied)

    • (默认已复制

    Example of shortcode:

    简码示例:

    [dm_code_snippet background="yes" background-mobile="yes" bg-color="#abb8c3" theme="light" language="css" wrapped="no" copy-text="Get the

      [dm_code_snippet background =“ yes” background-mobile =“ yes” bg-color =“#abb8c3” theme =“ light” language =“ css” wrapped =“ no” copy-text =“ Get the

    Code!"

    码!”

    copy-confirmed="You have it!"]

    复制确认=“您拥有!”]

    .dm-code-snippet.dark {  

    .dm-code-snippet.dark {  

    background: $default-bg;  

    背景:$ default-bg;  

    padding: 40px 35px 45px 35px;  

    填充:40px 35px 45px 35px;  

    margin: 30px 0;

    边距:30px 0;

    }

    }

    [/dm_code_snippet]

    [/ dm_code_snippet]

    Use the TinyMCE button if you don’t want to add the shortcode yourself.

    如果您不想自己添加简码,请使用TinyMCE按钮。

    (see Screenshots)

    (请参见屏幕截图)

安装步骤

    1. Upload code-snippet-dm folder to the /wp-content/plugins/ directory.
    2. code-snippet-dm 文件夹上传到 / wp-content / plugins / 目录。

    3. Activate the plugin through the ‘Plugins’ menu in WordPress.
    4. 通过WordPress中的“插件”菜单激活插件。

    5. Start using the shortcode or TinyMCE button to display your code.
    6. 开始使用简码或TinyMCE按钮显示您的代码。

下载地址
https://downloads.wordpress.org/plugin/code-snippet-dm.zip
-EOF-

AI助手支持GPT4.0


国内超级便宜服务器

摸鱼人热门新闻聚合

钻级赞助商 我要加入

开发者在线工具

第三方支付技术请加QQ群

相关文章
[wordpress插件] appstore-italiaappstore里,意大利
[wordpress插件] A2Z Group&#039;s &#8211; UPS Shipping Plugin for WooCommerceA2Z集团的– WooCommerce的UPS运输插件
[wordpress插件] Clipboard with title content-IVD带有标题内容的剪贴板-IVD
[wordpress插件] Alientech StatsAlientech统计
[wordpress插件] Contact Form 7 Image Captcha联系表7 Image Captcha
随便看看
在ipad上有时候图片会显示不出来,被绿色覆盖了 629
云开发云函数修改后重新部署还需要重新上传小程序进行审核吗? 616
数据库读取的数据怎么在小程序中调用? 418
短信打开小程序能否用其它第三方短信平台来发送? 445
求问列表渲染中,怎么把两张图并排? 405
公众号迁移,openid接口转换问题? 491
小程序是否可以考虑提供一键获取用户手机号和用户昵称头像? 705
请问一下,我先微信认证了微信小程序,现在想微信认证公众号,都是在同一个公司名下,需要再交300元吗? 781
商城小程序适合用云开发的方式来开发吗? 369
笔记本电脑部份微信小程序打不开? 732