Skip to content

lesjoursfr/edith

Repository files navigation

npm version QC Checks

@lesjoursfr/edith

Edith, simple WYSIWYG editor.

Requirements

To work this library needs :

How to use

import { Edith } from "@lesjoursfr/edith";

/* Initialize the WYSIWYG Editor */
new Edith(document.querySelector("#editor"), {
	height: 200,
	toolbar: [
		[
			"style",
			[
				"bold",
				"italic",
				"underline",
				"strikethrough",
				"subscript",
				"superscript",
				"nbsp",
				"clear",
			],
		],
		/*** Other toolbar blocs ***/
	],
	buttons: {
		/*** Extra buttons for the toolbar ***/
	},
	initialContent: "Optional initial content",
});