npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@saleswon/sw-editor

v4.9.11-rc10

Published

A ServiceNow custom component for a custom tinymce 4 editor

Downloads

7

Readme

sw-editor

A Now Experience TinyMCE editor component

Component Preview

preview

Basic Usage

const testContent = `<span>This is a test</span>`;

<ne-tinymce content={testContent} />

Exposed Parameters

| Property Name | Description | Type | Default Value | Example Custom Value | | ----------------- | --------------------------------------------- | ------------- | ---------------------- | -------------------------------------------- | | componentId | A unique component ID | UID | Random | | | content | HTML content to be added to rich-text editor | String | Empty String | <span>This is a test</span> | | placeholder | Placeholder added to element | String | Enter rich-text-here | Place some text here | | onInit | callback function | Function | noop | (e, editor) => { console.log(e, editor); } | | onSetContent | callback function | Function | noop | (e, editor) => { console.log(e, editor); } | | onFocus | callback function | Function | noop | (e, editor) => { console.log(e, editor); } | | onChange | callback function | Function | noop | (e, editor) => { console.log(e, editor); } | | onClick | callback function | Function | noop | (e, editor) => { console.log(e, editor); } | | onExecCommand | callback function | Function | noop | (e, editor) => { console.log(e, editor); } | | onSelection | callback function | Function | noop | (e, editor) => { console.log(e, editor); } | | onBlur | callback function | Function | noop | (e, editor) => { console.log(e, editor); } | | callbacks | Array of custom callback functions | Array | [] | See custom callback section below | | buttons | Array of custom buttons | Array | [] | See custom button section below | | plugins | Array of plugins to include | Array | Bool | [...] | See plugins section below | | tools | Array of tool buttons to include | Array | Bool | [...] | See tools section below | | extraTools | Array of extra tool buttons to include | Array | [] | ['bold'] | | contexts | Array of buttons to add to context menu | Array | Bool | [...] | See contexts section below | | extraContexts | Array of extra context menu buttons | Array | [] | ['link unlink'] | | menus | Array of buttons to add to top menu | Array | Bool | false | See menus section below | | extraMenus | Array of extra menu buttons | Array | [] | ['file'] | | readonly | Boolean property to determine read-only | Bool | false | true | | readonlyTools | Array of tool buttons to show when read | Array | Bool | false | ['bold italic', 'link unlink'] | | readonlyContexts | Array of context buttons to show when read | Array | Bool | false | ['bold italic', 'link unlink'] | | readonlyMenus | Array of menu buttons to show when read | Array | Bool | false | ['file', 'edit'] | | customClasses | Array of custom classes to add to body el | Array | [] | ['custom-1', 'custom-2'] | | minHeight | Minimum height for auto-resize plugin | Integer | 100 | 200 | | maxHeight | Maximum height for auto-resize plugin | Integer | 700 | 1200 | | paddingTop | padding-top for body el | Integer | 60 | 20 | | paddingBottom | padding-bottom for body el | Integer | 60 | 20 | | paddingSides | padding-left, padding-right for body el | Integer | 20 | 40 | | browserSpellcheck | Enables spellcheck for editor | Bool | true | false | | relativeUrls | Makes all link urls relative to base url | Bool | true | false | | convertUrls | No clue what this does, but tinymce uses it | Bool | false | true | | autoFocus | Enables the editor to be auto-focused on init | Bool | false | true | | removeHost | Removes script hosts | Bool | true | false | | validElements | String selector of valid elements and attrs | String | *[*] | 'span, p, table' | | externalPlugins | Object with external plugins to be loaded | Object | {} | See tinymce 4 documentation on this property | | useBorder | Enables the css border around the editor | Bool | true | false |