-
Sind Tabellen möglich?
Hallo,
unterstützen die Rocksolid Custom Elements das Inhaltselement Tabelle? Den TinyMCE möchte ich in meinem Fall für Tabellen vermeiden. Ich hätte gerne das typische Inhaltselement mit den üblichen Features (Kopfzeile hinzufügen, Reihenüberschrift hinzufügen usw.).
Ich habe es mit 'inputType' => 'table' probiert, leider ohne Erfolg.
Danke im Voraus
-
Dafür gibt es zwei verschiedene Möglichkeiten.
Man kann direkt das Feld des Tabellen-Inhaltselements nutzen:
PHP-Code:
'tableitems' => array(
'inputType' => 'standardField',
),
Oder man erzeugt ein eigenes Feld mit dem inputType tableWizard:
PHP-Code:
'feldName' => array (
'label' => array('Tabelle', ''),
'inputType' => 'tableWizard',
),
-
Hallo,
ich hänge mich hier mal an und möchte fragen, ob dies für 4.9 auch noch Gültigkeit hat?
Denn irgendwie klappt das nicht - oder besser gesagt es gibt ne Fehlermeldung resp. gar keine Anzeige
Also:
PHP-Code:
<?php
return array(
'label' => array(
'de' => array('Tabelle','Erzeugt eine Tabelle.')
),
'types' => array('content','module'),
'standardFields' => array('cssID'),
'fields' => array(
'tableName' => array(
'label' => array(
'de' => array('Tabellen',''),
),
'inputType' => 'tableWizard',
),
),
);
Ergebnis im Frontend:
Eine Tabelle mit jeweils den ersten Buchstaben der Tabellenzellen und im DebugMode:
PHP-Code:
"exception" => ErrorException {#663 ?
#message: "Warning: Illegal string offset 'class'"
#code: 0
#file: "C:\laragon\www\bulma\templates\bulma\rsce_bulma_table.html5"
#line: 17
#severity: E_WARNING
trace: {?
C:\laragon\www\bulma\templates\bulma\rsce_bulma_table.html5:17 {?
include …
› <?php else: ?>
› <td class="<?= $col['class'] ?>"><?= $col['content'] ?></td>
› <?php endif; ?>
}
nehme ich <?= $col['class'] ?> raus, denn wird wegen 'content' gemeckert:
PHP-Code:
"exception" => ErrorException {#663 ?
#message: "Warning: Illegal string offset 'content'"
#code: 0
#file: "C:\laragon\www\bulma\templates\bulma\rsce_bulma_table.html5"
#line: 17
#severity: E_WARNING
trace: {?
C:\laragon\www\bulma\templates\bulma\rsce_bulma_table.html5:17 {?
include …
› <?php else: ?>
› <td class="myClass"><?= $col['content'] ?></td>
› <?php endif; ?>
}
Mit:
PHP-Code:
<?php
return array(
'label' => array(
'de' => array('Tabelle','Erzeugt eine Tabelle.')
),
'types' => array('content','module'),
'standardFields' => array('cssID'),
'fields' => array(
'tableitems' => array(
'inputType' => 'standardField',
),
),
);
wird nur der tbody aufgebaut, aber kein Inhalt:
PHP-Code:
<table id="29" class="table ">
<tbody>
</tbody>
</table>
Jemand eine Idee?
-
Wie lässt du die tableitems ausgeben?