2 RTE fields in one table

3 views
Skip to first unread message

Marcus Schwemer

unread,
Jul 15, 2009, 9:56:43 AM7/15/09
to typo3-ti...@googlegroups.com
Hi,

with this one I think I found a next issue or is it a feature?!

In tt_products I have two DB columns ('note' and 'note2') containing RTE
content. Now I try to configure both field separately using

RTE.tt_products.field.note.init {
#config
}

and

RTE.tt_products.field.note2.init {
#config
}

What happens is that both configuations are merged and the latter
overwrite the first, because both have a field count of "3".

How would it be possible to have different configuration in these fields?

If I look at the html source the text areas have a name:

<textarea id=".." name="data[tt_products][1][note]" ...>

The "1" is the uid in the table "tt_products" and "note" the db field.

Ok I checked it with wec_discussion and for a "normal" CE. It seems to
me that it is a convention to name the RTE fields.

So wouldn't it be better to rely for the RTE config on this naming? We
could leave it as it is for tt_content, colPos and FCEs, but for all
other tables it should be the way to go.

Another advantage would be that it would work for all tables out of the
box without the need to write a function for the hook.

Please correct me, if I am wrong.

Mit freundlichen Grüßen / Best regards,
Marcus Schwemer

P.S.: This is a classical issue of: "How should I know what I think
before I read what I write" ;-) My thoughts evolved as I wrote this eMail.

--
Marcus Schwemer Netzwerkberatung
IT-Consultant || TYPO3-Development || Webhosting
eMail: schw...@netzwerkberatung.de
Internet: http://www.netzwerkberatung.de
Blog: http://blog.typo3worx.de

Marcus Schwemer

unread,
Jul 15, 2009, 10:58:00 AM7/15/09
to typo3-ti...@googlegroups.com
Hi everybody,

implemented it and pushed to my github repository
(http://github.com/mschwemer/TYPO3-tinymce_rte/tree/master)

Configuration format stays like it is for tt_content. All other tables
are configured like this. For example:

RTE.tt_products.note.init {
# your config for column 'note' here
}

RTE.tt_products.note2.init {
# your config for column 'note2' here
}

No hook needed that has to be implemented by extensions. Works either in
userTS and pageTS.

Regards,
Marcus


Marcus Schwemer schrieb:

daKmoR

unread,
Jul 15, 2009, 5:49:36 PM7/15/09
to TYPO3 tinymce_rte
On Jul 15, 4:58 pm, Marcus Schwemer <schwe...@netzwerkberatung.de>
wrote:
> implemented it and pushed to my github repository

this looks very promising; going to test it tomorrow... thx for your
work :)

btw. how do you like git so far?
Reply all
Reply to author
Forward
0 new messages