Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Customizing for custom manager page #67

Open
matdave opened this issue Nov 22, 2017 · 0 comments
Open

Customizing for custom manager page #67

matdave opened this issue Nov 22, 2017 · 0 comments

Comments

@matdave
Copy link
Contributor

matdave commented Nov 22, 2017

It seems like the private function for loading settings OnRichTextEditorInit should be public, or there should be some way to load those settings into a custom manager page. I'm struggling right now to get it to accept my system settings when I just try to load the class using the following method.

        $tRTEcorePath = $this->modx->getOption('tinymcerte.core_path', null, $this->modx->getOption('core_path', null, MODX_CORE_PATH) . 'components/tinymcerte/');
        /** @var TinyMCERTE $tinymcerte */
        $tinymcerte = $this->modx->getService(
            'tinymcerte',
            'TinyMCERTE',
            $tRTEcorePath . 'model/tinymcerte/',
            array(
                'core_path' => $tRTEcorePath
            )
        );

        $className = 'TinyMCERTEOnRichTextEditorInit';
        $this->modx->loadClass('TinyMCERTEPlugin', $tinymcerte->getOption('modelPath') . 'tinymcerte/events/', true, true);
        $this->modx->loadClass($className, $tinymcerte->getOption('modelPath') . 'tinymcerte/events/', true, true);
        if (class_exists($className)) {
            /** @var TinyMCERTEPlugin $handler */
            $handler = new $className($this->modx, $this->scriptProperties);
            $handler->run();
        }```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants