From 1178a2f9e2487f96099301db7fc563f85da0e1c1 Mon Sep 17 00:00:00 2001 From: Taly Date: Mon, 18 Mar 2019 17:20:57 +0300 Subject: [PATCH] Add warning tool (#653) * Add warning tool * Add warning tool * Use latest list --- .gitmodules | 3 +++ example/assets/json-preview.js | 2 +- example/example.html | 5 ++++- example/tools/list | 2 +- example/tools/warning | 1 + 5 files changed, 10 insertions(+), 3 deletions(-) create mode 160000 example/tools/warning diff --git a/.gitmodules b/.gitmodules index 7610c98e..b4064182 100644 --- a/.gitmodules +++ b/.gitmodules @@ -43,3 +43,6 @@ [submodule "example/tools/raw"] path = example/tools/raw url = https://github.com/editor-js/raw +[submodule "example/tools/warning"] + path = example/tools/warning + url = https://github.com/editor-js/warning diff --git a/example/assets/json-preview.js b/example/assets/json-preview.js index 51cac0a4..24600cb7 100644 --- a/example/assets/json-preview.js +++ b/example/assets/json-preview.js @@ -31,7 +31,7 @@ const cPreview = (function (module) { /** Stylize JSON keys */ string = string.replace( /"(\w+)"\s?:/g, '"$1" :'); /** Stylize tool names */ - string = string.replace( /"(paragraph|quote|list|header|link|code|image|delimiter|raw|checklist|table|embed)"/g, '"$1"'); + string = string.replace( /"(paragraph|quote|list|header|link|code|image|delimiter|raw|checklist|table|embed|warning)"/g, '"$1"'); /** Stylize HTML tags */ string = string.replace( /(<[\/a-z]+(>)?)/gi, '$1' ); /** Stylize strings */ diff --git a/example/example.html b/example/example.html index 9daf3024..3ffad941 100644 --- a/example/example.html +++ b/example/example.html @@ -55,7 +55,8 @@ - + + @@ -125,6 +126,8 @@ shortcut: 'CMD+SHIFT+O' }, + warning: Warning, + marker: { class: Marker, shortcut: 'CMD+SHIFT+M' diff --git a/example/tools/list b/example/tools/list index d4cf81cf..964edb41 160000 --- a/example/tools/list +++ b/example/tools/list @@ -1 +1 @@ -Subproject commit d4cf81cf76f84d663f28135e791c821298ddf3eb +Subproject commit 964edb412f9ddfe60c6e71d6ed0c5b86d093185c diff --git a/example/tools/warning b/example/tools/warning new file mode 160000 index 00000000..d65ead44 --- /dev/null +++ b/example/tools/warning @@ -0,0 +1 @@ +Subproject commit d65ead448d74d0e6adc42f14cefb9e7a5aad8320