diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md new file mode 100644 index 000000000..4f70cb6f0 --- /dev/null +++ b/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,21 @@ +### Description + +[Description of the bug or feature] + +### Steps to reproduce + +1. [First step] +2. [Second step] +3. [and so on...] + +**Expected behavior:** [What you expected to happen] + +**Actual behavior:** [What actually happened] + +**Link to an example:** [If you're reporting a bug that's not reproducible on our [demo page](https://yabwe.github.io/medium-editor/demo.html), please try to reproduce it on [JSFiddle](https://jsfiddle.net/), [JS Bin](https://jsbin.com), [CodePen](http://codepen.io/) or a similar service and paste a link here] + +### Versions + +- medium-editor: +- browser: +- OS: diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 000000000..5441b1af4 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,17 @@ +| Q | A +| ---------------- | --- +| Bug fix? | yes/no +| New feature? | yes/no +| BC breaks? | yes/no +| Deprecations? | yes/no +| New tests added? | yes/not needed +| Fixed tickets | comma-separated list of tickets fixed by the PR, if any +| License | MIT + +### Description + +[Description of the bug or feature] + +-- + +#### Please, don't submit `/dist` files with your PR! diff --git a/.gitignore b/.gitignore index 5b81c0da2..f215ea27a 100644 --- a/.gitignore +++ b/.gitignore @@ -11,5 +11,5 @@ reports/ coverage/ ._* -#PhpStorm IDE -.idea/ \ No newline at end of file +# IDE +.idea/ diff --git a/API.md b/API.md index 076b351a6..a6a17594c 100644 --- a/API.md +++ b/API.md @@ -8,9 +8,11 @@ - [`MediumEditor(elements, options)`](#mediumeditorelements-options) - [`destroy()`](#destroy) - [`setup()`](#setup) + - [`addElements()`](#addelementselements) + - [`removeElements()`](#removeelementselements) - [Event Functions](#event-functions) - - [`on(target, event, listener, useCapture)`](#ontarget-event-listener-usecapture) - - [`off(target, event, listener, useCapture)`](#offtarget-event-listener-usecapture) + - [`on(targets, event, listener, useCapture)`](#ontargets-event-listener-usecapture) + - [`off(targets, event, listener, useCapture)`](#offtargets-event-listener-usecapture) - [`subscribe(name, listener)`](#subscribename-listener) - [`unsubscribe(name, listener)`](#unsubscribename-listener) - [`trigger(name, data, editable)`](#triggername-data-editable) @@ -33,10 +35,16 @@ - [`pasteHTML(html, options)`](#pastehtmlhtml-options) - [`queryCommandState(action)`](#querycommandstateaction) - [Helper Functions](#helper-functions) + - [`checkContentChanged(editable)`](#checkContentChangededitable) - [`delay(fn)`](#delayfn) + - [`getContent(index)`](#getcontentindex) - [`getExtensionByName(name)`](#getextensionbynamename) + - [`resetContent(element)`](#resetcontentelement) - [`serialize()`](#serialize) - [`setContent(html, index)`](#setcontenthtml-index) +- [Static Functions/Properties](#static-functionsproperties) + - [`getEditorFromElement(element)`](#geteditorfromelementelement) + - [`version`](#version) @@ -46,14 +54,17 @@ Creating an instance of MediumEditor will: * Convert all passed in elements into `contenteditable` elements. -* For any `