We are transitioning over to a new forum platform. Please post new issues there. Existing threads will be dealt with here unless you choose to move them over. Visit the new forum

Forum

Thread tagged as: Question, Redactor, CKEditor

Best editor for use in text blocks - to aid adding images

Hi, I have tested the various "text-block" editors - simplemde, markitup, redactor & ckeditor - in specific regard to adding in an image, where certain styling can be applied to that image.

It seems each has its own limitations.

The 3 inbuilt editors visit the Perch Assets for choosing an image to add to the text-block, whereas ckeditor seems to instead choose its own separate image upload. Personally I prefer the link to Perch Assets.

But it seems only the WYSIWYG editor ckeditor would allow you to add in an image style (basically left or right).

Basically, I'm trying to get the ability to get an imported image to float either left or right within the text-block at the user's choosing. I could use CSS to force EVERY img to the left, but I'd want that to be an editable choice.

Can the redactor option (of importing an image from the Perch Assets) be given a bespoke image class? There's documentation that markitup can include custom image-class choices, but I couldn't seem to get that to work.

m.

Martin Lowe

Martin Lowe 0 points

  • 1 year ago

You could use blocks here. Create a block that has separate copy and image fields and a select field for the user to choose left and right align. Add a conditional so that if the image isn't added then the copy will fill the space. The user could then add multiple instances of this block into the region.

Although handy, giving users the ability to lay out images inside copy blocks is never really 100% satisfactory as you essentially remove the image from content management.

Thanks Jonathan, for the response... But not really what I'm looking for.

I can see that technically redactor can have bespoke formatting added to it's dropdown:

https://imperavi.com/redactor/examples/formatting/add-formatting-tags/

This would mean (I assume) that a Perch Asset added image into a text-area could be given a bespoke format, which would give me the ability to CSS float left, or right etc.

Of course, whether that bespoke change can be added into a version of redactor that's bundled within Perch is a different matter.

m.

I think my suggestion does achieve what you originally described while keeping content and layout separate. That’s what blocks are for. I use them all the time and find end users love them. Redactor etc are text editors and the first word in that phrase highlights their limitations. Best of luck.

You can float a block within an area of text to create a text-wrapping effect.

You may want to do this with an image to create a unique, multi-column layout in a blog post or on a page of text.

To create this layout, click and drag a block over a Text Block. The gray box shows where the block will appear in the text. https://mobdro.io/

Madison Badham said: click and drag a block over a Text Block.

You can do this? I didn't realise...

You're meaning inside Admin? Surely when you're looking at different regions within a page, you don't have the ability to go grab a block and drag it anywhere, do you?

Or is there a way that a single region within Admin could contain multiple elements?

m.

Madison Badham's comment is just spam - the advice given is a load of baloney. The spam situation on this forum is pretty dire at the moment.

Jonathan Elliman said:

Madison Badham's comment is just spam - the advice given is a load of baloney. The spam situation on this forum is pretty dire at the moment.

Yes, I have seen various posts of nonsense and dubious links... I kinda assumed this one was genuine as there wasn't anything "spammy" in nature within the reply.

Oh well, would have been nice.