mirror of
https://github.com/codex-team/editor.js
synced 2024-06-01 13:32:43 +02:00
JSON preview now supports new tools (#430)
This commit is contained in:
parent
d9a2361603
commit
8ee951ca76
|
@ -31,7 +31,7 @@ const cPreview = (function (module) {
|
|||
/** Stylize JSON keys */
|
||||
string = string.replace( /"(\w+)"\s?:/g, '"<span class=sc_key>$1</span>" :');
|
||||
/** Stylize tool names */
|
||||
string = string.replace( /"(text|quote|list|header|link|code|image|delimiter)"/g, '"<span class=sc_toolname>$1</span>"');
|
||||
string = string.replace( /"(paragraph|quote|list|header|link|code|image|delimiter|raw)"/g, '"<span class=sc_toolname>$1</span>"');
|
||||
/** Stylize HTML tags */
|
||||
string = string.replace( /(<[\/a-z]+(>)?)/gi, '<span class=sc_tag>$1</span>' );
|
||||
/** Stylize strings */
|
||||
|
|
Loading…
Reference in a new issue