PHP code example of getolympus / olympus-dionysos-field-rte
1. Go to this page and download the library: Download getolympus/olympus-dionysos-field-rte library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
getolympus / olympus-dionysos-field-rte example snippets
return \GetOlympus\Dionysos\Field\Rte::build('my_rte_field_id', [
'title' => 'How do Penguins drink their cola?',
'default' => 'On the rocks.',
'description' => 'A simple question to know if you will be able to survive to the Penguin domination.',
/**
* RTE settings
* @see https://codex.wordpress.org/Function_Reference/wp_editor
*/
'settings' => [
'teeny' => false,
'textarea_rows' => 8,
]
]);
// Get RTE from Database
$rte = get_option('my_rte_field_id', '');
// Display RTE in HTML tag
echo '<pre>'.htmlspecialchars($rte).'</pre>';
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.