Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 01/22/2024 in all areas

  1. Okay I've looked all over documentation and asked the web and I can't find anything on .on('reloaded', what it specifically does or how it works. How about a hint? EDIT: Never mind - inputfields.js - got it.
    3 points
  2. I have a page ('host page') with a Page Table field. The host page template is designed to render content from it and its children in the page table - a fairly standard set-up. The children have a text area field called motif_body (which I currently have set as TinyMCE, but the situation is the same with CKEditor). I am using front-end editing of this text area field, like this (in Latte): <edit page="{$page->id}" field="motif_body"> {$page->motif_body|noescape} </edit> where $page is the child page in this case. That works correctly and the child textarea field is made available for in-line editing in the front end. The problem arises when embedding images in the field. The child page also has an images field but, if 'insert image' is chosen, then the 'select image' modal shows the images on the host page, not the child page. (In my case it shows no images as the host page does not have an images field). You then have to navigate all the way through the page tree to find the child page and add the images from there. Once images are embedded in the textarea field then they are editable perfectly normally. It seems wrong to me that editing a field in the child page should look to the host page for images rather than the page the holds the field you are editing. I assume that this is because the 'image select field' in the modal is defaulting to the page which is open in the page editor rather than the page which holds the field being edited. Is this the intentional behaviour and, if so, why? In any case, is there a way of making the image select field pick up the 'right' page?
    1 point
  3. I think that's right @gornycreative. I hit this problem with htmx and repeaters - this was my solution: // To make sure that hx- attributes fire in lazy-loaded repeater fields $(document).on('reloaded', '.InputfieldRepeater', function (event) { htmx.process(this); })
    1 point
  4. Here is one: https://processwire.com/modules/inputfield-easy-mde/
    1 point
  5. Just sharing the struggle, I am so tired of typing this word.
    1 point
  6. This fieldtype has been released and is awaiting approval. I changed the angle input to be an integer entry. I did pull together a strategy for building instances within repeaters. I'll do a writeup of the design pattern as a brief tutorial, as I think until we have a proper set of event handlers for repeater actions/AJAX etc. this is a way to build out a field that requires javascript libraries that is repeater compatible. I feel pretty happy with the end result. It is a fun toy to play with if you have never really explored CSS gradients.
    1 point
  7. At risk of making myself unpopular, I'm a neovim user who has ethical aversion to AI. I get a great developer experience and I don't have to worry about Kernighan's law making my code buggy and hard to maintain. I am also concerned about climate change, and AI has huge carbon emissions - (re)training an LLM has been estimated to emit the equivalent CO2e as 125 round-trip flights between New York and Beijing [source]. I'm concerned that my open source code has been used against its license to train AI through github (find my stuff on codeberg or project owed gitlabs) and so now will be included in proprietary products. I'm also against having to pay subscriptions to a handful of big tech companies because this accelerates wealth inequality and erodes democracy, reducing our chances of turning the ship around before crossing the runaway climate change event horizon. I do not doubt AI's usefulness, or it's ability to charm and amaze or excite, I do not doubt that it can be used to save lives even (e.g. specific medical use such as identifying cancer early from scans). But I do remember how Nobel thought his invention of dynamite would be great and I'm not going to be taken in by another big tech lie about "don't be evil". We have very weak regulatory powers and a world teetering on the edge of unfathomable suffering. This is a post about a personal choice of text editor, and I'm not judging folx who choose Cursor (or ai plugins for neovim!) - I respect that opinions differ. But I wanted to share my opinions on my choice, too.
    1 point
×
×
  • Create New...