Click me to edit!
There are many text editors out there, yet nothing feels right:
Here is the feature list we wanted:
contenteditable) + inline editingWe built a simple editor based on Boostrap WYSIWYG By Mindmup and added
Pass editor option with content to be edited
// fixed editor
var fixed = new bsEditor({
editor: $(".editable-content"),
toolbar_style: {
"background-color": "black"
}
});
Pass parent option pointing to the parent element.
// inline
var inline = new bsEditor({
parent: $("#inline-parent"),
});
inline.set_input("Write Something!")
| Option | Description |
|---|---|
editor |
For fixed mode, this element will become contenteditable |
parent |
For inline mode, make editor in this element |
toolbar_style |
CSS for toolbars |
onsave |
Function to be called on saving (fixed mode) |
oncancel |
Function to be called on cancel (fixed mode) |
change |
Function to be called on change (inline mode) |
| Method | Description |
|---|---|
set_input(html) |
Set HTML in Editor |
get_value() |
Get Inner HTML |