@andrii-baran/summernote-image-attributes

中文文档
1.0.4发布于 2025/02/10ISCCommonJS近 30 天下载 1734

Summernote plugin to edit image attributes

原始使用文档

summernote-image-attributes

Summernote-image-attributes has undergone a make over, we redesigned the Dialog Layout to make it easier to use. New classes have been submitted to the Summernote main Repository, be sure to grab the latest master and build it for the class styling additions.

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.

if you use bootstrap5, you must add **/bootstrap5/**summernote-image-attributes.js instead of summernote-image-attributes.js

<script src="summernote-image-attributes.js"></script>
OR
<script src="/bootstrap5/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
  • French Translation
  • Chinese (Traditional) Translation
  • Italian Translation
  • German Translation and Horizontal Dialog Layout
  • Turkish Translation
  • Romanian Translation

版本与发布记录

@andrii-baran/summernote-image-attributes 共发布 1 个版本,首次发布于 2025/02/10;过去 12 个月发布了 0 个版本。

版本发布日期距今
1.0.4latest2025/02/101.7 年前

关于 @andrii-baran/summernote-image-attributes 的常见问题

@andrii-baran/summernote-image-attributes 是什么?

Summernote plugin to edit image attributes

如何安装 @andrii-baran/summernote-image-attributes?

在项目目录运行 npm install @andrii-baran/summernote-image-attributes,或使用 pnpm add / yarn add / bun add。

@andrii-baran/summernote-image-attributes 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/andrii-baran__summernote-image-attributes 是否存在。

@andrii-baran/summernote-image-attributes 支持 ESM 还是 CommonJS?

以 CommonJS 形式发布,可以直接 require();在 ES Module 项目中也可以用 import 引入(Node.js 会把 module.exports 作为默认导出)。

@andrii-baran/summernote-image-attributes 可以商用吗?

@andrii-baran/summernote-image-attributes 使用 ISC 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@andrii-baran/summernote-image-attributes 的下载量有多少?

根据 npm 官方下载统计,@andrii-baran/summernote-image-attributes 在 2026/10/06 – 2026/11/04 这 30 天内被下载 1,734 次,日均约 58 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@andrii-baran/summernote-image-attributes 还在维护吗?

最新版本 1.0.4 发布于 2025/02/10(1.7 年前);至今共发布 1 个版本,其中过去 12 个月发布了 0 个;首次发布于 2025/02/10。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。