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

Ernesto Baschny [cron IT] ernst at cron-it.de
Wed Jul 19 10:08:40 CEST 2006


Bernhard Kraft schrieb am 19.07.2006 09:22:

> It may sound a bit frightening but all the above features have been accomplished in a
> TS-Editor extension I made:
> 
> http://think-open.org/kraftb/index/TSEdit2.png

Cool stuff, Bernhard! Some comments:

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.

Then I got an error:

"No method or function-array entry found for function-key
"GIF_fontResize" !"

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".

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

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

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.

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?

> The Syntax verification has been made possible by creating a large PHP array containing the complete
> code structure of TypoScript (which was 3 days pure work :( )

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.

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.


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! ;)

Cheers and thanks for that!
Ernesto




More information about the TYPO3-dev mailing list