mirror of
https://github.com/knadh/listmonk.git
synced 2024-11-10 17:13:04 +08:00
Fix escaping {{ TrackLink }} in WYSIWYG editor UI
This commit is contained in:
parent
1e8b533d45
commit
7a9d11d426
1 changed files with 5 additions and 0 deletions
|
@ -84,6 +84,11 @@ const quillFontSizes = Quill.import('attributors/style/size');
|
|||
quillFontSizes.whitelist = ['11px', '13px', '22px', '32px'];
|
||||
Quill.register(quillFontSizes, true);
|
||||
|
||||
// Sanitize {{ TrackLink "xxx" }} quotes to backticks.
|
||||
const regLink = new RegExp(/{{(\s+)?TrackLink(\s+)?"(.+?)"(\s+)?}}/);
|
||||
const Link = Quill.import('formats/link');
|
||||
Link.sanitize = (l) => l.replace(regLink, '{{ TrackLink `$3`}}');
|
||||
|
||||
// Custom class to override the default indent behaviour to get inline CSS
|
||||
// style instead of classes.
|
||||
class IndentAttributor extends Quill.import('parchment').Attributor.Style {
|
||||
|
|
Loading…
Reference in a new issue