Support native spell checkers in codemirror editor #1266

This commit is contained in:
Andy Miller
2021-04-20 14:13:01 -06:00
parent d02f3a12e2
commit 0ad907be01
2 changed files with 2 additions and 1 deletions

View File

@@ -3,6 +3,7 @@
1. [](#improved) 1. [](#improved)
* Removed sourcemaps references from fork-awesome.min.css [#2122](https://github.com/getgrav/grav-plugin-admin/issues/2122) * Removed sourcemaps references from fork-awesome.min.css [#2122](https://github.com/getgrav/grav-plugin-admin/issues/2122)
* Support native spell checkers in CodeMirror editor [#1266](https://github.com/getgrav/grav-plugin-admin/issues/1266)
1. [](#bugfix) 1. [](#bugfix)
* Moved preset CSS compile to earlier in the process to ensure compilation happens in time. * Moved preset CSS compile to earlier in the process to ensure compilation happens in time.
* Prevent Save actions from Flex Objects to trigger the unsaved unload notice [#2125](https://github.com/getgrav/grav-plugin-admin/issues/2125) * Prevent Save actions from Flex Objects to trigger the unsaved unload notice [#2125](https://github.com/getgrav/grav-plugin-admin/issues/2125)

View File

@@ -1,7 +1,7 @@
{% extends "forms/fields/editor/editor.html.twig" %} {% extends "forms/fields/editor/editor.html.twig" %}
{% set theme = config.plugins.admin.whitelabel.codemirror_theme ?? 'paper.css' %} {% set theme = config.plugins.admin.whitelabel.codemirror_theme ?? 'paper.css' %}
{% set font = config.plugins.admin.whitelabel.codemirror_md_font ?? 'sans' %} {% set font = config.plugins.admin.whitelabel.codemirror_md_font ?? 'sans' %}
{% set codemirrorOptions = {'mode': 'gfm', 'theme': theme, 'font': font, 'ignore': []}|merge(field.codemirror|default({})) %} {% set codemirrorOptions = {'spellcheck': 'true', 'inputStyle': 'contenteditable', 'mode': 'gfm', 'theme': theme, 'font': font, 'ignore': []}|merge(field.codemirror|default({})) %}
{# backward compatibility #} {# backward compatibility #}
{% if field.showPreview %} {% if field.showPreview %}