protected function prepareOptions()
    {
        if (!empty($this->configuration)) {
            if (isset($this->configuration['theme'])) {
                $this->theme = $this->configuration['theme'];
            }

            if (isset($this->configuration['modules']['formula'])) {
                $this->_katex = true;
            }

            if (isset($this->configuration['modules']['syntax'])) {
                $this->_highlight = true;
            }

            $this->_quillConfiguration = $this->configuration;

        } else {
            if (!empty($this->theme)) {
                $this->_quillConfiguration['theme'] = $this->theme;
            }

            if (!empty($this->bounds)) {
                $this->_quillConfiguration['bounds'] = new JsExpression($this->bounds);
            }

            if (!empty($this->debug)) {
                $this->_quillConfiguration['debug'] = $this->debug;
            }

            if (!empty($this->placeholder)) {
                $this->_quillConfiguration['placeholder'] = $this->placeholder;
            }

            if (!empty($this->formats)) {
                $this->_quillConfiguration['formates'] = $this->formats;
            }
            
            if (!empty($this->modules)) {
                foreach ($this->modules as $module => $config) {
                    $this->_quillConfiguration['modules'][$module] = $config;

                    if ($module === 'formula') {
                        $this->_katex = true;
                    }

                    if ($module === 'syntax') {
                        $this->_highlight = true;
                    }
                }
            }

            if (!empty($this->toolbarOptions)) {
                $this->_quillConfiguration['modules']['toolbar'] = $this->renderToolbar();
            }
        }
    }