On Fri, Nov 1, 2013 at 2:34 PM, Paul Libbrecht <[email protected]> wrote: > Marius, > > I have finally been able to see the extra "processing-instructions-like" html > comments that the html macro (and probably all macros?) generate in one of my > stock XWiki installations (an XWiki 4.3): HTMLCleaner was called with code:
Yes, these type of comments are generated for all macros, precisely for all rendering transformations, as macros are just one type of rendering transformation. > > <!--startmacro:html\!-\!clean="false"\!-\!<iframe > src="http://node1.hoplahup.net/xwiki/bin/view/Coll_adminPolx/bigvideo?viewer=video_alone" > width="450" height="350">no frames?</iframe>--><!--stopmacro--> > > And this properly edits into the editor. > > So, what can be the reason that our editor (based on xwiki 3.5) does not > include these comments but includes the raw html which then gets cleaned out > by the html-cleaner? You should check how the editor gets its input. If the input is wiki syntax and the editor makes itself an AJAX request to convert it to (Annotated)XHTML then you should have the macro markers. Otherwise, if the input is HTML and you instruct the editor to not convert it then it's your responsibility to give Annotated XHTML to the editor. In this case check how you get the HTML. Hope this helps, Marius > > thanks in advance. > > Paul > > > > Le 25 oct. 2013 à 21:19, Paul Libbrecht <[email protected]> a écrit : > >>>> In this setting, the workflow: >>>> - start to edit (shows wysiwyg) >>>> - click source >>> >>>> - add the iframe >>> >>> Using the {{html}} macro? >> >> No we had not tried this but now I did and it also got killed. >> (we have opened bug http://jira.xwiki.org/browse/CURRIKI-6382 for this, a >> video is coming there showing how non-functional the html macro is in this >> case). My guess is that were are hitting an unsupported feature of the "html >> editor" facet. >> >>>> Sergiu, your statement: >>> >>> Marius ;) >> >> Sorry for that! >> I like your reactivity! >> >>> There's no contradiction at all. The title of this thread is >>> "HTMLCleaner to remove some iframes?" and the answer is definitely No, >>> the HTML cleaner doesn't remove the iframe element. >> >> Well. It does if it's not wrapped within an html macro. >> >>> As I already said, >>> the iframe element is lost when the cleaned HTML is converted to wiki >>> syntax because the iframe element doesn't have a corresponding wiki >>> syntax element. The conversion is done using the rendering module >>> http://rendering.xwiki.org with very precise rules. >> >> This is what would interest me. Where are the rules? >> >>> You need a parser to obtain an XDOM from the input syntax (HTML) and a >>> renderer to serialize the XDOM into the output syntax (XWiki 2.1). The >>> converter >>> cannot magically add a macro/transformation marker around the iframe >>> element. You have to do this. >>> >>> I see two options in your case: >>> >>> 1) Try to use XHTML as source syntax, not XWiki 2.1 >> >> This is done in the video and fails. >> >>> 2) Check the Annotated XHTML syntax that is used as input for the >>> WYSIWYG editor. Edit a page that has macros and check the HTML that is >>> given as input to the editor. You'll notice some markers. Or, you >>> could check the HTML that is produced when you insert a macro from the >>> WYSIWYG editor. >> >> (I have never seen markers of xwiki macros output inside html, this must be >> the reason). >> >> thanks >> >> Paul > > _______________________________________________ > devs mailing list > [email protected] > http://lists.xwiki.org/mailman/listinfo/devs _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs

