Project

General

Profile

Actions

Bug #16064

closed

RTEarea frontend usage with no-javascript fallback solution

Added by Martin K¤stner about 18 years ago. Updated almost 18 years ago.

Status:
Closed
Priority:
Should have
Category:
RTE (rtehtmlarea + ckeditor)
Target version:
-
Start date:
2006-04-19
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

Typo3 3.8.1
RTEhtmlarea 1.2.0

It is somewhere an rte-problem. In the backend there is no posibility that JS is deactivated. But in the frontend there should be an fallback-solution.

I have included the rtehtmlarea like it is in the sr_guestbook v0.2.0... as this is the sample for frontend-usage of the rtehtmlarea...

1. If RTEhtmlarea is included in a frontend plugin and there is no javascript active, then you should see as minimum an textarea with that you could insert Text and HTML.
=> BUG 1: The textarea is set always hidden. class.tx_rtehtmlarea_pi2.php line 274
=> BUG 2: The text 'pleasewait' is always there. It should be hidden at first and later made visible from JS. Or directly 'writeln' with JS to the document. Then the message 'pleasewait' is only visible when JS is active and the editor is loading, Not when JS is deactivated.

2. The transform of the content is actually done only via JS ? (I am not 100% sure about this, but the <u>-Tag ist not removed like it is in the config specified, when JS is deactivated.)
Why? It is called a function transformContent(). This function is in the class.t3lib_rteapi.php. This function only transform the content (an removes tags and so on) when the value for $specConf['rte_transform'] is set.
=> BUG3 (in the sample not in the RTE itself) in the sample for the frontend RTE there is $this->specConf only set to a empty array. To transform with the function transformContent() in PHP, you must set $this->specConf correctly.

$this->specConf = array('rte_transform' => array('parameters' => array('mode' => 'ts_css')));
  1. or posible like this?
    $this->specConf['rte_transform']['parameters']['mode'] = 'ts_css';

Than transform of the content is also done in PHP.

3. If you do this, than it occurs an error, because in class.t3lib_rteapi.php line 161 there is called "t3lib_div::makeInstance('t3lib_parsehtml_proc');" but the phpfile is not includes in this file. I think it should be included in class.t3lib_rteapi.php where the class should be instantiated. But you could do it also in your frontend plugin file:
require_once(PATH_t3lib.'class.t3lib_parsehtml_proc.php');

If this is done, the RTE should work still with active javascript, but if someone as JS deactivated then it should be posible to enter text and HTML with the limits working set for the RTE (allowTags, removeTags, etc...)

(issue imported from #M3296)

Actions #1

Updated by Martin K¤stner about 18 years ago

Sorry. It seems that I should have wrote "u-Tag"... and not the complete HTML-Tag. Perhaps some admin could change it? Thanks

Actions #2

Updated by Stanislas Rolland about 18 years ago

Thanks for your analysis of this issue.

Bug 1 and 2 will be resolved in the next version of the RTE.

require_once(PATH_t3lib.'class.t3lib_parsehtml_proc.php'); will be added to class.tx_rtehtmlarea_pi2.php

Documentation will be updated to indicate that
var $specConf = array('rte_transform' => array('parameters' => array('mode' => 'ts_css')));

should be set in the invoking plugin.

The guestbook example will also be updated.

Actions #3

Updated by Stanislas Rolland about 18 years ago

Fixed in TYPO3core CVS, branch HEAD and in TER version 1.4.0.

Actions

Also available in: Atom PDF