Ctrl-Z for file uploads & drag to text field

I could add them to Github directly but I’ll add them here first to see the response.

  1. When writing a text in a textarea and press “CTRL+ Z” it will undo (on a PC). When draging an image in the textarea and press “CTRL + Z” it does not undo. It should.

  2. Drag an image to a textarea work. Drag an image to a text does not. Maybe I want to drag it in to a text. Make it possible.

I don’t agree. A text field is made for text, not for kirbytext. When you output a text field in your templates, you do that using the 'html()method, notkirbytext()`. If you were to use the text field to drag images into it (or not), you would need to introduce new options, like: “Can have formatted text”, “Cannot have formatted text”. Does not make sense IMO.

There will be a new image field with the next version, into which you can drag and drop an image.

The image field will probably make that idea less important.

I just like the idea that when you drag in something to an area and it can do something with it, then do it.

Is there an option in a textarea if it allows formatted text or not? It did not know that. I thought it’s just a matter of using kirbytext or not.

No, there is no such option, and of course, you can use markdown formatted text and kirbytext in text fields and output it using the kirbytext method. But somehow, not having formatting buttons like in a textarea field, somehow rather seems to discourage you from doing so, I think. I may be wrong.

If you use markdown/kirbytext in your text fields, you have to output it using the kt() method, not just html().

I dragged in an image in a textarea and the same in a text. The textarea worked with kirbytext, the text did not.

So I see a problem with it, that it does not work like I expected in the template.

<?php echo kirbytext($page->subtitle() ); ?>
<?php echo kirbytext($page->subtitle()->kt() ); ?>
<?php echo kirbytext($page->text() ); //WORK ?>

But I will then use the image field instead, anyway. Thanks! :slight_smile: