Mailing List Archive

External component integrated in a forrest page
Hello all,

We’re trying to make CKEditor [1] work in a forrest page (and as part of it, a speller plugin we have developed to support the languages we work on). CKEditor is all JS and CSS, and I have tried following the descriptions here [2] to make it work, with no success so far.

The main issue is that of getting url’s mapped to the correct directory on disk. I though I had done it correctly, but still no success. The CKEditor code is located in:

$PROJECTROOT/src/documentation/resources/ckeditor/*

and I have the following entry in $PROJECTROOT/src/documentation/content/locationmap.xml:

<match pattern="ckeditor/**.js">
<location src="{properties:resources-dir}ckeditor/{1}.js"/>
</match>
<match pattern="/ckeditor/**.js">
<location src="{properties:resources-dir}ckeditor/{1}.js"/>
</match>

I also added the following to $PROJECTROOT/src/documentation/sitemap.xmap:

<map:match pattern="ckeditor/**.js">
<map:read src="{lm:project.resources-dir.{1}.js}" mime-type="text/javascript" />
</map:match>

But no success.

Any feedback would be most welcome.

Sjur


[1] http://ckeditor.com
[2] https://forrest.apache.org/docs_0_100/project-js-css.html
Re: External component integrated in a forrest page [ In reply to ]
On 09/02/2016 12:43 AM, Sjur Moshagen wrote:
> Hello all,
>
> We’re trying to make CKEditor [1] work in a forrest page (and as part of it, a speller plugin we have developed to support the languages we work on). CKEditor is all JS and CSS, and I have tried following the descriptions here [2] to make it work, with no success so far.
>
> The main issue is that of getting url’s mapped to the correct directory on disk. I though I had done it correctly, but still no success. The CKEditor code is located in:
>
> $PROJECTROOT/src/documentation/resources/ckeditor/*
>
> and I have the following entry in $PROJECTROOT/src/documentation/content/locationmap.xml:
>
> <match pattern="ckeditor/**.js">
> <location src="{properties:resources-dir}ckeditor/{1}.js"/>
> </match>
> <match pattern="/ckeditor/**.js">
> <location src="{properties:resources-dir}ckeditor/{1}.js"/>
> </match>

I got it to work using {properties:resources} instead of
{properties:resources-dir}. I tried briefly with the locationmap, but
didn't get that working.

Brian

> [1] http://ckeditor.com
> [2] https://forrest.apache.org/docs_0_100/project-js-css.html
Re: External component integrated in a forrest page [ In reply to ]
3. sep. 2016 kl. 02:32 skrev Brian M Dube <bdube@apache.org>:
>
> On 09/02/2016 12:43 AM, Sjur Moshagen wrote:
>> The main issue is that of getting url’s mapped to the correct directory on disk. I though I had done it correctly, but still no success. The CKEditor code is located in:
>>
>> $PROJECTROOT/src/documentation/resources/ckeditor/*
>>
>> and I have the following entry in $PROJECTROOT/src/documentation/content/locationmap.xml:
>>
>> <match pattern="ckeditor/**.js">
>> <location src="{properties:resources-dir}ckeditor/{1}.js"/>
>> </match>
>> <match pattern="/ckeditor/**.js">
>> <location src="{properties:resources-dir}ckeditor/{1}.js"/>
>> </match>
>
> I got it to work using {properties:resources} instead of
> {properties:resources-dir}. I tried briefly with the locationmap, but
> didn't get that working.

Thanks a lot! Those two tips - removing ‘-dir’ from the location variable, and skipping the locationmap - solved the problem :-)

Sjur