Here is a typical example of how to create an editor:
import {createEditor} from'@kullna/editor';
consteditor=createEditor('#editor', { language: 'javascript', // This tells the editor to use Highlight.JS for syntax highlighting: highlightElement: hljs.highlightElement, // This tells the editor to show a gutter with line numbers and a border: gutter: { border: true, class: 'gutter' } }); // Warning! Disabling spellcheck will disable spellcheck for the entire page. editor.spellcheck=false; editor.wrapsText=true;
For a list of features and options you can change after creating the editor, see the
KullnaEditor interface.
For a comprehensive examples of the options and how to use them, see the Options
interface.
KullnaEditor.createEditor(element, options)
Creates a new KullnaEditor instance.
Here is a typical example of how to create an editor:
For a list of features and options you can change after creating the editor, see the KullnaEditor interface.
For a comprehensive examples of the options and how to use them, see the Options interface.
Returns
A new KullnaEditor instance.