ElkArte Community

Elk Development => Feature Discussion => Topic started by: Wizard on October 17, 2015, 03:00:10 pm

Title: Drag to resize image in editor
Post by: Wizard on October 17, 2015, 03:00:10 pm
Is it possible have drag to resize an image in editor ? Just like the scale feature in GIMP. Some editors like Redactor offer this feature.
Title: Re: Drag to resize image in editor
Post by: Wizard on October 17, 2015, 03:03:18 pm
CK editor has a plugin to do it

Demo : http://www.uritec.es/portal/seccion.aspx?N=60

http://ckeditor.com/addon/ImageCrop
Title: Re: Drag to resize image in editor
Post by: radu81 on October 17, 2015, 05:03:13 pm
I'm afraid you cannot drag to resize imgaes in elkarte, but as an alternative you can use img combibed with "width" tag

ex:
Code: [Select]
[img width=200]https://raw.githubusercontent.com/Spuds/Elk_Theme_StormCloud/master/sample_images/boardindex.jpg[/img]

and the result
(https://raw.githubusercontent.com/Spuds/Elk_Theme_StormCloud/master/sample_images/boardindex.jpg)
Title: Re: Drag to resize image in editor
Post by: Wizard on October 17, 2015, 05:31:12 pm
@radu81 , if I understand correctly it is just a piece of code that varies the width= x and height = y values based on cursor movements. I guess something similar to what I did in colour picker.

Here CK Editor is available for free. We just need to use it as a plugin.
Title: Re: Drag to resize image in editor
Post by: Wizard on October 17, 2015, 05:56:02 pm
Here is fully features CK Editor demo. It is open source

http://ckeditor.com/demo#full
Title: Re: Drag to resize image in editor
Post by: radu81 on October 17, 2015, 05:59:24 pm
Yep is jus a code to change width/height manually, but it does the job ;)
Ck Editor is recommended for html pages,  I don't think it will be easy to integrate into a forum
Title: Re: Drag to resize image in editor
Post by: Wizard on October 17, 2015, 06:59:34 pm
Nothing is impossible for emauele and spuds  ;)
Title: Re: Drag to resize image in editor
Post by: emanuele on October 18, 2015, 11:15:39 am
It has been added at some point to SCEditor:
http://www.sceditor.com/
that's one of the reasons it should be updated for 1.1
Title: Re: Drag to resize image in editor
Post by: Wizard on November 02, 2015, 10:12:03 pm
What is the procedure to use updated editor ?
Title: Re: Drag to resize image in editor
Post by: emanuele on November 03, 2015, 03:22:23 pm
Depends how many changes there were and how "destructive" they are to Elk-specific plugins between the version used in Elk now and the most recent published.
Basically I have no idea. xD
Title: Re: Drag to resize image in editor
Post by: Wizard on November 03, 2015, 03:49:25 pm
Which goes to what if I use a hook ?
Title: Re: Drag to resize image in editor
Post by: emanuele on November 03, 2015, 05:45:13 pm
It's not a problem of "using hooks", it's a problem of evaluating if the latest version of the editor breaks the existing SCEditor plugins used in ElkArte and if so rewrite them to work with the new setting.