How to add RichText editor to a page as component in HippoCMS? - ckeditor

I'm creating some project using HippoCMS 10 and I need to add RichText editor as part of the page, so that customer can use it and fill something there. This editor must act exactly the same way as in Document Editor (customer can click Image button in toolbar and select image from ImagePicker dialog box).
Can't find anything about it in HippoCMS official documentation. I learned how to create custom plugins and how to integrate CKEditor into page separately, but for image picking, I need default behaviour as in Hippo.
How can I achieve this? Any help will be appreciated!

I think your question was answered on the community group. The answer there was:
"it should be quite easy to have a CKEditor in the website.
However, it doesn't really make sense to me to have site visitors able to pick CMS documents and images from the site. The picker dialogs are designed to work inside the CMS only. You should be able to create your own picker dialog that can read from a REST service that exposes the images/documents.
I don't think it will be possible to reuse the CMS picker dialog in the site."
and
"your use case is fine, when I said "it doesn't really make sense", I was really referring to the technical limitations of the pickers. You should be able to achieve what you want with a custom dialog that plugs into a REST service though. Unfortunately there is no quick solution for this that I can think of."
Just adding this for future reference.

Related

CKEditor multiple iframe dialog fields show the same dialog

I have created two CKEditor plugins. Each of them uses an "Iframe Dialog Field", meaning that a dialog box is launched and the contents of that dialog box is a webpage (you can think of the entire dialog box as being like one big iframe).
Each plugin works perfectly on its own. However if I use both plugins in the same CKEditor app, they both end up displaying the same page, rather than two different pages, despite the fact that they point to two different pages. I see no reason why this should be happening. Does anyone know how to prevent this?
To make sure there is no confusion, an "IFrame Dialog Field" is a dialog box whose contents are another webpage.
Documenentation - http://ckeditor.com/addon/iframedialog
[ This is different from using an "IFrame dialog", which I believe is a plugin that lets the user add an iframe to the page.
Documentation - IFrame Dialog: http://ckeditor.com/addon/iframe ]
In terms of usage, when using an IFrame Dialog Field, you specify the url of the page to load in the addIframe() command. Here is an example of using a CKEditor Iframe dialog
https://gist.github.com/garryyao/1170303
Back to my issue - if I use just one of the plugins in my CKEditor, it works perfectly. Each plugin points at a different url, and opens that url as the contents of the dialog box. But, if I use both plugins in my CKEditor, although I see a different icon for each, both end up launching a dialog box which points to the same url. Depending which one I launch first, that is the url both end up opening. It is as if you are only allowed to use one IFrame Dialog Field in CKEditor, and the first one used overwrites all others.
This same question was asked a couple of years ago, with no response on the CKEditor forum. The person who asked the question posted his solution, or rather his workaround, which was to NOT use the IFrame Dialog Field altogether, but to instead use a regular dialog and then put an iframe element within it.
http://ckeditor.com/forums/CKEditor-3.x/multiple-iframedialog-plugins-display-same-dialog
That seems like an OK workaround, but it is a workaround and not a solution. I haven't tried it yet, and don't know what potential issues I will run into if I go down that route. I'd prefer to fix my existing code rather than rewrite the plugins, unless I have no choice.
Any help would be appreciated.
Since I have not found any further information, or received any answers here, I ended up going with the workaround mentioned at the end of my question - I used a regular dialogue box and put a big Iframe within it. This problem doesn't exist with that approach, and It looks pretty much the same as an Iframe dialog box. (Considering the almost total lack of community support with CKEditor customization, I've realized it is better to just adjust your design/concept to do what is more easily accomplished with CKEditor, rather than get CKeditor to do exactly what you want).

Custom data in pyro cms pages, such as images or other data

I'm wondering how in PyroCMS I can add a custom field to a page. Ideally I would like to have an image area at the top of the layout, and have a custom field in pyro that would allow someone to populate that image from the pages module. I realize that there are some image plugins that allow me to attach images to pages, but I would like to be able to add the images directly into the page in the admin (as well as other custom fields for the pages). Even on a separate tab would be fine with me. I'm fine building something if someone can point me in the right direction.
Currently if you want to add a custom field to a page you have to hack the module. This is obviously not ideal and im not really suggesting it, but I had to do it for http://tedco.org/business to add a "Subtitle" field to each page.
2.2/develop is having its Pages and Blogs moved over to Streams, so you can add custom fields to all pages globally, meaning you can add an image in if you like, or append a US State for some reason, or add a slider. Whipee!
So right now: Hack it or wait. 2.2/develop will have your feature in a week or two.
I'm not sure you can do this directly from the pages module yet or not without some customization (possible hacking) though, I just asked and will update if possible.
In the meantime this might be helpful:
Consider looking into PyroStreams. for this though, it will require the Pro version of PyroCMS or you can purchase it from Parse19 directly.
You might find this article helpful about organization and page layouts.
Here is an article called Dynamic Pages with PyroCMS and PyroStreams though, it's a bit outdated now.
You may also make use of the gallery module, which is free though, I'm not sure this will meet your needs.

Sharepoint 2010 - create page with cropping image field

I'm using Sharepoint 2010 (as a beginner). I need to find the best way to allow a user to create a new page inside a sharepoint site. The page must have an image field which the user can crop when he creates the page.
I have 3 problems concerning this:
How can I allow my user to create the page in a single step. The default behaviour is: create page with Title, Url and Content type and the edit the page layout or the page properties. Is there a way to do this in a single step?
What view should my user use when editing the page? The "Edit page" view, or the "Edit properties"? I don't like the "Edit page" view because... it doesn't look like the right way to do it... BUT, I like the fact that I can use my custom BaseFieldControls in this view. The "Edit properties" look great, BUT, customizing it looks like a nightmare. And, of course, I cannot ask the user to use both views...
One of my requests is to allow the user to upload a sharepoint image for the page, and then to crop tree different sizes using the base image. The big question is: where should I allow my user to do this?
In a webpart inside the "Edit properties" window? - Not very easy to integrate it. It seems almost impossible.
In a custom BaseFieldControl in the "Edit page"? Would be great, but, I don't want the user to use this view.
Create my own Asses Picker aspx page for the "Upload image" field, and replace the default one - _layouts/AssetImagePicker.aspx? Is this even possible?
I dont have an answer for everything but for number 1, maybe:
Check out SPServices. It is a Jquery project which is designed to help people use Jquery on Sharepoint sites. It is really useful for accessing, editing, and writing data is less lines of code than ever before... Unless you are a genius and have SP figured out which most do not.
To be honest, the only way to do things in "1 step" is with javascript anyway...
Hopefully you have heard of Jquery:

MS Access 2007 Load Image to Ribbon

I'm trying to get to grips with customising a Ribbon Bar for a converted A2003 app. I'm trying to work out how to use my own custom images on button controls in the ribbon. Can anyone point me to an example for Access 2007 that can do this pls?
Please check this MSDN article (Adding Custom Dynamic Menus to the Office Fluent User Interface) and see if it helps you. Furthermore I would point you to the specifying image resource MSDN article, because you need different sized images for different sized buttons - read the bottom of my post to make it easier on you.
I believe there was also custom images within the official MS example on ribbon extensibility with Access 2007 - I hope this example is sufficient, it helped me a great lot.
My personal favorite is just using a graphical UI editor, such as the "Custom UI Editor Tool". With it you just click a button to insert an image and it works (as explained in this tutorial). Even better as the Custom UI Editor is the IDBE Ribbon Creatror - my personal tool of choice. A shareware version is available from the website.
I have a working example class object you can use that makes this a good deal less code.
http://www.members.shaw.ca/albertKallal/Ribbon/ribbon.htm
The above lets you use a very much like previous style code approach. So, to set a picture for a ribbon, you can go:
meRib("Button1").Picture = "HappyFace.png"
The same download has a working form in which some images in the ribbon change from choices made on the form.

Ajax Image gallery / Open, Close Window Effect

Can anyone point me in the direction of such a script? It should also be able to work when called into another ajax window. This is the type of gallery i am going for:
http://dageniusmarketer.com/DigitalWonderland/pages/DemoGalleryExample.html
It should go on this page:
dageniusmarketer.com/DigitalWonderland/
Portfolio section.
This script should be real simple to use with minimal extra files to make it work. I also should be able to just drop images in a gallery folder and it populates the gallery automatically with thumbnails....I shouldnt have to write code for each image in my html. Should be all dynamic.
I also would like to know how I could go about a window effect where every time I open up a new section via my navigation, the window shrinks closed with the old content, then expands open with the new content. the window effect should be vertical (top to bottom shrink into center, expand from center top to bottom)
Please Let me know. Thanks
JQuery is one of my personal favorite javascript libraries (along with 99% of this site apparently!)
But it will have a learning curve, as your requirements seem pretty specific, and you will have to read some documentation to pull it off.
Try Spry from Adobe. They have a very similar demo. Also, the other common frameworks for this would be prototype/scriptaculous, dojo, mootools, jquery. In many cases they have extensions that would provide the exact thing you are looking for. For example, try
shadowbox extension which is framework agnostic. Best of luck!
Imago looks promising:
http://imago.codeboje.de/
Just discovered the very awesome-looking jQuery Tools library today. Meets your "simple and minimal" requirements and could probably pull off what you've sketched, with just the "tooltips" and "scrollable" components.
I also should be able to just drop images in a gallery folder and it populates the gallery automatically with thumbnails
My instinct is that you'd be better off writing server-side code to handle this part of your requirement.

Resources