@activix/summernote-image-attributes 中文文档教程

发布于 3 年前 浏览 21 更新于 2 年前

summernote-image-attributes

Summernote-image-attributes 进行了改造,我们重新设计了对话框布局,使其更易于使用。

Summernote 所见即所得编辑器的插件。

向图像弹出窗口添加一个按钮以编辑标题、替代、类和样式属性,以及具有相关属性的链接。

Installation

1. Include JS

在包含 Summernote 之后包含以下代码,要更改默认语言 (en-US),您必须在插件后添加 lang 文件。

<script src="summernote-image-attributes.js"></script>
<script src="lang/[language-COUNTRY].js"></script>

2. Supported languages

目前提供美国英语(默认)、西班牙语、法语、中文(繁体)、意大利语、德语和土耳其语!

3. Summernote options

最后,自定义 Summernote 图像弹出窗口。

$(document).ready(function() {
    $('#summernote').summernote({
        popover: {
            image: [
                ['custom', ['imageAttributes']],
                ['imagesize', ['imageSize100', 'imageSize50', 'imageSize25']],
                ['float', ['floatLeft', 'floatRight', 'floatNone']],
                ['remove', ['removeMedia']]
            ],
        },
        lang: 'en-US', // Change to your chosen language
        imageAttributes:{
            icon:'<i class="note-icon-pencil"/>',
            removeEmpty:false, // true = remove attributes | false = leave empty if present
            disableUpload: false // true = don't display Upload Options | Display Upload Options
        }
    });
});

4. Check out our other Summernote Plugins via our main Github page.

Contributors

  • Add links to Image
  • Thank you to minidc
  • Thank you to MarcosBL
  • French Translation
  • Thank you to b-alidr
  • Chinese (Traditional) Translation
  • Thank you to horkenw
  • Italian Translation
  • Thank you to paolodadda
  • German Translation and Horizontal Dialog Layout
  • Thank you to YaWK
  • Turkish Translation
  • Thank you to GoktugOzturk

summernote-image-attributes

Summernote-image-attributes has undergone a make over, we redesigned the Dialog Layout to make it easier to use.

A plugin for the Summernote WYSIWYG editor.

Adds a button to the image popover to edit title, alt, class and style attributes, and Links with relevant Attributes.

Installation

1. Include JS

Include the following code after including Summernote, to change the language from the default (en-US) you must add the lang file after the plugin.

<script src="summernote-image-attributes.js"></script>
<script src="lang/[language-COUNTRY].js"></script>

2. Supported languages

Currently available in US English (Default), Spanish, French, Chinese (Traditional), Italian, German and Turkish!

3. Summernote options

Finally, customize the Summernote image popover.

$(document).ready(function() {
    $('#summernote').summernote({
        popover: {
            image: [
                ['custom', ['imageAttributes']],
                ['imagesize', ['imageSize100', 'imageSize50', 'imageSize25']],
                ['float', ['floatLeft', 'floatRight', 'floatNone']],
                ['remove', ['removeMedia']]
            ],
        },
        lang: 'en-US', // Change to your chosen language
        imageAttributes:{
            icon:'<i class="note-icon-pencil"/>',
            removeEmpty:false, // true = remove attributes | false = leave empty if present
            disableUpload: false // true = don't display Upload Options | Display Upload Options
        }
    });
});

4. Check out our other Summernote Plugins via our main Github page.

Contributors

  • Add links to Image
  • Thank you to minidc
  • Thank you to MarcosBL
  • French Translation
  • Thank you to b-alidr
  • Chinese (Traditional) Translation
  • Thank you to horkenw
  • Italian Translation
  • Thank you to paolodadda
  • German Translation and Horizontal Dialog Layout
  • Thank you to YaWK
  • Turkish Translation
  • Thank you to GoktugOzturk
    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文