diff --git a/modules/backend/formwidgets/richeditor/assets/css/richeditor.css b/modules/backend/formwidgets/richeditor/assets/css/richeditor.css index 4cb6da475..c130bbe0d 100644 --- a/modules/backend/formwidgets/richeditor/assets/css/richeditor.css +++ b/modules/backend/formwidgets/richeditor/assets/css/richeditor.css @@ -55,13 +55,13 @@ z-index: auto !important; } .redactor_box_fullscreen { - z-index: 1060 !important; + z-index: 300 !important; width: 100%!important; } #redactor_modal_overlay, #redactor_modal, .redactor_dropdown { - z-index: 1062 !important; + z-index: 302 !important; } body .redactor_air { position: absolute; @@ -260,7 +260,7 @@ body .redactor_box_fullscreen .redactor_editor { line-height: 1 !important; border: none; background: #dddddd; - z-index: 1061; + z-index: 301; } .redactor_toolbar:after { content: ""; @@ -1033,7 +1033,7 @@ body .redactor_air .redactor_toolbar { font-family: 'Open Sans', Arial, sans-serif; line-height: 20px; font-style: normal; - z-index: 1560; + z-index: 800; text-align: center; } .redactor_box .oc-figure-controls span { diff --git a/modules/backend/formwidgets/richeditor/assets/less/richeditor.less b/modules/backend/formwidgets/richeditor/assets/less/richeditor.less index efb7c73f4..3741139ba 100644 --- a/modules/backend/formwidgets/richeditor/assets/less/richeditor.less +++ b/modules/backend/formwidgets/richeditor/assets/less/richeditor.less @@ -1,7 +1,7 @@ @import "../../../../assets/less/core/boot.less"; @richeditor-toolbar-size: 30px; -@richeditor-zindex: 1060; +@richeditor-zindex: 300; @richeditor-gutter: 20px; @import "_redactor.less"; diff --git a/modules/cms/classes/Content.php b/modules/cms/classes/Content.php index e9f3d4e22..c8f4e5b5c 100644 --- a/modules/cms/classes/Content.php +++ b/modules/cms/classes/Content.php @@ -1,5 +1,8 @@ parsedMarkup = $obj->parseMarkup(); + + return $obj; + } + + /** + * Initializes the object properties from the cached data. + * @param array $cached The cached data array. + */ + protected function initFromCache($cached) + { + parent::initFromCache($cached); + + $this->parsedMarkup = array_key_exists('parsed-markup', $cached) ? + $cached['parsed-markup'] : + $this->parseMarkup($this->markup); + } + + /** + * Initializes a cache item. + * @param array &$item The cached item array. + */ + protected function initCacheItem(&$item) + { + parent::initCacheItem($item); + $item['parsed-markup'] = $this->parsedMarkup; + } + + protected function parseMarkup() + { + $result = $this->markup; + + if (strtolower(File::extension($this->fileName)) == 'md') + $result = Markdown::parse($this->markup); + + return $result; + } } diff --git a/modules/cms/classes/Controller.php b/modules/cms/classes/Controller.php index 7f716d966..82d16e2fc 100644 --- a/modules/cms/classes/Controller.php +++ b/modules/cms/classes/Controller.php @@ -22,7 +22,6 @@ use System\Models\RequestLog; use System\Classes\ErrorHandler; use System\Classes\ApplicationException; use System\Twig\Extension as SystemTwigExtension; -use October\Rain\Support\Markdown; use October\Rain\Support\ValidationException; use Illuminate\Http\RedirectResponse; @@ -727,11 +726,7 @@ class Controller extends BaseController elseif (($content = Content::loadCached($this->theme, $name)) === null) throw new CmsException(Lang::get('cms::lang.content.not_found', ['name'=>$name])); - $filePath = $content->getFullPath(); - $fileContent = $content->markup; - - if (strtolower(File::extension($filePath)) == 'md') - $fileContent = Markdown::parse($fileContent); + $fileContent = $content->parsedMarkup; /* * Extensibility