jariolaine / apex-blog

Blog application built using Oracle Application Express (APEX)
MIT License
23 stars 8 forks source link

How can i Insert a image to Blog post? #1

Closed TjFish closed 2 years ago

TjFish commented 2 years ago

Thanks for the open source project, really great work. But I have some questions in using it, I hope to get your answers, thank you

  1. when I use the admin app , I do not know how to insert the image into the published blog , how to store the image in APEX , and display it in the blog post .
  2. if I want to make changes to the theme of the public post app (for example, putting the search bar on the left side of the page instead of the right side). Is it possible to separate the theme from the project, so that the administrator can switch between different theme, and I can contribute the theme I created to the project
jariolaine commented 2 years ago

Hi,

You can upload images to database using admin application page "Files" (page 15). From same page report you can find URL to reference image file. When you add or edit blog post, in editor tool bar there is "Image" button. That opens dialog where you place URL to your image. You can also host your images somewhere else and reference those same way.

I can consider add different themes. But changing search bar position sounds more like changing Global Page (page 0) regions position. If you have working example how keep default search bar position and change position using documented APEX APIs, I can add that feature and possible make it available to other regions also.

Regards, Jari

TjFish commented 2 years ago

image Thank you for your reply! I followed your method to upload the file. But in the File page, I encountered the error as above, do I need to be missing some configuration of APEX. The code branch I am using on github is apex-21.2, and i also use apex-21.2 on oracle-xe-18c

TjFish commented 2 years ago

image Thank you for your reply! I followed your method to upload the file. But in the File page, I encountered the error as above, do I need to be missing some configuration of APEX. The code branch I am using on github is apex-21.2, and i also use apex-21.2 on oracle-xe-18c

Thanks for your help, it may be my problem. I reinstalled the application and the error was fixed. I can now open the file page (Page 15) properly as well as display images in the blog post.

Also, I was wondering if it is possible to insert images directly in the edit box (like Github) and upload them to APEX instead of uploading them first and then copying the link to the blog post!

Thanks again for your help!

jariolaine commented 2 years ago

I don't have code branch for APEX 21.2 yet. It seems you have turn on Friendly URLs for admin application. It will not work correctly when you do that.

There is no out of box solution in APEX to paste images to editor. It is possible with custom code, but I will wait and see what APEX will provide out of box for that in future.

jariolaine commented 2 years ago

I will change admin application page 15 alias in future, so that application also works with Friendly URLs on.