A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/jillix/medium-editor-custom-html below:

jillix/medium-editor-custom-html: :negative_squared_cross_mark: An extension that inserts custom HTML using a new button in the Medium Editor toolbar

medium-editor-custom-html

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
  1. File an issue in the repository, using the bug tracker, describing the contribution you'd like to make. This will help us to get you started on the right foot.
  2. Fork the project in your account and create a new branch: your-great-feature.
  3. Commit your changes in that branch.
  4. Open a pull request, and reference the initial issue in the pull request message.

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