You need to be logged in to post in the forum - Log In

An active JCE Pro Subscription is required to post in the forum - Buy a Subscription

Support is currently Offline

Official support hours
Monday to Friday
09:00 - 17:00 Europe/London (BST)

Please create a new Ticket and we will get back to you as soon as we can.

#105281 Edit JSON files in JCE

Posted in ‘Editor’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Latest post by jazzmang on Tuesday, 07 November 2023 20:33 GMT

sageman
Hello Ryan,

we are using a UIkit3 based gallery (Oriel Pro) to generate galleries from image-folders.
The module saves a JSON file inside the image folder, which can be editied to add anchor links.

My question: is there any way we can use the JCE File-Browser to edit this JSON file?
So far, I have added it to legal extensions in JCE Profiles and Joomla Media settings - but it looks like JSON files are hidden no matter what.

Thanks for any pointers.
Richard

Ryan
My question: is there any way we can use the JCE File-Browser to edit this JSON file?
So far, I have added it to legal extensions in JCE Profiles and Joomla Media settings - but it looks like JSON files are hidden no matter what.


If you add the json file type to the Permitted File Extensions list in Editor Profiles -> Editor Paramters -> File Browser, you will be able to see it listed in the File Browser file list, but there isn't currently a way to edit json files, or any other text files.

Ryan Demmer

Lead Developer / CEO / CTO

Just because you're not paranoid doesn't mean everybody isn't out to get you.

sageman
Thanks. Yes, I can see the files now. I was hoping to use the template plugin for this purpose, but yes, there is no editing.
My problem is the marketing people, they need to edit this file online, so for now we are using PhocaCommander for editing. But it seems overkill.
And I am a bit afraid what they might do ;).

Anyway to create a text edit plugin?
I noticed that Joomla itself allows "text" editing inside the template folders, so it should be possible to reuse this function in other folders?

Regards
Richard

Ryan
I have added a Text Editor in JCE Pro 2.9.0, you can download it for testing here - https://www.joomlacontenteditor.net/downloads/editor/pro/development

It must be enabled for each dialog that uses it. You can do this for the Template Manager in Editor Profiles -> Plugin Parameters -> Template Manager.

In the Template Manager, the Text Editor can be used to edit existing files, and create new html files.

You can enable the Text Editor for the File Browser too for editing existing txt,html,md,json and xml files, in Editor Profiles -> Plugin Parameters -> File Browser.

Ryan Demmer

Lead Developer / CEO / CTO

Just because you're not paranoid doesn't mean everybody isn't out to get you.

sageman
Awesome. Editor works!
Two suggestions:
  • upon save, the edited json file should be saved in the original folder, from which it was opened (right now, it defaults to whatever was set as root and creates a new file)
  • anyway to call the text editor from the JCE File Browser? I can see the JSON files, but can only delete, rename, copy & cut

sageman
SORRY - I overlooked the File Browser setting! The text editor does work from the File Browser.
It does save to root by default though...

Ryan
This should be fixed now in RC2 - https://www.joomlacontenteditor.net/downloads/editor/pro/development/jce-pro-2-8-19-dev

Please confirm.

Ryan Demmer

Lead Developer / CEO / CTO

Just because you're not paranoid doesn't mean everybody isn't out to get you.

sageman
Confirmed.
The file time stamp and size changes.
Upon reopening, the old content is shown - this must be a Cache issue, since if I look at the file using FTP, it is changed.
Hitting File Browser Refresh does not change this - only upon leaving the File Browser and returning to it do I see the changed content.

Ryan
Please try JCE Pro 2.9.0 RC3 - https://www.joomlacontenteditor.net/downloads/editor/pro/development

Ryan Demmer

Lead Developer / CEO / CTO

Just because you're not paranoid doesn't mean everybody isn't out to get you.

sageman
Yes, that solved this problem.
Now my backend profile settings look mangled - tabs seem not working : Plugin Params show on all other tabs. See screen.
I emptied all caches, still...

Attachments

Ryan
Are there any PHP errors displayed when you set Error Reporting to Maximum in the Joomla Global Configuration?

Ryan Demmer

Lead Developer / CEO / CTO

Just because you're not paranoid doesn't mean everybody isn't out to get you.

sageman
Nope. No Errors. I can give you access, it is a staging site.

Ryan
Please send me a login - https://www.joomlacontenteditor.net/contact/site-login

Ryan Demmer

Lead Developer / CEO / CTO

Just because you're not paranoid doesn't mean everybody isn't out to get you.

sageman
Hi,
please let me know when you are done with the site, I need to reset it for the next phase.

Ryan
I am done. The tabs appeared normal to me in Firefox and Chrome.

Are you seeing an javascript errors when you view a profile?

Ryan Demmer

Lead Developer / CEO / CTO

Just because you're not paranoid doesn't mean everybody isn't out to get you.

jazzmang
Is there any way to add other text files to the text editors, like .css or .scss?

I can see them in the File Browser, but I cannot edit them.

Ryan
[quotePost id="115170"]Is there any way to add other text files to the text editors, like .css or .scss?

I can see them in the File Browser, but I cannot edit them.[/quotePost]

Please try JCE Pro 2.9.52 RC - https://www.joomlacontenteditor.net/downloads/editor/pro/development

Ryan Demmer

Lead Developer / CEO / CTO

Just because you're not paranoid doesn't mean everybody isn't out to get you.

jazzmang
[quotePost id="115171"][quotePost id="115170"]Is there any way to add other text files to the text editors, like .css or .scss?

I can see them in the File Browser, but I cannot edit them.[/quotePost]

Please try JCE Pro 2.9.52 RC -