Create custom editable


#1

I am currently trying to impliment a custom datetime editable for my templates. However, the documentation on this topic is extremely limited https://pimcore.com/docs/5.x/Development_Documentation/Extending_Pimcore/Bundle_Developers_Guide/Adding_Document_Editables.html

I did steps 1 and 2, however, I cannot find the location for the js file in my bundle. Also, after having only implemented steps 1 and 2 I can add my editable to a template without it throwing an error, but it is not displayed (at least the html I am returning from the frontend() method.)


#2

step 3.

you can but your JS files where ever you want, they just need to have the right namespace. So created it like src/AppBundle/Resources/public/js/dateTag.js with the right namespace of pimcore.document.tags.date and include it in your AppBundle.php in the getEditmodeJsPaths function


#3

Thanks dpfaffenbauer for the info. I added the JS, not sure if it is loaded though. The next question which arises is: where do I place my html code for the edit view? the editable content is displayed through the fontend() method in normal view, but I still don’t see anything except the wrapper div in the edit mode.