DennisSuitters / summernote-image-attributes

Summernote plugin to edit image attributes
MIT License
89 stars 89 forks source link

Plugin Revamp, features? #78

Open DennisSuitters opened 10 months ago

DennisSuitters commented 10 months ago

Hi everyone,

Firstly, thank you for using or being interested in this plugin, and to those that have contributed over the years.

I'm working on revamping the plugin, mainly as more of an ability to edit images after they've been added, or already exist within the editable document area, or can be used as a replacement for the "Insert Image" toolbar button.

As I've been working on a separate version of Summernote (Skunkworks), based on the Lite version of Summernote, and primarily worked on to work within any Framework, but (sadly) still requires jQuery.

So for this plugin, I've removed the tabs, and only included features, such as, Wrapping images with a Figure and including a Caption, Alt Text, Style, Class, and width/height (I'd like to include a ratio lock). These are all toggleable options when initialising the plugin so features can be disabled if a particular option isn't required, including changing or uploading new images, so if the only editing you want to allow is to change alt text, class, style, or captions.

I've not included adding links, as those can be added via the link options within the editor.

The uploading/changing image option at the top, no longer auto-submits to allow editing the other options, and can be changed (at least in the skunkworks version) to allow connecting to a filebrowser such as elfinder (which allows uploading, editing files, or selecting an already available file on the host).

image

Ewoudowitz commented 1 month ago

Hi!

I'm currently setting up Summernote with caption options. The two options available on Github both have the same issue when floating the image: The float option doesn't affect the caption inside the figure element, so the caption will be placed on the side of the image instead of below the image.

The Summernote float option works on the img element, as the caption works on the figure element. Is there a solution to get the float on the figure (and removed from img) when a figure element is already placed?