A text-alignment plugin for the EditorJS. Text alignment with a button that tries all options (left, center, right, justify) in turn respectively. This is my first contribution to public.
The plugin works on paragraph blocks. The selection of styled elements within the paragraph also changes the alignment of the parent paragraph. (Previously it didn't work as expected)
yarn add @canburaks/text-align-editorjs
or
<script src="https://cdn.jsdelivr.net/npm/@canburaks/[email protected]/dist/text-align.umd.min.js"></script>
import TextAlign from "@canburaks/text-align-editorjs"
const editor = new EditorJS({
holder: 'editorjs',
tools: {
textAlign:TextAlign
},
})
MIT.