striven-editor

Maintained and contributed to an open source WYSIWYG editor as an internship project that made it to production and was adopted by the company I was working at.
git clone https://unitehenry.com/git/striven-editor.git
Log | Files | Refs | README | LICENSE

commit 441bfc9109b30ed9e7c9c981251a19df0545ba06
parent cf7c4236298fd8f29f698f9aa86c9d18778cba2b
Author: unitehenry <unitehenry@gmail.com>
Date:   Fri, 11 Oct 2019 11:22:47 -0400

README

Diffstat:
MREADME.md | 2++
1 file changed, 2 insertions(+), 0 deletions(-)

diff --git a/README.md b/README.md @@ -207,6 +207,7 @@ Then take the SVG element's ```viewBox``` attribute data and the path element's |imageUrl|```String```|```null```|An endpoint to make a ```POST``` request for writing encoded images to the server. <br /> See [Referencing Encoded Images](#writing-encoded-images-to-a-server)| |customToolbarButton|```Object```|```null```|Configuration properties for adding a custom toolbar button. <br /> See [Custom Toolbar Button Properties](#custom-toolbar-button-properties)| |activeOptionColor|```String```|```#ddd```|Fill color for the toolbar action to change to when active.| +|submitOnEnter|```Function```|```null```|Handler function that clears the editor on enter and returns the contents submitted. *Shift + Enter still inserts a break* <br /> ```submitOnEnter({ content, files })``` <br /> **Nothing will return if the editor is empty or no files are attached**| ## Editor Methods @@ -216,6 +217,7 @@ Then take the SVG element's ```viewBox``` attribute data and the path element's |getContent|```String```|Returns an HTML String of the editor's contents| |setContent(```String```)|None|Set the editor ```innerHTML``` content by passing an HTML string| |clearContent|None|Clear the editor of its current contents| +|clearFiles|None|Clear the files currently attached to the editor| |getRange|```Range```|Get the current [Range](https://developer.mozilla.org/en-US/docs/Web/API/Range) of the window at index ```0```| |attachFile(```File```)|None|Attaches given file to the editor| |openLinkMenu|None|Opens the ```insertLink``` menu|