[TYPO3-dev] TS Editor + Structure/Syntax Highlighning + Code completion

Bernhard Kraft kraftb at kraftb.at
Wed Jul 19 10:53:33 CEST 2006


Ernesto Baschny [cron IT] wrote:

> It just works on PHP5, basically just because of the call to
> __constructor in one of the classes. Commenting that out makes it work
> in PHP4 also.

I didn't use a method "__constructor" anywhere ?!?!?


> Then I got an error:
> 
> "No method or function-array entry found for function-key
> "GIF_fontResize" !"

I fixed this. The updated T3X is available at the same location.

> I got rid of them by editing class.tx_kbtsedithtmlarea_tsstruct.php and
> removing the "__" in front of "GIF_fontResize" and all other "GIF_*"
> that are defined as "func".

The thing is : those "__GIF_fontResize" entries mean that at the place they occur
also all subproperties/subkeys of fontResize (found in GIFBUILDER/stdgraphic libs)
are valid.

by removing the "__" in the beginning you changed it to contain a subkey named ".fontResize"
- which is not correct.

But the fixed version is already online (I hope I didn't make any quick mistakes).


> Then it wouldn't start because I (dohhh), hadn't loaded rtehtmlarea.
> This should be noted as a requirement in ext_emconf.

I tried to set it in ext_emconf.php but whenever I did this the complete Extension-Manager went
blank :(
I didn't want to investigate this further - but I guess I know what it could have caused.


> I tried in 3.8.1, where the latest rtehtmlarea is 1.2.0, and it works.
> Also tested on 4.0-svn with latest rtehtmlarea (1.4.0): works.
> 
> But: The "onthefly" checking doesn't seem to be working. Its configured with
> 
> disableOnTheFly = 0
> validateTSOnTheFly = 1

correct.

> If I have already in my (saved) TS-template:
> 
> config {
>   admPanel = 1
> }
> 
> The "admPanel = 1" is a span.key + span.operator + span.value.
> 
> Then I add a new line "no_cache = 1" in this config section and press
> ENTER. No classes are set, and it doesn't seem to do anything. After
> saving and retrieving, the classes are ok.

After saving and retrieving a check is made in all cases - but the on the fly check get's only performed
if my "own" rtehtmlarea plugin becomes active.

I didn't find a way how it would be possible to extend rtehtmlarea (meaning: add a plugin) without modifying
it's core - cause quite some of the buttons are hardcoded in the backend. It is quite easy to add another
plugin but as I said this is not possible only with TYPO3_CONF_VARS settings but only by XCLASSing rtehtmlarea.

I modified the rtehtmlarea classes in such a way that I "finalized" more or less the plugin-interface. And into
this plugin interface made available by XCLASS i hook in my plugin.

I will try to contact Stanislas Roland to see if he will incorporate my patch into his extenion - then it should
work with any rtehtmlarea from this point on flawlessly.


> Other problem: I just see UNDO, REDO and ABOUT in the toolbar. Neither
> the button for auto-completion, nor the button to force
> background-verification. As far as I know I have configured RTE to
> display all buttons. Any new configuration that is required here?

This is mostly caused because rtehtmlarea couldn't get extended via XCLASSes or is already extended
by another extension.

Have a look at my ext_localconf.php


> This is interesting, and we should try to make a way for extensions also
> provide snippets for this array (e.g. in case of userFunc that also take
> parameters). This basis TSref array should definitively go into core, as
> this is where it would belong.

I tought about giving the possibility to add array like used in the extension
to the ext_localconf/ext_tables.php of an extension and let it get dynamically
added to the array when a specific .userFunc/USER, PHP_SCRIPT get's executed.

But all extension authors wanting to have their syntax verified have to create
those arrays.


> Maybe this should/could be coupled with an automatic generation of TSref
> documentation, so that the developer just have to code and then
> "document" the parameters in such an array. I think this has been
> discussed before, but this might be the first great step towards it.

This is indeed a nice idea - A self generating TS-Ref - of course with everything
possible hyperlinked :) Cause this is what the array does - it recurses over itself
until it finds if a object-path is valid or not.


> And at last, a feature request of something that always bothered me:
> Would it be possible to add a way to SAVE the current TS-code without
> having to submit the FORM (maybe by using ajax?), so that the cursor is
> left at the current position? That would be amazingly great! ;)

Currently the form doesn't get saved by explicit code when it get's just transmitted
for verification - this way I want to avoid that a TS-template is in some "half" state -
so only get's saved when the user/admin wants it.



greets,
Bernhard
-- 
----------------------------------------------------------------------
"Freiheit ist immer auch die Freiheit des Andersdenkenden"
Rosa Luxemburg, 1871 - 1919
----------------------------------------------------------------------
[[ http://think-open.at | Open source company ]]




More information about the TYPO3-dev mailing list