Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@brightspace-ui/htmleditor

Package Overview
Dependencies
Maintainers
3
Versions
767
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@brightspace-ui/htmleditor - npm Package Compare versions

Comparing version 0.0.2 to 0.0.5

generated/langs.js

21

htmleditor.js

@@ -20,2 +20,3 @@ import '@brightspace-ui/core/components/colors/colors.js';

import { RtlMixin } from '@brightspace-ui/core/mixins/rtl-mixin.js';
import { tinymceLangs } from './generated/langs.js';

@@ -36,3 +37,2 @@ // To update from nre tinyMCE install

// TODO: review allow_script_urls (ideally we can turn this off)
// TODO: review resize (monolith specifies both, but this would require enabling statusbar)
// TODO: review auto-focus and whether it should be on the API

@@ -42,2 +42,16 @@

const documentLang = (document.documentElement.getAttribute('lang') ?? 'en').replace('-', '_');
let tinymceLang = documentLang;
if (!tinymceLangs.includes(documentLang)) {
const cultureIndex = tinymceLang.indexOf('_');
if (cultureIndex !== -1) tinymceLang = tinymceLang.substring(0, cultureIndex);
if (!tinymceLangs.includes(tinymceLang)) {
tinymceLang = tinymceLangs.find((lang) => {
return lang.startsWith(tinymceLang);
});
if (!tinymceLang) tinymceLang = 'en';
}
}
const pathFromUrl = (url) => {

@@ -147,3 +161,2 @@ return url.substring(0, url.lastIndexOf('/'));

const textarea = this.shadowRoot.querySelector(`#${this._editorId}`);
const locale = 'en-US';

@@ -188,4 +201,4 @@ const fullPageConfig = {};

inline: this.inline,
language: locale !== 'en-US' ? locale : null,
language_url: `/tinymce/langs/${locale}.js`,
language: tinymceLang,
language_url: `/tinymce/langs/${tinymceLang}.js`,
menubar: false,

@@ -192,0 +205,0 @@ object_resizing : true,

{
"name": "@brightspace-ui/htmleditor",
"description": "An HTML editor that integrates with Brightspace",
"version": "0.0.2",
"version": "0.0.5",
"repository": "https://github.com/BrightspaceUI/htmleditor.git",

@@ -11,5 +11,9 @@ "publishConfig": {

"htmleditor.js",
"icons.js",
"/generated",
"/tinymce"
],
"scripts": {
"build:langs": "node ./cli/lang-generator.js",
"build": "npm run build:langs",
"lint": "npm run lint:eslint && npm run lint:style && npm run lint:lit",

@@ -36,2 +40,3 @@ "lint:eslint": "eslint . --ext .js,.html",

"babel-eslint": "^10",
"chalk": "^4",
"deepmerge": "^4.2.2",

@@ -38,0 +43,0 @@ "es-dev-server": "^1",

1

README.md
# d2l-htmleditor
[![NPM version](https://img.shields.io/npm/v/@brightspace-ui/htmleditor.svg)](https://www.npmjs.org/package/@brightspace-ui/htmleditor)
[![Dependabot badge](https://flat.badgen.net/dependabot/BrightspaceUI/htmleditor?icon=dependabot)](https://app.dependabot.com/)
[![Build status](https://travis-ci.com/@brightspace-ui/htmleditor.svg?branch=master)](https://travis-ci.com/@brightspace-ui/htmleditor)

@@ -6,0 +5,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc