forked from eljulians/moodle-atto_multilang2
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use a new approach for multilang tags highlighting
The previous approach had some assumptions (e.g., it assumed there was a singe instance of the editor on the same page) that lead to some bugs and corner cases. Now the plugin hooks on the form submit event and clean the highlighting <span> tags there. The cleaning doesn't use any regexes any longer. Instead it uses DOM operations that are more robust and potentially faster. Also multilang tag highlighting <span>'s are now removed/added when switching to/from HTML view, reducing clutter when editing the HTML code. Some initial coding style cleanup work has been carried out. More to follow. Tested in Firefox 56 and Chromium 61.0.3163.100. Closes eljulians#2 eljulians#18 eljulians#21
- Loading branch information
Showing
6 changed files
with
516 additions
and
886 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.