These are chat archives for getkirby/chat

17th
Jul 2015
Felix De Montis
@dervondenbergen
Jul 17 2015 14:40
how is the image on textarea dropping working, I am not able to find the code for it, but it has to be somewhere
Felix De Montis
@dervondenbergen
Jul 17 2015 14:43
yes, exactly
Ian Cox
@ian-cox
Jul 17 2015 14:44
Unfortunately a coded version of this never actually existed
It was only ever an animated proof of concept
Felix De Montis
@dervondenbergen
Jul 17 2015 14:44
but it is working for textareas
Ian Cox
@ian-cox
Jul 17 2015 14:46
Yeah Bastian implemented that part of it.
Felix De Montis
@dervondenbergen
Jul 17 2015 14:46
ah ok
Do you know where I can find that implemented part?
Ian Cox
@ian-cox
Jul 17 2015 14:47
I’m pretty sure its just in the core. No?
This plugin has a different UI but solves pretty much the same problem. http://getkirby-plugins.com/selector
Felix De Montis
@dervondenbergen
Jul 17 2015 14:50
I don't need the image select functionality, just the "drop something on the textarea" functionality, to extend the textarea field
Ian Cox
@ian-cox
Jul 17 2015 14:51
I swear that existed at some point, let me make sure
its definitely in the core
drag.gif
Felix De Montis
@dervondenbergen
Jul 17 2015 14:56
I know
Ian Cox
@ian-cox
Jul 17 2015 14:56
is that not what you’re looking for?
Felix De Montis
@dervondenbergen
Jul 17 2015 14:57
I'm looking for the code of it, which puts the data-text attribute of the li element inside the textare
By going through nearly every panel file now, I probably found the code: https://github.com/getkirby/panel/blob/master/assets/js/controllers/metatags.js#L40-L55
Ian Cox
@ian-cox
Jul 17 2015 15:03
nice, that looks like it
what are you building?
Felix De Montis
@dervondenbergen
Jul 17 2015 15:07
I (actually my employer) needs the ability to paste word content inside the textarea, so I'm using the ckeditor instead of the normal textarea (https://github.com/fishme/kirby_ckeditor) but i still want the ability to drop the images from the sidebar into the text
Ian Cox
@ian-cox
Jul 17 2015 15:07
oh cool
Felix De Montis
@dervondenbergen
Jul 17 2015 15:08
the standard ckeditor image thing doesn't allow that, but i think of making a custom button/plugin on which i then can drop the image from the sidebar
and i think i can use nearly the same code for such a plugin from the textarea code
Ian Cox
@ian-cox
Jul 17 2015 15:09
I’d like to be able to drag an image into the editor and see a small preview of it.
Felix De Montis
@dervondenbergen
Jul 17 2015 15:13
maybe on hover of the markdown image tag
Ian Cox
@ian-cox
Jul 17 2015 15:14
yeah, something like that could be nice
and maybe on hover of the sidebar
Felix De Montis
@dervondenbergen
Jul 17 2015 15:25
like this:
hover preview.gif
Ian Cox
@ian-cox
Jul 17 2015 15:54
oh hey, thats cool
Felix De Montis
@dervondenbergen
Jul 17 2015 15:55
i just took some time and made a field to add such functionality to a blueprint
Felix De Montis
@dervondenbergen
Jul 17 2015 16:19
@ian-cox but also every other person, if such a thing is wanted but you are too lazy to make it on your own ;)
Ian Cox
@ian-cox
Jul 17 2015 16:29
haha thanks, I am too lazy! :smile:
Ian Cox
@ian-cox
Jul 17 2015 18:43
images.gif
@dervondenbergen I styled it up a little more and added pointer-events: none; to keep the previews images from disabling hover of the actuall list items below. Theres’s a fork and a pull request if you want it.
Felix De Montis
@dervondenbergen
Jul 17 2015 18:49
yes, just saw it, thanks
Gunther Groenewege
@groenewege
Jul 17 2015 18:57
:thumbsup: