wicketstuff/core — Issue #74: TinyMCE doesn't work for wicket 1.5 (baseURL problem)
Author: PhantomYdn
Created: 2011-11-16 12:32:19+00:00
State: open

Hello,

I have following page:

```@MountPath("/editpage/${pageId}")
@AuthorizeInstantiation("ADMIN")
public class EditPagePage extends GenericPage
{
```

and

```
form.add(new TextArea("content").add(new TinyMceBehavior()));
```

And durung loading of page I recive following:

```
Failed to load: http://localhost:8080/editpage//themes/simple/editor_template.js
Failed to load: http://localhost:8080/editpage//langs/en.js
```

By tracing of code I realize that baseURL can't be calculated in tinymce._init method because some incorrectness in:

```
function getBase(n) {
if (n.src && /tiny_mce(|_gzip|_jquery|_prototype|_full)(_dev|_src)?.js/.test(n.src)) {
if (/_(src|dev)\.js/g.test(n.src))
t.suffix = '_src';
```

because URL of script for tinymce to include is following:

../wicket/resource/wicket.contrib.tinymce.InPlaceEditBehavior/tiny_mce/tiny_mce_src-ver-1321430948000.js