项目作者: DiemenDesign

项目描述 :
Summernote plugin to edit image attributes
高级语言: JavaScript
项目地址: git://github.com/DiemenDesign/summernote-image-attributes.git
创建时间: 2016-03-31T09:53:18Z
项目社区:https://github.com/DiemenDesign/summernote-image-attributes

开源协议:MIT License

下载


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

  1. <script src="summernote-image-attributes.js"></script>
  2. OR
  3. <script src="/bootstrap5/summernote-image-attributes.js"></script>
  1. <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.

  1. $(document).ready(function() {
  2. $('#summernote').summernote({
  3. popover: {
  4. image: [
  5. ['custom', ['imageAttributes']],
  6. ['imagesize', ['imageSize100', 'imageSize50', 'imageSize25']],
  7. ['float', ['floatLeft', 'floatRight', 'floatNone']],
  8. ['remove', ['removeMedia']]
  9. ],
  10. },
  11. lang: 'en-US', // Change to your chosen language
  12. imageAttributes:{
  13. icon:'<i class="note-icon-pencil"></i>',
  14. removeEmpty:false, // true = remove attributes | false = leave empty if present
  15. disableUpload: false // true = don't display Upload Options | Display Upload Options
  16. }
  17. });
  18. });

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