Jump to content

Images in CKEditor


Smoo
 Share

Recommended Posts

Newbie here - first week on PW.
Perhaps I've missed a setting - entirely possible - but I can't figure out how to insert an image into the CKEditor if it's not already attached to a page.
i'd really like to allow my users to upload an image while they're composing content in the WYSIWYG editor.
Is this possible?

Link to comment
Share on other sites

Welcome :)

https://processwire.com/talk/topic/17094-image-captions-in-rte-body-text-field/?do=findComment&comment=150266

In this post you can see the "...and the RTE button insert image modal:" image. If you click on "Images on Page" then you get the possibility to pick another page from the Page Tree as the source of images. If you pick a page in the tree then images uploaded to that page can be selected. If you create a dedicated page which is used as an "Image Library" then this way you just have to upload your images to that page to be selectable "globally". This way you do not even need an image field on the template.

It is a bit convoluted way of selecting images but at least it is supported by the core.

Edited by szabesz
fix :)
Link to comment
Share on other sites

Thanks guys, I guess for now I'll just add an "Images" field to the template and have that be the container for inserted images.
I'll admit I'm finding this a bit convoluted but we'll make it work for our users.
@BitPoet - I'll check out your Media library module in addition.

  • Like 1
Link to comment
Share on other sites

On 30/10/2017 at 4:38 PM, Smoo said:

I'll admit I'm finding this a bit convoluted but we'll make it work for our users.

Coming from CMSs that used centralized media, this tripped me up at first too. Convoluted is an understatement.

However, I also think allowing users to insert images to their hearts content inside an RTE brings a world of design pain. Moderately related, one client a few years back added so many top level menu items that it spilled onto a new line and looked awful. Now I tightly control what they can and can't do, and that definitely includes image uploading.

Maybe it's just me, but I also find working inside an RTE field where images have been inserted really awkward unless they're about 30 rows high.

Anyway, the profields repeater matrix is an excellent alternative (for PW v3 and above). You can add body > image > body > image, (with image being just a single image upload field which you can set min/max image sizes). You have much more fine grained control over the final output. I thought it was well worth the £115 or so (whatever the exchange rate is) for unlimited usage. The other profields field types are very useful too that come bundled in.

There's also the media manager module (£28 single site, £108 for unlimited use) which I haven't tried but it looks awesome:

https://processwireshop.pw/plugins/media-manager/

  • Like 2
Link to comment
Share on other sites

  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...