[Yanel-dev] tinyMCE link and image lookup problem

simon simon at 333.ch
Tue Jan 26 22:35:06 CET 2010


Michael Wechner schrieb:
> simon wrote:
>> hi all
>>
>> i found a solution for the below mentioned problems which could be 
>> implemented right now. instead of using parameter matcher we also 
>> could add a matcher foir an special extension. e.g. 
>> .tinymce-edit.html. i tried this for the svg-edit resource-type and i 
>> works very fine so far. have a look at the demo 
>> http://demo.yanel-contribution.3k3.org
>>
>> there needs to be done a minor change in the tinyMCE resource-type. 
>> removing this special extension from the path to get the actual edit 
>> path. removing passing the edit path via request parameter.
>> then the lookup resource needs to be improved to handle a 
>> target-back2Realm request parameter.
>>
>> if you are interested i could provide patches.
>
> yes, that would be great. Then at least we would have a quick fix and 
> can improve it more nicely at some later stage.
here you are: 
http://bugzilla.wyona.com/cgi-bin/bugzilla/show_bug.cgi?id=7397

cheers
simon
>
> Thanks
>
> Michi
>>
>> cheers
>> simon
>>
>> simon schrieb:
>>> uups!
>>>
>>> Guillaume Déflache schrieb:
>>>> simon a écrit :
>>>>> hi all
>>>>
>>>> Hi!
>>>>
>>>>
>>>>> i just noticed a real problem within our tinyMCE integration. at 
>>>>> the moment the lookup will insert path always  with '../'. the 
>>>>> lookup doesn't know anything about how relative the document is to 
>>>>> the inserted path. i think the lookup needs to know this. probably 
>>>>> the easiest way is to give a back2realm parameter when calling the 
>>>>> lookup.
>>>>>
>>>>> and now the big problem number two: tinyMCE doesn't know the 
>>>>> correct back2realm of the document either.
>>>>>
>>>>> and the big problem number three (a very ugly one): tinyMCE shows 
>>>>> broken (or none) images if the document has another relation to 
>>>>> the realm then tinyMCE (e.g {back2ream}/usecases/tinymce.html) has.
>>>>>
>>>>> as said above to fix the lookup problem is think a request 
>>>>> parameter with the wished back2realm value would be an easy way to 
>>>>> fix it.
>>>>>
>>>>> but to fix  problem two and three there would be a bigger effort.
>>>>
>>>> I more or less see your point, although I am not sure I see the 
>>>> difference between all issues.
>>>> Maybe examples with full URLs could clarify, but never mind, read 
>>>> on 1st.
>>> the cause is all the same.
>>> go on yanel-website/index.html and edit with tinyMCE and you will see.
>>>>
>>>>
>>>>> one approach i can think of would be introducing parameter 
>>>>> matching for resource-types. this is something i miss in yanel for 
>>>>> a long time. i think this would simplify any editor integration a 
>>>>> lot (and also other problems).
>>>>
>>>> Agreed, see 
>>>> http://lists.wyona.org/pipermail/yanel-development/2009-July/003836.html 
>>>> which already had a URL format proposal.
>>> cool!
>>>>
>>>>
>>>>> this way an editor would be called with the same path as the 
>>>>> web-view of a document but with a special request parameter, 
>>>>> therefore it would be easy to get the right back2realm value when 
>>>>> open the document with tinyMCE. problem number three would be gone 
>>>>> as well.
>>>>>
>>>>> maybe there would be another (uglier) approach: calculating the 
>>>>> back2realm value via the edit-path value. but i'm not sure this 
>>>>> would help to solve problem number three since the solution to 
>>>>> this seems to be setting the tinyMCE paramter 'document_base_url' 
>>>>> [1] which has to be absolute.
>>>>
>>>> BTW I assume Xinha is similarly broken and could also be made to work?
>>> i didn't try, but i'm pretty sure, yes.
>>>>
>>>>
>>>>> so the big question is do we want to finally introduce parameter 
>>>>
>>>> I think we always did, please step up and submit a patch! :) Bug is 
>>>> http://bugzilla.wyona.com/cgi-bin/bugzilla/show_bug.cgi?id=7205
>>>> I also did some remotely-related-and-maybe-helpful work on RT 
>>>> matching recently, cf. 
>>>> http://lists.wyona.org/pipermail/yanel-development/2009-December/004194.html 
>>>> and maybe look if the proposed interfaces would suit you.
>>> i will look at it closer.
>>>
>>> cheers simon
>>>>
>>>>
>>>>> matching? or does someone has another clean but simpler solution 
>>>>> to this problems.
>>>>
>>>> I for one has none.
>>>>
>>>>
>>>>> to be honest i think this problems are show stoppers re releasing 
>>>>> yanel.
>>>>>
>>>>> WDOT?
>>>>
>>>> I think we cannot say really that our WYSIWYG editors work if image 
>>>> (and asset?) links are almost always broken indeed.
>>>>
>>>>
>>>>>
>>>>> [1] 
>>>>> http://wiki.moxiecode.com/index.php/TinyMCE:Configuration/document_base_url 
>>>>>
>>>>>
>>>>> cheers
>>>>> simon
>>>>
>>>> Cheers,
>>>>    Guillaume
>>>
>>
>



More information about the Yanel-development mailing list