Hi Mario, > On 17 Aug 2016, at 10:34, Mario <[email protected]> wrote: > > vmassol wrote >> I’m not exactly sure what you’re looking after > > I want the image to open as a popup / overlay as seen in e.g. wikipedia. > > vmassol wrote >> The following seems to do what you want: >> [[[[image:myimage.png||width=“100"]]>>attach:myimage.png]] >> It’ll display the image resized to a width of 100 pixels and when clicked >> it’ll display the image in full. > > This is kind of a compromise as it enables image manipulation in WYSIWYG but > two issues remain: when clicking the image you leave the actual wiki page > (which is inconvenient) and for each image file the user is pasting in the > editor he has to create the attachment link afterwards. But its easier than > using Macros.
That’s a good point. It would be interesting to allow plugging different ways of rendering images. Actually this is already possible but requires some technical knowledge. We have a XHTMLImageRenderer component role. Right now we offer a default implementation in the DefaultXHTMLImageRenderer class. To be more precise we have different renderers depending on the type of the image (icon, datauri, standard, etc). The standard impl is in DefaultXHTMLImageTypeRenderer (which implements the XHTMLImageTypeRenderer role). So technically, if you want to change how images are rendered all you need to do is develop your own component that implements the XHTMLImageTypeRenderer role, package that as a JAR and deploy it in your xwiki instance (by making sure you set a higher priority than 1000 for your component). See http://platform.xwiki.org/xwiki/bin/view/DevGuide/WritingComponents for more details. Now it would be nice if we could provide an implementation that does something similar to what wikipedia does and that could be configured from the Admin UI. > Is it possible to configure CKEditor so that when pasting an image file (via > Ctrl+V from the clipboard) the editor is inserting > [[[[image:myimage.png||width=“100"]]>>attach:myimage.png]] ? I guess we'd > have to dig into its source code for this feature? I don’t know if that’s possible but using a custom XHTML Renderer for images might be simpler IMO and would allow you to do exactly what you want to have. You could open a jira issue as an “idea” type maybe. It would be nice to know what other xwiki devs think about the idea above. Thanks -Vincent > Thank you > > > > -- > View this message in context: > http://xwiki.475771.n2.nabble.com/Use-image-popup-as-default-behavior-tp7600684p7600691.html > Sent from the XWiki- Users mailing list archive at Nabble.com. _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
