[xwiki-devs] Override Preview behaviour in WYSIWYG
Hello, When clicking on preview, I need to add some velocity code before rendring the page, please where can i find the code of preview button of the editor "WYSIWYG" ? Thanks in advance
The WYSIWYG editor doesn't have a preview button. The button you are talking about is for the entire edit mode and is the same button you have in wiki edit mode and in inline edit mode, with the same behaviour. As for the code, check the PreviewAction in oldcore and the preview.vm template. Hope this helps, Marius On Jun 5, 2014 12:14 PM, "walid yaich" <[email protected]> wrote:
Hello,
When clicking on preview, I need to add some velocity code before rendring the page, please where can i find the code of preview button of the editor "WYSIWYG" ?
Thanks in advance _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
Thank you so much, this helps :) 2014-06-06 7:08 GMT+01:00 Marius Dumitru Florea < [email protected]>:
The WYSIWYG editor doesn't have a preview button. The button you are talking about is for the entire edit mode and is the same button you have in wiki edit mode and in inline edit mode, with the same behaviour. As for the code, check the PreviewAction in oldcore and the preview.vm template.
Hope this helps, Marius
On Jun 5, 2014 12:14 PM, "walid yaich" <[email protected]> wrote:
Hello,
When clicking on preview, I need to add some velocity code before
rendring
the page, please where can i find the code of preview button of the editor "WYSIWYG" ?
Thanks in advance _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
Hi, Actually, i can know if user has clicked on "preview" by testing on this value $context.action == 'preview', but i cannot find how to know if the user has clicked on "save and view". I added $context.action in my contentview.vm to display the context, coming from 'view' or 'save and view' show the same result, the action = 'view' . Please, how can i know if the request is coming from 'save and view' and not just 'view' ? Thanks in advance :) 2014-06-06 11:46 GMT+01:00 walid yaich <[email protected]>:
Thank you so much, this helps :)
2014-06-06 7:08 GMT+01:00 Marius Dumitru Florea < [email protected]>:
The WYSIWYG editor doesn't have a preview button. The button you are
talking about is for the entire edit mode and is the same button you have in wiki edit mode and in inline edit mode, with the same behaviour. As for the code, check the PreviewAction in oldcore and the preview.vm template.
Hope this helps, Marius
On Jun 5, 2014 12:14 PM, "walid yaich" <[email protected]> wrote:
Hello,
When clicking on preview, I need to add some velocity code before
rendring
the page, please where can i find the code of preview button of the editor "WYSIWYG" ?
Thanks in advance _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
participants (2)
-
Marius Dumitru Florea -
walid yaich