Giter Club home page Giter Club logo

ui-editor's Introduction

UI-Editor

Custom HTML element to be used as a WYSIWYG editor, this custom element provides a simple way to edit rich texts using the latest browser technologies.

State Attributes

Name Description
empty Automatically assigned when there is content into the editor
invalid Automatically assigned when the editor content is required but there is no content

Properties

Name Description
empty Get the empty state from the editor
name Get and set the editor name
value Get and set the editor content
defaultValue Get and set tje editor default value
required Get and set the required state
readOnly Get and set the readOnly state
disabled Get and set the disabled state
preserveSelection Get and set the preserve selection state.
paragraphType Get and set the paragraph tag name
deniedTags Get and set the denied tag list
orientation Get and set the editor orientation mode. Use: row or column value
selectedRange Get the current selection range
selectedText Get the current selection text
selectedHTML Get the current selection HTML
selectedStyles Get the current selection styles

Methods

Name Description
setRemovalState Change the removal state of an element.
setRenderingState Change the rendering state of an element.
clearSelection Removes any active selection in the editor content
focus Move the focus to the content child into the editor
reset Reset the content child into the editor to its initial value
checkValidity Check whether the editor content is valid
formatAction Formats the specified tag for the selection or insertion point
fontNameAction Change the font name for the selection or at the insertion point
fontSizeAction Change the font size for the selection or at the insertion point
fontColorAction Change the font color for the selection or at the insertion point
lineHeightAction Change line height for the selection or at the insertion point
undoAction Undoes the last executed command
redoAction Redoes the previous undo command
boldAction Toggles bold on/off for the selection or at the insertion point
italicAction Toggles italics on/off for the selection or at the insertion point
underlineAction Toggles underline on/off for the selection or at the insertion point
strikeThroughAction Toggles strikeThrough on/off for the selection or at the insertion point
unorderedListAction Creates a bulleted unordered list for the selection or at the insertion point
orderedListAction Creates a numbered ordered list for the selection or at the insertion point
alignLeftAction Justifies the selection or insertion point to the left
alignCenterAction Justifies the selection or insertion point to the center
alignRightAction Justifies the selection or insertion point to the right
alignJustifyAction Justifies the selection or insertion point
outdentAction Outdents the line containing the selection or insertion point
indentAction Indents the line containing the selection or insertion point
cutAction Removes the current selection and copies it to the clipboard
copyAction Copies the current selection to the clipboard
pasteAction Pastes the clipboard contents at the insertion point

Slots

Name Description
toolbar Element to contain all toolbar controls
content Element to contain all editor data (rich text, html, etc)

Events

Name Description
change Dispatched when the content into the editor is changed

Install

Using npm:

npm i @singleware/ui-editor

License

MIT © Silas B. Domingos

ui-editor's People

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.