jordandelozier / wysibb

WYSIWYG BBcode editor
http://www.wysibb.com
246 stars 86 forks source link

Disable Image Resize #145

Closed KnightYoshi closed 3 months ago

KnightYoshi commented 8 years ago

Is it possible to disable resizing images via the gui? The forum I'm working in does not allow for images to be resized.

hashlabxyz commented 8 years ago

A bit late, but you can do so by using var wbbOpt = { img : { transform : { '<img src="{SRC}" />':"[img]{SRC}[/img]", '<img src="{SRC}" />':"[img]{SRC}[/img]" } } } } $("textarea").wysibb(wbbOpt);

It's a workaround, users are still able to resize but it will not work.

KnightYoshi commented 8 years ago

One thing I found was this will disable it '<img src="{SRC}" contentEditable="false">' : '[img]{SRC}[/img]' However, there is a drawback. It doesn't delete as it normally would by just pressing delete/backspace. You have to click it which causes WysiBB to add a wrapping span around the image and then you can delete it.

Right now I'm in the process of trying to fix a few bugs in it (such as smileys not working) and I am slowly working on an ES6/2015 version ( which isn't easy D: ); on hold though due to other projects.