Insert custom HTML using a new button in the Medium Editor toolbar
Check out the demo page hosted on GitHub pages.
Creates a new instance of CustomHtml extension.
</>
)The click event handler that calls insertHtmlAtCaret
method.
This function is called by the Medium Editor and returns the button that is added in the toolbar
Load in the page the following scripts in this order:
window.onload = function () { var myEditor = new MediumEditor(".container", { buttons: [ "bold" , "italic" , "underline" , "anchor" , "header1" , "header2" , "quote" , "customHtml" ] , extensions: { "customHtml": new CustomHtml({ buttonText: "<hr>" , htmlToInsert: "<hr class='someclass'>" }) } }); };
Run the following commands to download and install the extension:
$ git clone git@github.com:jillix/medium-editor-custom-html.git medium-editor-custom-html $ cd medium-editor-custom-html $ npm install
your-great-feature
.See the LICENSE file.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4