Open jay2success opened 3 years ago
After further test, the options not working only if it's inside the form Multi line layout (row). The language still not working though, it's always showing Chinese language.
$form->row(function (Form\Row $row) use ($form) { $row->markdown('html_template') ->languageUrl(admin_asset('@admin/dcat/plugins/editor-md/languages/en.js')) ->options([ 'language' => 'en', 'height' => 800, 'codeFold' => true, 'saveHTMLToTextarea' => true, 'searchReplace' => true, 'emoji' => false, 'taskList' => false, 'tocm' => false, 'tex' => false, 'flowChart' => false, 'sequenceDiagram' => false, 'imageUpload' => true, 'autoFocus' => true, ]) ->required(); });
Description:
Markdown can't change language and options. Language set to English and still showing Chinese. Set Options has no effect, either globally (via bootstrap) or locally (via controller)
Steps To Reproduce:
Via controller:
$form->markdown('html_template') ->languageUrl(admin_asset('@admin/dcat/plugins/editor-md/languages/en.js')) ->options([ 'language' => 'en', 'height' => 800, 'codeFold' => true, 'saveHTMLToTextarea' => true, 'searchReplace' => true, 'emoji' => false, 'taskList' => false, 'tocm' => false, 'tex' => false, 'flowChart' => false, 'sequenceDiagram' => false, 'imageUpload' => true, 'autoFocus' => true, ]) ->required();
Global Via bootstrap.php:
Markdown::resolving(function (Markdown $markdown) { $markdown->options([ 'language' => 'en', 'height' => 800, 'codeFold' => true, 'saveHTMLToTextarea' => true, 'searchReplace' => true, 'emoji' => false, 'taskList' => false, 'tocm' => false, 'tex' => false, 'flowChart' => false, 'sequenceDiagram' => false, 'imageUpload' => true, 'autoFocus' => true, ]); });