New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

omnia-editor

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

omnia-editor

<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section --> [![All Contributors](https://img.shields.io/badge/all_contributors-3-orange.svg?style=flat-square)](#contributors-) <!-- ALL-CONTRIBUTORS-BADGE:END -->

latest
npmnpm
Version
1.0.0-beta.1
Version published
Weekly downloads
5
66.67%
Maintainers
1
Weekly downloads
 
Created
Source

omnia-editor

All Contributors

Usage in Svelte

npm i omnia-editor
# or
yarn add omnia-editor
<script>
import { OmniaEditor } from "omnia-editor";
</script>

<OmniaEditor />

Properties

value: string;

Initial value of the content.

editor: Editor;

TipTap instance of the Editor.

spellcheck: boolean;

Use spellcheck.

Methods

getJSON(): Object;

Get the document as JSON.

getHTML(): string;

Get the document as HTML.

getCharacterCount(): number;

Get the number of characters for the current document.

isFocused(): boolean;

Returns true when Editor is focused.

isEmpty(): boolean;

Returns true if there is no content.

blur(): boolean;

Removes focus from the editor.

focus(position): boolean;

Focus the editor at the given position.

Set the focus to the editor focus()

Set the cursor to the first position focus('start')

Set the cursor to the last position focus('end')

Selects the whole document focus('all')

Set the cursor to position 10 focus(10)

undo(): boolean;

Undo recent changes.

redo(): boolean;

Reapply reverted changes.

destroy(): void;

Destroy the editor.

Events

on:init

Triggered when the editor is initialized.

on:focus

Triggered when the editor is focused.

on:blur

Triggered when the editor looses focus.

on:change

Triggered when the editors content changes.

Contributors ✨

Thanks goes to these wonderful people (emoji key):


AntonyBoucher

💻

Torsten Dittmann

⚠️ 💻

Dennis Tobar

💻

This project follows the all-contributors specification. Contributions of any kind welcome!

FAQs

Package last updated on 07 Dec 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts