Hi,
Is the copy / pasting of images in the editor component a feature supposed to be supported ? It seems to work :
- ok in FF
- partially in chrome (works only for images stored online, not for local images)
- not at all in IE.
Thank you,
Mathieu.
Showcase : copy / paste images in the editor component
-
- Posts: 6144
- Joined: 10 Sep 2011, 21:10
1. I'm not using p:editor, but why don't you come up with some custom xhtml and bean to accomplish the task, if it's not supported. A Paste Image button that will append/insert the image in your BLOB data field in bean and then update the display via AJAX or non-AJAX request. I'm just thinking out loud here.
2. Primefaces is using a jquery richtexteditor, I think. I searched google for the following; you can continue searching google and stackoverflow.com and see if someone has had success copy/pasting images into jquery richtexteditor.
jquery rich text editor copy paste image
3. Check this (and/or begin here): jquery richtexteditor
4. Check primefaces user guide, too. If feature/option not available in PrimeFaces, but jquery RichTextEditor does offer the ability to do so, then create a NEW FEATURE REQUEST in PrimeFaces Issue Tracker.
2. Primefaces is using a jquery richtexteditor, I think. I searched google for the following; you can continue searching google and stackoverflow.com and see if someone has had success copy/pasting images into jquery richtexteditor.
jquery rich text editor copy paste image
3. Check this (and/or begin here): jquery richtexteditor
4. Check primefaces user guide, too. If feature/option not available in PrimeFaces, but jquery RichTextEditor does offer the ability to do so, then create a NEW FEATURE REQUEST in PrimeFaces Issue Tracker.
Howard
PrimeFaces 6.0, Extensions 6.0.0, Push (Atmosphere 2.4.0)
TomEE+ 1.7.4 (Tomcat 7.0.68), MyFaces Core 2.2.9, JDK8
JUEL 2.2.7 | OmniFaces | EclipseLink-JPA/Derby | Chrome
Java EE 6 Tutorial|NetBeans|Google|Stackoverflow|PrimeFaces|Apache
PrimeFaces 6.0, Extensions 6.0.0, Push (Atmosphere 2.4.0)
TomEE+ 1.7.4 (Tomcat 7.0.68), MyFaces Core 2.2.9, JDK8
JUEL 2.2.7 | OmniFaces | EclipseLink-JPA/Derby | Chrome
Java EE 6 Tutorial|NetBeans|Google|Stackoverflow|PrimeFaces|Apache
Hi,
Thanks for your answer. First of all, this is my first time with jsf / primefaces, I'm studying the possibility of using it on a new project.
1. Yes I'll try to come up with something if it's not implemented yet - but hey, if the work is already done... ^^
2. I don't get it : you say I can change the default RTE used by primefaces ? So if I find any jquery RTE supporting the paste image behavior, I'lll be able to customize primefaces so it'll be used ?
3. refer above
4. no sign of that feature in the user guide. I've already submitted this as a bug in the google code issue tracker, but it's been marked as "won't fix", and I don't get why.
Thanks,
Mat.
Thanks for your answer. First of all, this is my first time with jsf / primefaces, I'm studying the possibility of using it on a new project.
1. Yes I'll try to come up with something if it's not implemented yet - but hey, if the work is already done... ^^
2. I don't get it : you say I can change the default RTE used by primefaces ? So if I find any jquery RTE supporting the paste image behavior, I'lll be able to customize primefaces so it'll be used ?
3. refer above
4. no sign of that feature in the user guide. I've already submitted this as a bug in the google code issue tracker, but it's been marked as "won't fix", and I don't get why.
Thanks,
Mat.
-
- Prime
- Posts: 18616
- Joined: 05 Jan 2009, 00:21
- Location: Cybertron
- Contact:
Mat, can you compare with;
http://premiumsoftware.net/cleditor/
It is wontfix because it kinda depends on cleditor.
http://premiumsoftware.net/cleditor/
It is wontfix because it kinda depends on cleditor.
-
- Posts: 23
- Joined: 06 Mar 2011, 22:35
From looking at the link to cleditor it appears that it supports plugins so it may be possible to implement your own plugin to fully support the functionality you want.
You mention local and online images, I guess that providing support for local images depends on what you ultimately want to do with the text (and images) that the user has created. If you want to show this to another user or the original user may view it on another machine then the local image may not be available. If this is the case it may be possible to trigger an ajax upload of the image when it is pasted in the editor. Of course you would need to implement this in the plugin but both primefaces and jquery provide a lot of the building blocks you would need.
HTH
You mention local and online images, I guess that providing support for local images depends on what you ultimately want to do with the text (and images) that the user has created. If you want to show this to another user or the original user may view it on another machine then the local image may not be available. If this is the case it may be possible to trigger an ajax upload of the image when it is pasted in the editor. Of course you would need to implement this in the plugin but both primefaces and jquery provide a lot of the building blocks you would need.
HTH
-
- Prime
- Posts: 18616
- Joined: 05 Jan 2009, 00:21
- Location: Cybertron
- Contact:
Also check out the editor in PrimeFaces Extensions;
http://code.google.com/p/primefaces-extensions/
It is based on CKEditor which is more advanced.
http://fractalsoft.net/primeext-showcas ... cUsage.jsf
http://code.google.com/p/primefaces-extensions/
It is based on CKEditor which is more advanced.
http://fractalsoft.net/primeext-showcas ... cUsage.jsf
-
- Information
-
Who is online
Users browsing this forum: No registered users and 36 guests