From 03e6c727bd1c96d0d8e0f45087bac11360d24a09 Mon Sep 17 00:00:00 2001 From: Park Hyunwoo Date: Tue, 7 Jan 2020 13:24:56 +0900 Subject: [PATCH 01/34] Add Gemfile --- Gemfile | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 Gemfile diff --git a/Gemfile b/Gemfile new file mode 100644 index 0000000..0cfe000 --- /dev/null +++ b/Gemfile @@ -0,0 +1,9 @@ +# frozen_string_literal: true + +source "https://rubygems.org" + +git_source(:github) {|repo_name| "https://github.com/#{repo_name}" } + +# gem "rails" +gem 'jekyll' +gem 'jekyll-sitemap' From 2f5edeaa7c55be754b72023b8b0ab50c475190ee Mon Sep 17 00:00:00 2001 From: Park Hyunwoo Date: Tue, 7 Jan 2020 15:21:28 +0900 Subject: [PATCH 02/34] Refactoring site and iframes --- 00-getting-started.md | 81 +++++++++++--------------------- _config.yml | 14 +++--- _includes/bs4.html | 24 ++++++++++ _includes/head.html | 14 +++--- lite.html => _includes/lite.html | 9 ++-- bs4.html | 23 --------- 6 files changed, 69 insertions(+), 96 deletions(-) create mode 100644 _includes/bs4.html rename lite.html => _includes/lite.html (58%) delete mode 100644 bs4.html diff --git a/00-getting-started.md b/00-getting-started.md index df72d60..8aa96cf 100644 --- a/00-getting-started.md +++ b/00-getting-started.md @@ -44,8 +44,8 @@ Include the Following code in the head area of your HTML page. {% highlight html %} - - + + @@ -99,8 +99,8 @@ You can also test running example. Save below code as `index.html` and open it w Summernote - - + + @@ -119,63 +119,36 @@ You can also test running example. Save below code as `index.html` and open it w ### For bootstrap 4 -You can also use Summernote with Bootstrap 4 using `summernote-bs4.js` and `summernote-bs4.css`. This is also beta version, as Bootstrap 4 is in beta. Below is a code example using bootstrap 4. +You can also use Summernote with Bootstrap 4 using `summernote-bs4.js` and `summernote-bs4.css`. - + + {% highlight html %} - - - - - bootstrap4 - - - - - - - - -
- - - +{% include bs4.html %} {% endhighlight %} ### Without Bootstrap -You can use Summernote without Bootstrap using `summernote-lite.js` and `summernote-lite.css`. The Lite version is currently in Beta. Please report bugs so we can improve it. Below is a code example using summernote lite. +You can use Summernote without Bootstrap using `summernote-lite.js` and `summernote-lite.css`. - + + {% highlight html %} - - - - - Summernote Lite - - - - - -
- - - +{% include lite.html %} {% endhighlight %} ## Basic API @@ -261,9 +234,9 @@ for more detail api: [deep dive with api](/deep-dive/#api) Include libraries with lang file. eg) summernote-ko-KR.js. {% highlight html %} - - - + + + diff --git a/_config.yml b/_config.yml index 841d943..f6f5305 100644 --- a/_config.yml +++ b/_config.yml @@ -6,17 +6,17 @@ description: > # this means to ignore newlines until "baseurl:" Summernote is a JavaScript library that helps you create WYSIWYG editors online. author: https://github.com/summernote baseurl: "" # the subpath of your site, e.g. /blog/ -url: "http://summernote.org" # the base hostname & protocol for your site +url: "https://summernote.org" # the base hostname & protocol for your site github_username: summernote # Summernote settings -version: 0.8.12 +version: 0.8.15 repository: "https://github.com/summernote/summernote" -jquery_js: "http://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.js" -bootstrap_css: "http://netdna.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.css" -bootstrap_js: "http://netdna.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.js" -summernote_js: "http://cdnjs.cloudflare.com/ajax/libs/summernote/0.8.12/summernote.js" -summernote_css: "http://cdnjs.cloudflare.com/ajax/libs/summernote/0.8.12/summernote.css" +jquery_js: "https://code.jquery.com/jquery-3.4.1.min.js" +bootstrap_css: "https://stackpath.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" +bootstrap_js: "https://stackpath.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" +summernote_css: "https://cdn.jsdelivr.net/npm/summernote@0.8.15/dist/summernote.min.css" +summernote_js: "https://cdn.jsdelivr.net/npm/summernote@0.8.15/dist/summernote.min.js" # Build settings markdown: kramdown diff --git a/_includes/bs4.html b/_includes/bs4.html new file mode 100644 index 0000000..b89372b --- /dev/null +++ b/_includes/bs4.html @@ -0,0 +1,24 @@ + + + + Summernote with Bootstrap 4 + + + + + + + + + + +
+ + + diff --git a/_includes/head.html b/_includes/head.html index bcb74af..dfc3064 100644 --- a/_includes/head.html +++ b/_includes/head.html @@ -23,7 +23,7 @@ - + @@ -34,9 +34,9 @@ - - - + + + @@ -46,9 +46,9 @@ - - - + + + diff --git a/lite.html b/_includes/lite.html similarity index 58% rename from lite.html rename to _includes/lite.html index fade6e6..beea89b 100644 --- a/lite.html +++ b/_includes/lite.html @@ -1,11 +1,10 @@ - without bootstrap - - - + + +
@@ -13,7 +12,7 @@ $('#summernote').summernote({ placeholder: 'Hello stand alone ui', tabsize: 2, - height: 100, + height: 120, toolbar: [ ['style', ['style']], ['font', ['bold', 'underline', 'clear']], diff --git a/bs4.html b/bs4.html deleted file mode 100644 index 64cd9f2..0000000 --- a/bs4.html +++ /dev/null @@ -1,23 +0,0 @@ - - - - - bootstrap4 - - - - - - - - -
- - - From 2db7b184eda61b71555c0e1539640f1cea338d65 Mon Sep 17 00:00:00 2001 From: Park Hyunwoo Date: Tue, 7 Jan 2020 15:21:41 +0900 Subject: [PATCH 03/34] Add Gemfile.lock into .gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 130ba47..d871f73 100644 --- a/.gitignore +++ b/.gitignore @@ -21,6 +21,7 @@ _site/ # rbenv .ruby-version +Gemfile.lock # macOS .DS_Store From 4e6bf7b9d64ae1637127d26bbaacc1969a7d3cce Mon Sep 17 00:00:00 2001 From: Josef Assad Date: Wed, 29 Jan 2020 20:51:47 +0100 Subject: [PATCH 04/34] add styleTags to the deep dive documentation ref summernote/summernote#2946 --- 01-deep-dive.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/01-deep-dive.md b/01-deep-dive.md index 08d735f..3e1a860 100644 --- a/01-deep-dive.md +++ b/01-deep-dive.md @@ -152,6 +152,33 @@ $('#summernote').summernote({ }); {% endhighlight %} +### Custom styles + +You can set your own selection of styles with the `styleTags` option. + +{% highlight javascript %} +$('#summernote').summernote({ + styleTags: [ + 'p', + { title: 'Blockquote', tag: 'blockquote', className: 'blockquote', value: 'blockquote' }, + 'pre', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6' + ], + }); +{% endhighlight %} + +The tags can be specified just by tag name (as with `p` or `pre` or `h1`-`h6` above). It is also +possible to customize the style in more defaul by providing an object looking like: + +{% highlight javascript %} +{ + tag : 'tag name ', + title : 'dropdown item title', + style : 'dropdown item style', + className : 'applyed element class name and dropdown item className', + value : 'Value to apply when clicked' +} +{% endhighlight %} + ### Custom fontNames You can define fontNames items with the `fontNames` option. From 36599a0d777f82b49823f5220c404a77daca0a58 Mon Sep 17 00:00:00 2001 From: Josef Assad Date: Thu, 30 Jan 2020 08:58:37 +0100 Subject: [PATCH 05/34] fix typo in styleTags documentation --- 01-deep-dive.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/01-deep-dive.md b/01-deep-dive.md index 3e1a860..14a7f51 100644 --- a/01-deep-dive.md +++ b/01-deep-dive.md @@ -167,7 +167,7 @@ $('#summernote').summernote({ {% endhighlight %} The tags can be specified just by tag name (as with `p` or `pre` or `h1`-`h6` above). It is also -possible to customize the style in more defaul by providing an object looking like: +possible to customize the style in more detail by providing an object looking like: {% highlight javascript %} { From 0f025aac24a506f02d33d048c4ee264ce9d655f5 Mon Sep 17 00:00:00 2001 From: Park Hyunwoo Date: Wed, 19 Feb 2020 18:28:12 +0900 Subject: [PATCH 06/34] Update Summernote to v0.8.16 --- _config.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/_config.yml b/_config.yml index f6f5305..6eece1f 100644 --- a/_config.yml +++ b/_config.yml @@ -10,13 +10,13 @@ url: "https://summernote.org" # the base hostname & protocol for your site github_username: summernote # Summernote settings -version: 0.8.15 +version: 0.8.16 repository: "https://github.com/summernote/summernote" jquery_js: "https://code.jquery.com/jquery-3.4.1.min.js" bootstrap_css: "https://stackpath.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" bootstrap_js: "https://stackpath.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" -summernote_css: "https://cdn.jsdelivr.net/npm/summernote@0.8.15/dist/summernote.min.css" -summernote_js: "https://cdn.jsdelivr.net/npm/summernote@0.8.15/dist/summernote.min.js" +summernote_css: "https://cdn.jsdelivr.net/npm/summernote@0.8.16/dist/summernote.min.css" +summernote_js: "https://cdn.jsdelivr.net/npm/summernote@0.8.16/dist/summernote.min.js" # Build settings markdown: kramdown From 7655c4e38c0a25a04a6a626cdc5d7cac7e6cfb66 Mon Sep 17 00:00:00 2001 From: Diemen Design Date: Sun, 15 Mar 2020 21:21:08 +1100 Subject: [PATCH 07/34] Add Documentation for Plugins using Modals. --- 03-plugins.md | 73 +++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 65 insertions(+), 8 deletions(-) diff --git a/03-plugins.md b/03-plugins.md index cdfacac..d4a0f4d 100644 --- a/03-plugins.md +++ b/03-plugins.md @@ -28,13 +28,13 @@ Most scripts are added in the head area of the typical HTML page. - - + + - + @@ -89,11 +89,11 @@ For those uninitiated with script styling, we'd like to point out that comments {% highlight javascript %} /** - * + * * copyright [year] [your Business Name and/or Your Name]. * email: your@email.com * license: Your chosen license, or link to a license file. - * + * */ (function (factory) { /* Global define */ @@ -171,10 +171,10 @@ The vars below are not all needed, what you need depends on what your trying acc $editor = context.layoutInfo.editor, $editable = context.layoutInfo.editable, $toolbar = context.layoutInfo.toolbar, - + // options holds the Options Information from Summernote and what we extended above. options = context.options, - + // lang holds the Language Information from Summernote and what we extended above. lang = options.langInfo; @@ -213,7 +213,11 @@ This section performs functions when the Plugin is first initialised. Note, this // Build the Body HTML of the Dialog. var body = '
' + '
'; +{% endhighlight %} +See the section "Modal Markup" for element markup options inside Modals. + +{% highlight javascript %} // Build the Footer HTML of the Dialog. var footer = '' } @@ -228,7 +232,7 @@ This section performs functions when the Plugin is first initialised. Note, this // Set the Footer of the Dialog. footer: footer - + // This adds the Modal to the DOM. }).render().appendTo($container); }; @@ -281,3 +285,56 @@ This section performs functions when the Plugin is first initialised. Note, this } }))); {% endhighlight %} + +### Modal Markup +This section explains and shows example of the elements and classes that can be used inside Modals. + +Note: You can mix the classes from BS3, BS4 and Lite versions so plugins can be version to Bootstrap or no Bootstrap specific, or they can be made compatible to work with all (the preferred method). + +The main problem with using markup elements in Summernote Modals becomes evident when trying to work with layouts of the elements so they are compatible with all versions of Bootstrap or no Bootstrap as in the Lite version. To try and combat this there is a settings variable that can be checked `interface`, checking this setting in the plugin can allow the plugin to determine wich markup or behaviour the plugin needs to do for compatibility, or you can just use a standard layout for the elements and add the appropriate classes to cover all versions. + +Generally, the elements and classes for the version of Bootstrap you want to make a plugin for can use that version of Bootstraps elements, and we have tried, even with the Lite version to keep those as close as we can. + +We've included some examples below to facilitate constructing Modals a bit quicker for you. + +Any classes with `note-` at their start are primarily the Summernote classes to minimise interfering with other DOM classes that you may be using for other purposes, however, most of the modals use the Bootstrap classes as their primary styling. + +#### Form Layout +{% highlight javascript %} +var body = '
' + + '
Helpful text block
' + + '
' + + '
' + + '' + + '
' + + '' + + '
' + + '
'; +{% endhighlight %} + +#### Tabbed Panes Layout +{% highlight javascript %} +var body = '' + + +// Pane 2 + '
' + + '
'; + +// Pane 3 + '
' + + '
'; + +// Pane 1, is added last due to how the Styling works to make this Panel active and visible. + '
' + + '
'; +{% endhighlight %} From 8c488941fc58143ffd39157ec7004b3d0d6acf09 Mon Sep 17 00:00:00 2001 From: Diemen Design Date: Sun, 15 Mar 2020 21:31:45 +1100 Subject: [PATCH 08/34] Fix Typo's, adjust explanations. --- 03-plugins.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/03-plugins.md b/03-plugins.md index d4a0f4d..9dfce47 100644 --- a/03-plugins.md +++ b/03-plugins.md @@ -289,15 +289,15 @@ See the section "Modal Markup" for element markup options inside Modals. ### Modal Markup This section explains and shows example of the elements and classes that can be used inside Modals. -Note: You can mix the classes from BS3, BS4 and Lite versions so plugins can be version to Bootstrap or no Bootstrap specific, or they can be made compatible to work with all (the preferred method). +Note: You can mix the classes from BS3, BS4 (which are similar) and Lite versions so plugins can be version controlled to Bootstrap or not be Bootstrap specific, or they can be made compatible to work with all (the preferred method). -The main problem with using markup elements in Summernote Modals becomes evident when trying to work with layouts of the elements so they are compatible with all versions of Bootstrap or no Bootstrap as in the Lite version. To try and combat this there is a settings variable that can be checked `interface`, checking this setting in the plugin can allow the plugin to determine wich markup or behaviour the plugin needs to do for compatibility, or you can just use a standard layout for the elements and add the appropriate classes to cover all versions. +The main problem with using markup elements in Summernote Modals becomes evident when trying to work with elements so they are compatible with all versions of Bootstrap or the Lite version of Summernote. To try and aleviate this, there is a settings variable that can be checked `interface`, checking this setting within the plugin will return `BS3`, `BS4` or `Lite` which will allow adding logic control to determine which markup or behaviour the plugin needs use for compatibility, or you can just use a standard layout for the elements and add the appropriate classes to cover all versions (preferred). Generally, the elements and classes for the version of Bootstrap you want to make a plugin for can use that version of Bootstraps elements, and we have tried, even with the Lite version to keep those as close as we can. We've included some examples below to facilitate constructing Modals a bit quicker for you. -Any classes with `note-` at their start are primarily the Summernote classes to minimise interfering with other DOM classes that you may be using for other purposes, however, most of the modals use the Bootstrap classes as their primary styling. +Any classes with `note-` at their start are primarily the Summernote classes to minimise interfering with other DOM classes that you may be using for other purposes, however, most of the modals use the Bootstrap classes as their primary styling, except for in the Lite version of Summernote, it relies on the `note-*` classes to style elements. #### Form Layout {% highlight javascript %} From 2c292c81bd704657fa9a7d51256d584e25ace4de Mon Sep 17 00:00:00 2001 From: Diemen Design Date: Sun, 15 Mar 2020 22:04:30 +1100 Subject: [PATCH 09/34] Add Explanation for isFullscreen. --- 01-deep-dive.md | 73 +++++++++++++++++++++++++++---------------------- 1 file changed, 40 insertions(+), 33 deletions(-) diff --git a/01-deep-dive.md b/01-deep-dive.md index 14a7f51..351a5b2 100644 --- a/01-deep-dive.md +++ b/01-deep-dive.md @@ -366,6 +366,13 @@ You can toggle Fullscreen view by API. $('#summernote').summernote('fullscreen.toggle'); {% endhighlight %} +### isFullscreen +You can programmatically determine if the Summernote is in Fullscreen mode by using `isFullscreen`, which will return `true` or `false`. +{% highlight javascript %} +$('#summernote').summernote('fullscreen.isFullscreen'); +{% endhighlight %} + + ### interface You can find programmatically which Summernote you are using. This will return one of three values: `bs3`, `bs4` or `lite`. @@ -609,42 +616,42 @@ refer to [#saveRange](#saverange-restorerange) ### restoreRange refer to [#restorerange](#saverange-restorerange) -### getLastRange -summernote is saving a range object(WrappedRange) on current cursor. +### getLastRange +summernote is saving a range object(WrappedRange) on current cursor. {% highlight javascript %} const rng = $('#summernote').summernote('editor.getLastRange'); {% endhighlight %} -> #### when summernote save a range with dom event +> #### when summernote save a range with dom event > * keydown > * keyup > * focus > * mouseup -> * paste +> * paste -> #### when summernote save a range with api -> * `editor.insertImage` -> Image -> * `editor.insertNode` -> Node +> #### when summernote save a range with api +> * `editor.insertImage` -> Image +> * `editor.insertNode` -> Node > * `editor.insertText` -> TextNode -> * `editor.pasteHTML` -> last Node of contents -> * `editor.insertHorizontalRule` -> next sibling node of hr node -> * `editor.createLink` -> link node +> * `editor.pasteHTML` -> last Node of contents +> * `editor.insertHorizontalRule` -> next sibling node of hr node +> * `editor.createLink` -> link node -### setLastRange +### setLastRange You can define custom range in node of summernote editable element. {% highlight javascript %} -const range = $.summernote.range; // range utility -// set my custom range +const range = $.summernote.range; // range utility +// set my custom range $('#summernote').summernote('editor.setLastRange', range.createFromNodeAfter(node).select()); {% endhighlight %} -### `range` utility +### `range` utility {% highlight javascript %} -const range = $.summernote.range; // range utility +const range = $.summernote.range; // range utility {% endhighlight %} @@ -652,21 +659,21 @@ const range = $.summernote.range; // range utility range utility make a WrappedRange Class's instance -##### create +##### create create WrappedRange Object From arguments or Browser Selection {% highlight javascript %} const rng = range.create(startContainer, startOffset, endContainer, endOffset) -// or +// or const rng = range.create() // is equals range.createFromSelection() {% endhighlight %} -##### createFromNode +##### createFromNode create WrappedRange object from node @@ -674,7 +681,7 @@ create WrappedRange object from node const rng = range.createFromNode(node) {% endhighlight %} -##### createFromNodeBefore +##### createFromNodeBefore create WrappedRange from node before position @@ -682,7 +689,7 @@ create WrappedRange from node before position const rng = range.createFromNodeBefore(node) {% endhighlight %} -##### createFromNodeAfter +##### createFromNodeAfter create WrappedRange from node after position @@ -691,7 +698,7 @@ const rng = range.createFromNodeAfter(node) {% endhighlight %} -##### createFromSelection +##### createFromSelection create WrappedRange object from selection @@ -702,7 +709,7 @@ const rng = range.createFromSelection(node) #### WrappedRange Object -##### select() +##### select() select update visible range @@ -710,17 +717,17 @@ select update visible range rng.select() ``` -##### collapse(isCollapseToStart) +##### collapse(isCollapseToStart) ``` const newRng = rng.collapse(true); // to start rng -or +or -const newRng = rng.collapse(); // to end rng +const newRng = rng.collapse(); // to end rng ``` -##### splitText() +##### splitText() splitText on range @@ -729,7 +736,7 @@ const textRng = rng.splitText() ``` -##### deleteContents() +##### deleteContents() delete contents on range @@ -738,7 +745,7 @@ const newRng = rng.deleteContents() ``` -##### isCollapsed() +##### isCollapsed() returns whether range was collapsed or not @@ -783,14 +790,14 @@ returns text in range returns range for word before(or after) cursor ``` -const newRng = rng.getWordRange(); // before cursor +const newRng = rng.getWordRange(); // before cursor -// or +// or -const newRng = rng.getWordRange(true); // after cursor +const newRng = rng.getWordRange(true); // after cursor ``` -##### getWordsMatchRange(regex) +##### getWordsMatchRange(regex) returns range for words before cursor that match with a Regex @@ -800,7 +807,7 @@ const rng = range.create() // or $('.summernote').summernote('getLastRange'); const newRng = rng.getWordsMatchRange(/@[a-z ]+/i) -console.log(newRng.toString()) // '@Peter Pan' +console.log(newRng.toString()) // '@Peter Pan' ``` From 1b89c5618f2811088c478e3f1832d3384c648437 Mon Sep 17 00:00:00 2001 From: Diemen Design Date: Tue, 28 Apr 2020 20:43:20 +1000 Subject: [PATCH 10/34] Add codeviewKeepButton to plugin document. --- 03-plugins.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/03-plugins.md b/03-plugins.md index 9dfce47..581c4c3 100644 --- a/03-plugins.md +++ b/03-plugins.md @@ -188,6 +188,10 @@ The vars below are not all needed, what you need depends on what your trying acc // tooltip for button tooltip: lang.examplePlugin.tooltip, + + // Stop button from being disabled when in CodeView + codeviewKeepButton: true, + click:function (e) { context.invoke('examplePlugin.show'); } From 49e97564c820078c494dd79c7eb6a1e3e8bb6aa4 Mon Sep 17 00:00:00 2001 From: Diemen Design Date: Tue, 28 Apr 2020 20:56:16 +1000 Subject: [PATCH 11/34] Update Plugin docs. --- 03-plugins.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/03-plugins.md b/03-plugins.md index 581c4c3..24ad2e0 100644 --- a/03-plugins.md +++ b/03-plugins.md @@ -189,7 +189,7 @@ The vars below are not all needed, what you need depends on what your trying acc // tooltip for button tooltip: lang.examplePlugin.tooltip, - // Stop button from being disabled when in CodeView + // Keep button from being disabled when in CodeView codeviewKeepButton: true, click:function (e) { From 0d6f1d3156e822d24282d5393c7647500fc9e762 Mon Sep 17 00:00:00 2001 From: Park Hyunwoo Date: Thu, 21 May 2020 03:39:05 +0900 Subject: [PATCH 12/34] Bump Summernote to v0.8.18 --- _config.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/_config.yml b/_config.yml index 6eece1f..15ecf96 100644 --- a/_config.yml +++ b/_config.yml @@ -10,13 +10,13 @@ url: "https://summernote.org" # the base hostname & protocol for your site github_username: summernote # Summernote settings -version: 0.8.16 +version: 0.8.18 repository: "https://github.com/summernote/summernote" -jquery_js: "https://code.jquery.com/jquery-3.4.1.min.js" -bootstrap_css: "https://stackpath.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" -bootstrap_js: "https://stackpath.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" -summernote_css: "https://cdn.jsdelivr.net/npm/summernote@0.8.16/dist/summernote.min.css" -summernote_js: "https://cdn.jsdelivr.net/npm/summernote@0.8.16/dist/summernote.min.js" +jquery_js: "https://code.jquery.com/jquery-3.5.1.min.js" +bootstrap_css: "https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css" +bootstrap_js: "https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js" +summernote_css: "https://cdn.jsdelivr.net/npm/summernote@0.8.18/dist/summernote.min.css" +summernote_js: "https://cdn.jsdelivr.net/npm/summernote@0.8.18/dist/summernote.min.js" # Build settings markdown: kramdown From 8567ed71775430d5abd3eef42e6f147a3ada52af Mon Sep 17 00:00:00 2001 From: Park Hyunwoo Date: Thu, 21 May 2020 03:39:17 +0900 Subject: [PATCH 13/34] Add bundle exec on README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1ae628b..c6b911f 100644 --- a/README.md +++ b/README.md @@ -10,5 +10,5 @@ gem install jekyll gem install jekyll-sitemap # run local server on 4000 port -jekyll s +bundle exec jekyll s ``` From 13dfcdda94f3cce8fa80162142fa02049ae6b0fb Mon Sep 17 00:00:00 2001 From: Robert Gutierrez Date: Fri, 29 May 2020 10:42:59 -0700 Subject: [PATCH 14/34] add documentation for onImageLinkInsert callback --- 01-deep-dive.md | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/01-deep-dive.md b/01-deep-dive.md index 351a5b2..b0849db 100644 --- a/01-deep-dive.md +++ b/01-deep-dive.md @@ -928,7 +928,27 @@ $('#summernote').on('summernote.blur.codeview', function() { {% endhighlight %} ### onImageLinkInsert -WIP: Need to work on an explanation +Override insertion of image by url + +{% highlight javascript %} +// onImageLinkInsert callback +$('#summernote').summernote({ + callbacks: { + onImageLinkInsert: function(url) { + // url is the image url from the dialog + $img = $('').attr({ src: url }) + $summernote.summernote('insertNode', $img[0]); + } + } +}); + +// summernote.image.link.insert +$('#summernote').on('summernote.image.link.insert', function(we, url) { + // url is the image url from the dialog + $img = $('').attr({ src: url }) + $summernote.summernote('insertNode', $img[0]); +}); +{% endhighlight %} ### onImageUpload Override image upload handler(default: base64 dataURL on `IMG` tag). From 4cbb7aee003d2b72a47029725d9897042ca3d428 Mon Sep 17 00:00:00 2001 From: hackerwins Date: Fri, 27 Nov 2020 17:13:03 +0900 Subject: [PATCH 15/34] Update donate button --- index.html | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/index.html b/index.html index b886554..a55965b 100644 --- a/index.html +++ b/index.html @@ -88,14 +88,9 @@

Features

Donate

-
- +
+
-
- - - -

Ad

From 743c1647bcb1f13b2a4ff770931ae0f6d62c2376 Mon Sep 17 00:00:00 2001 From: jinho park Date: Sat, 28 Nov 2020 04:11:48 +0900 Subject: [PATCH 16/34] Fix download link (#64) --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index b886554..105f871 100644 --- a/index.html +++ b/index.html @@ -9,7 +9,7 @@

Super Simple WYSIWYG
Editor on Bootstrap
- +

From b2bf673f08ce81164a86e7847d3a4410c78012c3 Mon Sep 17 00:00:00 2001 From: Simon Karlen Date: Mon, 14 Dec 2020 09:56:17 +0100 Subject: [PATCH 17/34] added custom icons doc --- 00-getting-started.md | 3 ++- 01-deep-dive.md | 15 ++++++++++++++ 02-examples.md | 48 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 65 insertions(+), 1 deletion(-) diff --git a/00-getting-started.md b/00-getting-started.md index 8aa96cf..2a100ba 100644 --- a/00-getting-started.md +++ b/00-getting-started.md @@ -56,8 +56,9 @@ Don't forget to change the file's path if you downloaded summernote in a differe You can however, and a lot of developers do these days, is include the stylesheet's within the head are of your page, and include the Javascript at the bottom of your page, but before the closing body tag. -> ##### Fontawesome dependancy +> ##### Fontawesome dependency > After v0.8.0, You don't have to include fontawesome for displaying Summernote's icons. But You can still use fontawesome for your custom icons. For more details, please visit [custom buttons](/deep-dive/#custom-button) section. +> After v0.8.18, You have the possibility to override summernote icons with your custom ones. For more details, please visit [custom icons](/deep-dive/#custom-icons) section. ### Embed diff --git a/01-deep-dive.md b/01-deep-dive.md index b0849db..de094ca 100644 --- a/01-deep-dive.md +++ b/01-deep-dive.md @@ -1098,6 +1098,21 @@ $('.summernote').summernote({ You can also use custom button on `popover` in the same way. +## Custom icons +Summernote supports the usage of your own custom icons. You can e.g. use SVG based icons instead of the default ones. + +### Define your own icons +If you want to override the default icons, configure summernote like this: + +{% hightlight javascript %} +$('.summernote').summernote({ + icons: { + align: '[...]', + // [...] + } +}); +{% endhighlight %} + {% include ad-doc.html %} ## Module system diff --git a/02-examples.md b/02-examples.md index 56cfee4..a5cac0a 100644 --- a/02-examples.md +++ b/02-examples.md @@ -156,6 +156,54 @@ $('.summernote').summernote({ [CodeMirror](http://codemirror.net){:target="_blank"} is a versatile text editor implemented in JavaScript for the browser. It is specialized for editing code, and comes with a number of language modes and addons that implement more advanced editing functions. +## Custom SVG icons +This example shows how to e.g. override the default summernote icons with the free svg versions of [FontAwesome](https://fontawesome.com/){:target="_blank"}. + +{% highlight javascript %} +$('.summernote').summernote({ + height: 150, //set editable area's height + icons: { + align: "", + alignCenter: "", + alignJustify: "", + alignLeft: "", + alignRight: "", + indent: "", + outdent: "", + arrowsAlt: "", + bold: "", + caret: "", + circle: "", + close: "", + code: "", + eraser: "", + font: "", + italic: "", + link: "", + unlink: "", + magic: "", + menuCheck: "", + minus: "", + orderedlist: "", + pencil: "", + picture: "", + question: "", + redo: "", + square: "", + strikethrough: "", + subscript: "", + superscript: "", + table: "", + textHeight: "", + trash: "", + underline: "", + undo: "", + unorderedlist: "", + video: "" + } +}); +{% endhighlight %} + {% include ad-doc.html %} ## Hint From ee3e367bd9426e5ec58a5543256873e265209df3 Mon Sep 17 00:00:00 2001 From: Simon Karlen Date: Mon, 14 Dec 2020 12:19:52 +0100 Subject: [PATCH 18/34] fixed typo --- 01-deep-dive.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/01-deep-dive.md b/01-deep-dive.md index de094ca..d5ff99c 100644 --- a/01-deep-dive.md +++ b/01-deep-dive.md @@ -1104,7 +1104,7 @@ Summernote supports the usage of your own custom icons. You can e.g. use SVG bas ### Define your own icons If you want to override the default icons, configure summernote like this: -{% hightlight javascript %} +{% highlight javascript %} $('.summernote').summernote({ icons: { align: '[...]', From a96ec5692c2ce14b5ec80b7a92b9b9b25eb7f359 Mon Sep 17 00:00:00 2001 From: Umut Karakulak Date: Mon, 29 Mar 2021 02:37:07 +0900 Subject: [PATCH 19/34] add documentation for inheritPlaceholder and addDefaultFonts options --- 01-deep-dive.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/01-deep-dive.md b/01-deep-dive.md index d5ff99c..20f1a92 100644 --- a/01-deep-dive.md +++ b/01-deep-dive.md @@ -197,6 +197,15 @@ $('#summernote').summernote({ }); {% endhighlight %} +Summernote automatically populates the font dropdown with the available fonts that are given on `fontNames` option. This includes the font set on the current dom element. If you only want to display a specific list of fonts on the dropdown. You can set the `addDefaultFonts` option to `false` along with the `fontNames` option. Example settings below will only add Arial and Arial Black fonts to the dropdown. + +{% highlight javascript %} +$('#summernote').summernote({ + fontNames: ['Arial', 'Arial Black'], + addDefaultFonts: false +}); +{% endhighlight %} + ### Custom font size units You can set the available font size units with the `fontSizeUnits` option. @@ -224,6 +233,21 @@ $('#summernote').summernote({ }); {% endhighlight %} +Summernote can also be set to inherit the placeholder from the `placeholder` attribute on the dom element. + +{% highlight html %} +
+
+{% endhighlight %} + +And then set the `inheritPlaceholder` option as `true` during initialization. + +{% highlight javascript %} +$('.summernote').summernote({ + inheritPlaceholder: true +}); +{% endhighlight %} + ### Dialogs Dialogs can be placed in `body`, not within Summernote. If you're using Summernote within a modal dialog, please set this option as `true`. {% highlight javascript %} From e2156d65907ef6eeca58abab2c7acb1d51c38bb2 Mon Sep 17 00:00:00 2001 From: Umut Karakulak Date: Mon, 29 Mar 2021 02:46:48 +0900 Subject: [PATCH 20/34] fix punctuation --- 01-deep-dive.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/01-deep-dive.md b/01-deep-dive.md index 20f1a92..b8e1562 100644 --- a/01-deep-dive.md +++ b/01-deep-dive.md @@ -197,7 +197,7 @@ $('#summernote').summernote({ }); {% endhighlight %} -Summernote automatically populates the font dropdown with the available fonts that are given on `fontNames` option. This includes the font set on the current dom element. If you only want to display a specific list of fonts on the dropdown. You can set the `addDefaultFonts` option to `false` along with the `fontNames` option. Example settings below will only add Arial and Arial Black fonts to the dropdown. +Summernote automatically populates the font dropdown with the available fonts that are given on `fontNames` option. This includes the font set on the current dom element. If you only want to display a specific list of fonts on the dropdown, you can set the `addDefaultFonts` option to `false` along with the `fontNames` option. Example settings below will only add Arial and Arial Black fonts to the dropdown. {% highlight javascript %} $('#summernote').summernote({ From 80cd7e5d0c54e11352a4e43477a77f6b58a4db05 Mon Sep 17 00:00:00 2001 From: Dennis Suitters Date: Sun, 13 Mar 2022 15:43:02 +1100 Subject: [PATCH 21/34] Add BS5 info Add home page BS5 Support information. Add bs5.html example page on Getting Started Page. --- 00-getting-started.md | 21 +++++++++++++++++++-- _includes/bs5.html | 25 +++++++++++++++++++++++++ index.html | 2 +- 3 files changed, 45 insertions(+), 3 deletions(-) create mode 100644 _includes/bs5.html diff --git a/00-getting-started.md b/00-getting-started.md index 2a100ba..be268f1 100644 --- a/00-getting-started.md +++ b/00-getting-started.md @@ -118,7 +118,7 @@ You can also test running example. Save below code as `index.html` and open it w {% include ad-doc.html %} -### For bootstrap 4 +### For Bootstrap 4 You can also use Summernote with Bootstrap 4 using `summernote-bs4.js` and `summernote-bs4.css`. @@ -135,7 +135,24 @@ bs4_frame.innerHTML = ''; {% include bs4.html %} {% endhighlight %} -### Without Bootstrap +### For bootstrap 5 + +You can also use Summernote with Bootstrap 5 using `summernote-bs5.js` and `summernote-bs5.css`. + + + + +{% highlight html %} +{% include bs5.html %} +{% endhighlight %} + +### Without Bootstrap (lite) You can use Summernote without Bootstrap using `summernote-lite.js` and `summernote-lite.css`. diff --git a/_includes/bs5.html b/_includes/bs5.html new file mode 100644 index 0000000..f71a6d0 --- /dev/null +++ b/_includes/bs5.html @@ -0,0 +1,25 @@ + + + + Summernote with Bootstrap 5 + + + + + + + + + + + +
+ + + diff --git a/index.html b/index.html index ca33815..8abf806 100644 --- a/index.html +++ b/index.html @@ -71,7 +71,7 @@

Integration

Features

    -
  • Supports Bootstrap 3.x.x to 4.x.x
  • +
  • Supports Bootstrap 3.x.x to 5.x.x
  • Lightweight (js+css: 100Kb)
  • Smart User Interaction
  • Works in all Major Browsers: From 237c2047c0b54357fee208c7d111671f2487e0db Mon Sep 17 00:00:00 2001 From: Youngteac Hong Date: Sun, 29 Sep 2024 10:43:15 +0900 Subject: [PATCH 22/34] Bump up Summernote to v0.9.0 --- _config.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/_config.yml b/_config.yml index 15ecf96..d7bf8d8 100644 --- a/_config.yml +++ b/_config.yml @@ -10,13 +10,13 @@ url: "https://summernote.org" # the base hostname & protocol for your site github_username: summernote # Summernote settings -version: 0.8.18 +version: 0.9.0 repository: "https://github.com/summernote/summernote" jquery_js: "https://code.jquery.com/jquery-3.5.1.min.js" bootstrap_css: "https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css" bootstrap_js: "https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js" -summernote_css: "https://cdn.jsdelivr.net/npm/summernote@0.8.18/dist/summernote.min.css" -summernote_js: "https://cdn.jsdelivr.net/npm/summernote@0.8.18/dist/summernote.min.js" +summernote_css: "https://cdn.jsdelivr.net/npm/summernote@0.9.0/dist/summernote.min.css" +summernote_js: "https://cdn.jsdelivr.net/npm/summernote@0.9.0/dist/summernote.min.js" # Build settings markdown: kramdown From e6dae2c066c89422c5274f4fde7aab02778d63b9 Mon Sep 17 00:00:00 2001 From: Youngteac Hong Date: Mon, 30 Sep 2024 22:28:44 +0900 Subject: [PATCH 23/34] Remove .travis.yml configuration file --- .travis.yml | 11 ----------- 1 file changed, 11 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 42034d5..0000000 --- a/.travis.yml +++ /dev/null @@ -1,11 +0,0 @@ -language: node_js -node_js: - - 0.10 -branches: - only: - - master -before_script: - - node --version - - npm --version - - npm install -g grunt-cli -script: grunt test --verbose From d53a7f6a99823b6c2edada42d32d9f6b93252756 Mon Sep 17 00:00:00 2001 From: Youngteac Hong Date: Mon, 30 Sep 2024 23:17:40 +0900 Subject: [PATCH 24/34] Refactor footer and index.html - Refactor the footer.html file to improve readability and maintainability. - Update the index.html file to enhance the UI and fix formatting issues. --- 00-getting-started.md | 59 ++-- 01-deep-dive.md | 678 ++++++++++++++++++++----------------- 04-team.html | 189 ++++++----- _includes/footer.html | 47 ++- img/team/hackerwins.png | Bin 0 -> 98374 bytes img/team/hackerwins_2x.png | Bin 0 -> 98374 bytes index.html | 162 +++++---- 7 files changed, 640 insertions(+), 495 deletions(-) create mode 100644 img/team/hackerwins.png create mode 100644 img/team/hackerwins_2x.png diff --git a/00-getting-started.md b/00-getting-started.md index be268f1..c8be52b 100644 --- a/00-getting-started.md +++ b/00-getting-started.md @@ -16,10 +16,12 @@ The fastest way to get Summernote is to download the precompiled and minified ve Download compiled ### Download source code + Get the latest Summernote LESS and Javascript source code by downloading it directly from GitHub. [Download]({{ site.repository }}/archive/master.zip) ### Clone or Fork via Github + Visit us on GitHub to clone or fork the Summernote project. [project]({{ site.repository }}) @@ -30,6 +32,7 @@ Visit us on GitHub to clone or fork the Summernote project. Bootstrap uses certain HTML elements and CSS properties which require HTML5 doctype. Include <!DOCTYPE html> in the beginning of all your projects. {% highlight html %} + ... @@ -42,6 +45,7 @@ Summernote uses the Open Source libraries jQuery and Bootstrap, if you are using Include the Following code in the head area of your HTML page. {% highlight html %} + @@ -57,6 +61,7 @@ Don't forget to change the file's path if you downloaded summernote in a differe You can however, and a lot of developers do these days, is include the stylesheet's within the head are of your page, and include the Javascript at the bottom of your page, but before the closing body tag. > ##### Fontawesome dependency +> > After v0.8.0, You don't have to include fontawesome for displaying Summernote's icons. But You can still use fontawesome for your custom icons. For more details, please visit [custom buttons](/deep-dive/#custom-button) section. > After v0.8.18, You have the possibility to override summernote icons with your custom ones. For more details, please visit [custom icons](/deep-dive/#custom-icons) section. @@ -67,23 +72,26 @@ Summernote can be used with or without a form. To use without a form, we suggest using a div in the body; this element will then be used where you want the Summernote editor to be rendered within your page. {% highlight html %} +
    Hello Summernote
    {% endhighlight %} To use within a form, is pretty much the same as above, but rather than a div, we recommend using a textarea element inside a form, which should include a name attribute so when the form is submitted you can use that name to process the editors data on your backend. Also, if using Summernote inside a form to set the attribute method="post" to allow larger sized editor content to parse to the backend, if you don't your data either may not parse, or will be truncated. {% highlight html %} +
    {% endhighlight %} ### Run summernote + Run the script below when document is ready! {% highlight javascript %} $(document).ready(function() { - $('#summernote').summernote(); +$('#summernote').summernote(); }); {% endhighlight %} @@ -94,6 +102,7 @@ The $(document).ready function is particularly necessary if you inc You can also test running example. Save below code as `index.html` and open it with your browser. {% highlight html %} + @@ -180,14 +189,15 @@ $('#summernote').summernote(); Initialize Summernote with options ### Height and Focus + If you set focus option, cursor will focus editable area after initialize Summernote. {% highlight javascript %} $('#summernote').summernote({ - height: 300, // set editor height - minHeight: null, // set minimum height of editor - maxHeight: null, // set maximum height of editor - focus: true // set focus to editable area after initializing summernote +height: 300, // set editor height +minHeight: null, // set minimum height of editor +maxHeight: null, // set maximum height of editor +focus: true // set focus to editable area after initializing summernote }); {% endhighlight %} @@ -241,6 +251,7 @@ $('#summernote').summernote('code', markupStr); for more detail api: [deep dive with api](/deep-dive/#api) > ##### destroy and code +> > After v0.7.0, direct jquery methods, `destroy` and `code` were removed for avoiding conflict with other jquery libraries. You can call this methods with summernote api. {% include ad-doc.html %} @@ -252,6 +263,7 @@ for more detail api: [deep dive with api](/deep-dive/#api) Include libraries with lang file. eg) summernote-ko-KR.js. {% highlight html %} + @@ -261,15 +273,16 @@ Include libraries with lang file. eg) summernote-ko-KR.js. + {% endhighlight %} Run the script with locale option. {% highlight javascript %} $(document).ready(function() { - $('#summernote').summernote({ - lang: 'ko-KR' // default: 'en-US' - }); +$('#summernote').summernote({ +lang: 'ko-KR' // default: 'en-US' +}); }); {% endhighlight %} @@ -283,45 +296,53 @@ $(document).ready(function() { }); -More Summernote languages: [languages]({{ site.repository }}/tree/master/lang) +More Summernote languages: [languages]({{ site.repository }}/tree/main/src/lang) ## Integration + 3rd parties available in django, rails, angular and so on. ### Django + Handy update for your django admin page. -* [django-summernote](https://github.com/summernote/django-summernote){:target="_blank"} -* [summernote plugin for Django](https://pypi.python.org/pypi/django-summernote){:target="_blank"} +- [django-summernote](https://github.com/summernote/django-summernote){:target="\_blank"} +- [summernote plugin for Django](https://pypi.python.org/pypi/django-summernote){:target="\_blank"} ### Ruby On Rails + This gem was built to gemify the assets used in Summernote. -* [summernote-rails](https://github.com/summernote/summernote-rails){:target="_blank"} -* [how to use summernote on rails](https://www.youtube.com/watch?v=A3vDRdfEyKs&feature=youtu.be&t=75){:target="_blank"} +- [summernote-rails](https://github.com/summernote/summernote-rails){:target="\_blank"} +- [how to use summernote on rails](https://www.youtube.com/watch?v=A3vDRdfEyKs&feature=youtu.be&t=75){:target="\_blank"} ### AngularJS + AngularJS directive to Summernote. -* [angular-summernote](https://github.com/summernote/angular-summernote) +- [angular-summernote](https://github.com/summernote/angular-summernote) ### Apache Wicket + Summernote widget for Wicket Bootstrap. -* [demo](http://wb-mgrigorov.rhcloud.com/summernote){:target="_blank"} -* [source code](https://github.com/l0rdn1kk0n/wicket-bootstrap/tree/4f97ca783f7279ca43f9e2ee790703161f59fa40/bootstrap-extensions/src/main/java/de/agilecoders/wicket/extensions/markup/html/bootstrap/editor){:target="_blank"} +- [demo](http://wb-mgrigorov.rhcloud.com/summernote){:target="\_blank"} +- [source code](https://github.com/l0rdn1kk0n/wicket-bootstrap/tree/4f97ca783f7279ca43f9e2ee790703161f59fa40/bootstrap-extensions/src/main/java/de/agilecoders/wicket/extensions/markup/html/bootstrap/editor){:target="\_blank"} ### Webpack + Example about using summernote with webpack. -* [summernote-webpack-example](https://github.com/hackerwins/summernote-webpack-example){:target="_blank"} +- [summernote-webpack-example](https://github.com/hackerwins/summernote-webpack-example){:target="\_blank"} ### Meteor + Example about using summernote with meteor. -* [summernote-meteor-example](https://github.com/hackerwins/summernote-meteor-example){:target="_blank"} +- [summernote-meteor-example](https://github.com/hackerwins/summernote-meteor-example){:target="\_blank"} ### PHP + Example for using Summernote with elFinder which uses a PHP Backend. -* [summernote-elfinder-example](https://github.com/Studio-42/elFinder/wiki/Integration-with-Multiple-Summernote-%28fixed-functions%29){:target="_blank"} +- [summernote-elfinder-example](https://github.com/Studio-42/elFinder/wiki/Integration-with-Multiple-Summernote-%28fixed-functions%29){:target="\_blank"} diff --git a/01-deep-dive.md b/01-deep-dive.md index b8e1562..aadcdb3 100644 --- a/01-deep-dive.md +++ b/01-deep-dive.md @@ -17,19 +17,20 @@ Summernote allows you to customise the toolbar. {% highlight javascript %} $('#summernote').summernote({ - toolbar: [ - // [groupName, [list of button]] - ['style', ['bold', 'italic', 'underline', 'clear']], - ['font', ['strikethrough', 'superscript', 'subscript']], - ['fontsize', ['fontsize']], - ['color', ['color']], - ['para', ['ul', 'ol', 'paragraph']], - ['height', ['height']] - ] +toolbar: [ +// [groupName, [list of button]] +['style', ['bold', 'italic', 'underline', 'clear']], +['font', ['strikethrough', 'superscript', 'subscript']], +['fontsize', ['fontsize']], +['color', ['color']], +['para', ['ul', 'ol', 'paragraph']], +['height', ['height']] +] }); {% endhighlight %} This is a toolbar with font style only. +
    From f45551e0e4e5db32b38f6b7befc901b42a27af1b Mon Sep 17 00:00:00 2001 From: Youngteac Hong Date: Mon, 30 Sep 2024 23:25:08 +0900 Subject: [PATCH 25/34] Add ads.txt file for Google AdSense verification --- ads.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 ads.txt diff --git a/ads.txt b/ads.txt new file mode 100644 index 0000000..fcba037 --- /dev/null +++ b/ads.txt @@ -0,0 +1 @@ +google.com, pub-4799203991210529, DIRECT, f08c47fec0942fa0 \ No newline at end of file From 78de22ac95d65ca9e9a4c755f3bbef3eda7f6b5c Mon Sep 17 00:00:00 2001 From: Youngteac Hong Date: Mon, 30 Sep 2024 23:31:51 +0900 Subject: [PATCH 26/34] Create jekyll.yml --- .github/workflows/jekyll.yml | 64 ++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 .github/workflows/jekyll.yml diff --git a/.github/workflows/jekyll.yml b/.github/workflows/jekyll.yml new file mode 100644 index 0000000..68520b5 --- /dev/null +++ b/.github/workflows/jekyll.yml @@ -0,0 +1,64 @@ +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. + +# Sample workflow for building and deploying a Jekyll site to GitHub Pages +name: Deploy Jekyll site to Pages + +on: + # Runs on pushes targeting the default branch + push: + branches: ["main"] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages +permissions: + contents: read + pages: write + id-token: write + +# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. +# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. +concurrency: + group: "pages" + cancel-in-progress: false + +jobs: + # Build job + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Setup Ruby + uses: ruby/setup-ruby@8575951200e472d5f2d95c625da0c7bec8217c42 # v1.161.0 + with: + ruby-version: '3.1' # Not needed with a .ruby-version file + bundler-cache: true # runs 'bundle install' and caches installed gems automatically + cache-version: 0 # Increment this number if you need to re-download cached gems + - name: Setup Pages + id: pages + uses: actions/configure-pages@v5 + - name: Build with Jekyll + # Outputs to the './_site' directory by default + run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}" + env: + JEKYLL_ENV: production + - name: Upload artifact + # Automatically uploads an artifact from the './_site' directory by default + uses: actions/upload-pages-artifact@v3 + + # Deployment job + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + needs: build + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 From 169d166a2272da7dcf57293bafd0cc4a04ed9761 Mon Sep 17 00:00:00 2001 From: Youngteac Hong Date: Tue, 1 Oct 2024 00:16:47 +0900 Subject: [PATCH 27/34] Fix invalid links --- 00-getting-started.md | 2 +- _includes/header.html | 39 +++++++++++++++++++++++++++++---------- 2 files changed, 30 insertions(+), 11 deletions(-) diff --git a/00-getting-started.md b/00-getting-started.md index c8be52b..24e3548 100644 --- a/00-getting-started.md +++ b/00-getting-started.md @@ -18,7 +18,7 @@ The fastest way to get Summernote is to download the precompiled and minified ve ### Download source code Get the latest Summernote LESS and Javascript source code by downloading it directly from GitHub. -[Download]({{ site.repository }}/archive/master.zip) +[Download]({{ site.repository }}/archive/main.zip) ### Clone or Fork via Github diff --git a/_includes/header.html b/_includes/header.html index fb82559..24e7f74 100644 --- a/_includes/header.html +++ b/_includes/header.html @@ -1,4 +1,7 @@ -