Skip to content

Commit fe43d13

Browse files
committed
Allow base path parsing in the external_config system setting
Resolves #24
1 parent e4624ba commit fe43d13

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

core/components/tinymcerte/docs/changelog.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
Changelog for TinyMCE Rich Text Editor.
22

3+
- Allow base path parsing in the external_config system setting
34
- Add tel: prefix
45
- Add modximage - left/right image positioning
56
- Sync tinymce and textarea

core/components/tinymcerte/model/tinymcerte/events/tinymcerteonrichtexteditorinit.class.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,10 @@ private function getTinyConfig() {
9090

9191
$externalConfig = $this->tinymcerte->getOption('external_config');
9292
if (!empty($externalConfig)) {
93+
$externalConfig = str_replace('{base_path}', $this->modx->getOption('base_path'), $externalConfig);
94+
$externalConfig = str_replace('{core_path}', $this->modx->getOption('core_path'), $externalConfig);
95+
$externalConfig = str_replace('{assets_path}', $this->modx->getOption('assets_path'), $externalConfig);
96+
9397
if (file_exists($externalConfig) && is_readable($externalConfig)) {
9498
$externalConfig = file_get_contents($externalConfig);
9599
$externalConfig = $this->modx->fromJSON($externalConfig);

0 commit comments

Comments
 (0)