mirror of
https://github.com/codex-team/editor.js
synced 2024-06-04 23:12:34 +02:00
Add warning tool (#653)
* Add warning tool * Add warning tool * Use latest list
This commit is contained in:
parent
98770e26d3
commit
1178a2f9e2
3
.gitmodules
vendored
3
.gitmodules
vendored
|
@ -43,3 +43,6 @@
|
||||||
[submodule "example/tools/raw"]
|
[submodule "example/tools/raw"]
|
||||||
path = example/tools/raw
|
path = example/tools/raw
|
||||||
url = https://github.com/editor-js/raw
|
url = https://github.com/editor-js/raw
|
||||||
|
[submodule "example/tools/warning"]
|
||||||
|
path = example/tools/warning
|
||||||
|
url = https://github.com/editor-js/warning
|
||||||
|
|
|
@ -31,7 +31,7 @@ const cPreview = (function (module) {
|
||||||
/** Stylize JSON keys */
|
/** Stylize JSON keys */
|
||||||
string = string.replace( /"(\w+)"\s?:/g, '"<span class=sc_key>$1</span>" :');
|
string = string.replace( /"(\w+)"\s?:/g, '"<span class=sc_key>$1</span>" :');
|
||||||
/** Stylize tool names */
|
/** Stylize tool names */
|
||||||
string = string.replace( /"(paragraph|quote|list|header|link|code|image|delimiter|raw|checklist|table|embed)"/g, '"<span class=sc_toolname>$1</span>"');
|
string = string.replace( /"(paragraph|quote|list|header|link|code|image|delimiter|raw|checklist|table|embed|warning)"/g, '"<span class=sc_toolname>$1</span>"');
|
||||||
/** Stylize HTML tags */
|
/** Stylize HTML tags */
|
||||||
string = string.replace( /(<[\/a-z]+(>)?)/gi, '<span class=sc_tag>$1</span>' );
|
string = string.replace( /(<[\/a-z]+(>)?)/gi, '<span class=sc_tag>$1</span>' );
|
||||||
/** Stylize strings */
|
/** Stylize strings */
|
||||||
|
|
|
@ -55,7 +55,8 @@
|
||||||
<script src="./tools/embed/dist/bundle.js"></script><!-- Embed -->
|
<script src="./tools/embed/dist/bundle.js"></script><!-- Embed -->
|
||||||
<script src="./tools/table/dist/bundle.js"></script><!-- Table -->
|
<script src="./tools/table/dist/bundle.js"></script><!-- Table -->
|
||||||
<script src="./tools/link/dist/bundle.js"></script><!-- Link -->
|
<script src="./tools/link/dist/bundle.js"></script><!-- Link -->
|
||||||
<script src="./tools/raw/dist/bundle.js"></script><!-- Link -->
|
<script src="./tools/raw/dist/bundle.js"></script><!-- Raw -->
|
||||||
|
<script src="./tools/warning/dist/bundle.js"></script><!-- Warning -->
|
||||||
|
|
||||||
<script src="./tools/marker/dist/bundle.js"></script><!-- Marker -->
|
<script src="./tools/marker/dist/bundle.js"></script><!-- Marker -->
|
||||||
<script src="./tools/inline-code/dist/bundle.js"></script><!-- Inline Code -->
|
<script src="./tools/inline-code/dist/bundle.js"></script><!-- Inline Code -->
|
||||||
|
@ -125,6 +126,8 @@
|
||||||
shortcut: 'CMD+SHIFT+O'
|
shortcut: 'CMD+SHIFT+O'
|
||||||
},
|
},
|
||||||
|
|
||||||
|
warning: Warning,
|
||||||
|
|
||||||
marker: {
|
marker: {
|
||||||
class: Marker,
|
class: Marker,
|
||||||
shortcut: 'CMD+SHIFT+M'
|
shortcut: 'CMD+SHIFT+M'
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit d4cf81cf76f84d663f28135e791c821298ddf3eb
|
Subproject commit 964edb412f9ddfe60c6e71d6ed0c5b86d093185c
|
1
example/tools/warning
Submodule
1
example/tools/warning
Submodule
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit d65ead448d74d0e6adc42f14cefb9e7a5aad8320
|
Loading…
Reference in a new issue