CKEditor Add Image from Media

82 views
Skip to first unread message

Paul Mansell

unread,
Nov 7, 2012, 10:22:20 AM11/7/12
to apostr...@googlegroups.com
This must have been done before ... but I cannot find anywhere which either details the steps needed or a plugin !

I have downloaded the sandbox and have added a aRichText slot to a page. I want to be able to add images using the image button of the CKEditor from the Media library that Apostrophe offers - is this possible ? has someone already done this ? is there are nice simple plugin that im missing ?

Thanks
Paul

Tom Boutell

unread,
Nov 7, 2012, 10:25:40 AM11/7/12
to apostr...@googlegroups.com
No, with Apostrophe you add media as separate "slots" via the "add
content" menu. Media slots can be alternated with rich text slots in
the same "area" (a_area).
--
Tom Boutell
P'unk Avenue
215 755 1330
punkave.com
window.punkave.com

Fotis Paraskevopoulos

unread,
Nov 7, 2012, 10:26:14 AM11/7/12
to apostr...@googlegroups.com
Hello Paul,

Have a look at aInsetImage it may aid in what you are trying to achieve.

Best,
Fotis

Paul Mansell

unread,
Nov 7, 2012, 10:29:58 AM11/7/12
to apostr...@googlegroups.com
Tim,

I understand the different slot types available and that works great for most scenarios .. however I have a site that has an image within a word - its a trademark thing - so every capital S needs to be an image. How can I put an image between text ?

Thanks
Paul

Paul Mansell

unread,
Nov 7, 2012, 10:30:16 AM11/7/12
to apostr...@googlegroups.com
Looking at this now ..... Thanks

Tom Boutell

unread,
Nov 7, 2012, 10:34:06 AM11/7/12
to apostr...@googlegroups.com
Paul, I think in your specialized case you are better off overriding
the _normalView partial of the aRichTextSlot module to automagically
turn every 's' into an image, or, if you don't literally mean EVERY s,
then some special string that's easy to type and not used otherwise.
It's quite easy to do this.

Paul Mansell

unread,
Nov 7, 2012, 10:35:56 AM11/7/12
to apostr...@googlegroups.com
Tim,

Great idea - been searching for some image browser for ages ! and the solution is a simple one ...

Has no one ever created an image browser for CKEditor for other such uses ? if my javascript skills were better I might have a go - CKEditor seems like a can of worms !

Thanks
Paul

Matias Roldan

unread,
Apr 17, 2013, 7:32:45 AM4/17/13
to apostr...@googlegroups.com
Paul, i have searching for something similar and i found that combining this (https://github.com/spantaleev/ckeditor-imagebrowser) with one controller (it's can be on aMedia module or another module that you want) that return a valid JSON string it's sufficient. Also, you can easily tune up the view on the ckeditor plugin and pass extra params (like title, dimensions, etc...)
I hope this help you,
Matias
Reply all
Reply to author
Forward
0 new messages