Palette does not render arrows since Wicket 7.x.x - wicket

See this minimal demo at GitHub: https://github.com/ErikVerheul/PaletteBugDemo.git
I expected that the code line palette.add(new DefaultTheme()); would do the trick. However, it did not.
When changing the Wicket version to 6.20.0 all works fine.
Did I miss something?
help appreciated,
Erik

Short answer: Remove your paragraph <p> and use a <div> instead of the <span> for the palette.
Long answer
The p paragraph cannot contain other block elements. In Wicket 6.x the palette uses a table to layout the "Available" und "Selected" options. In Wicket 7.x divs are used for that, since tables only should be used for tabular data and not for layouting. Neither tables nor divs are allowed in a paragraph though. I guess browsers are just a bit more forgiving when using tables at wrong places, hence you are seeing a somewhat correct result with version 6.x.
Another problem is that you are using a span tag for your palette. Again, the palette is inserting either a table or several div tags, but neither of these are valid in between the span tag.
So something like this should do it:
<form>
<div class="mystyle">
<div wicket:id="palette"></div>
</div>
...
</form>

Problem SOLVED. Thank you Martin! As a Wicket novice I used a version 6 example not knowing the changes in version 7. The working version is now on GitHub.

It does work fine here: http://examples7-apachewicket.rhcloud.com/compref/wicket/bookmarkable/org.apache.wicket.examples.compref.PalettePage
Please check what is different in your app.

Related

angular material icons renders first before the interpolation

I'm doing an angular project using angular material, while im using mat-icons it keeps coming before the interpolation even though i coded it after the interpolation enter image description here
i tried typing anything before of after the icon and the icon comes first no matter what
Sort by {{sort}}
expand_more
I couldn't find it documented anywhere in the official docs for some reason (in neither mat-button or mat-icon parts at least).
Lukcily, it's at least documented in the migration guide here.
What you need to do since v15 is to add iconPositionEnd directive to the mat-icon inside the mat-button, e.g.
<button mat-button>
Icon after text
<mat-icon iconPositionEnd>favorite</mat-icon>
</button>
EDIT: There already is a git issue about this feature not being documented here.

RichText in Magnolia CMS is changing HTML text

I would like to ask how I can block richText from changing html text under source view.
I'm using Blossom module and defined richText as #Chris J advised me to do:
Add source button to Magnolia CMS richText control
Whenever I put html code in source code, switch to normal view and get back to source view the code is changed. For example the following part of code is missing :
<div class="components"> <div class="product col img-slider"> <div id="product-image" class="royalSlider productImage rsDefault"> <div class="rsContent"> <div class="rsTmb"><img src="/magnoliaPublic/resources/XXX/products/product_7.jpg" alt="">
and is replaced with folowing
<p><img alt="" src="/magnoliaPublic/resources/XXX/products/product_7.jpg" /></p>
I need to provide the possibility for the user to put html code and next to see in on the web page.
Regards
Jan
Jan. I'd ask why you are using a rich text area if you are entering HTML. It is not really designed for this usage. Would you be better off with an ordinary text field? In the STK (you mentioned this in your previous question) you will find a component that serves exactly this purpose.
Under "Configuration" you will find it at /modules/standard-templating-kit/templates/components/content/stkHTML
You will see that the template script is simply:
[#if content.editHTML?has_content]
${cmsfn.decode(content).editHTML}
[/#if]
If you want to stick with a purely Blossom approach, you may need to recreate this but it is an incredibly simple component.
Incidentally, in Magnolia 5.4 there is a code editing field used in a similar component that offers syntax highlighting. You can see this by logging into the demo site and trying to add an HTML component to the main area of the page travel/contact.

TinyMCE - editor changing pasted content

Two questions and maybe they are caused by the same thing/setting.
Using TinyMCE with full corporate account. Many of the publishers are just pasting HTML into the HTML Source Editor... we are just getting this going the results are very mixed.
So if someone has a well coded page it works well - as far as we think.
But if you create a page with a couple of (or one) open div tag. Holy cow! The editor can throw divs everywhere - 30 extra on one page someone sent me. Why is the editor changing content? Can we keep this from happening? If a publisher makes an HTML mistake we would rather that the mistake shows - not be scrubbed.
Also I noticed myself when creating menus that if you put in anything inside a link tag (like a div, ul, li, dd, dt, dl, h1-6... pretty much any tag) other than a span, that the editor will either push the tag content outside of the link tag or it will change the tag to a span.
http://www.tinymce.com/wiki.php/Configuration:Cleanup/Output
Looks like the verify html is the new setting. Will report back after testing.
David - I would have marked yours as right if you answered. Looks like that works for 3.4 and below.
For version 3, use
verify_html : false
From here http://archive.tinymce.com/wiki.php/Configuration3x:verify_html

Asciimath plugin for TinyMCE not creating images

I'm using the Asciimath plugin for TinyMCE (http://www.imathas.com/editordemo/demo.html)
It was working fine until a few moments ago. Now I can see the math notation just fine in the editor, but on submitting the form, it's contents do not change to an image replacing the <span class="AM"> tag that the plugin creates.
Hence the HTML that the editor produces retains the Math-syntax I typed with the span tag and not show the Math notation properly in an image.
If anybody knows how to fix this, please help me. I'm really confused as to why it suddenly stopped working. A server-side text-replacement solution would be great as well.
I have tried this:
preg_replace('/\<span class="AM"\>`(.+)`\<\/span\>/', '<img src="http://www.imathas.com/cgi-bin/mimetex.cgi?$1" />', $str)
But that results in broken display of the Math fragment since some of the additional parameters like displaystyle that the script adds are lost.
NOTE I recently switched from regular-TinyMCE to the jQuery plugin TinyMCE. Could this be the reason the plugin is not working? I'm not sure if it broke functionality right after I made this change.

Why doesn't my <select> work in IE8?

So I have a <select> element on my page, and it worked fine in all browsers until IE8 came along. I've seen all the literature about the IE7 compatibility view and how to use <meta> to force the browser into that mode. But the question still remains: why the heck does IE8 fail to display a simple <select> properly? Has anyone figured this out yet? Here are two URLs that demonstrate the problem. The first one displays properly in IE8, but only because I'm using the <meta> tag to force it into IE7 compatibility mode. The second one is identical to the first, except that I'm not forcing IE7 compatibility.
http://www.currensys.com/mhw.php
http://www.currensys.com/mhf.php
Anyone have any ideas?
Apparently, IE8 doesn't like one of your CSS styles.
SELECT { display: table }
Removing the above style displays the drop down list.
Update: more information from W3School, the value of "table" is not supported by IE.
You have a css property setting display: table on select elements. This seems to be the problem.
I ha d the same problem, not solved with the display:table thing, but it was an issue with the font-family...seems that you have to use standard font only (i used fontface for my site...)
so change the font family to a standard one and should be ok(i don't know why but it worked for me)