Skip to content

Commit

Permalink
New version 4.0.0-beta.96 Read more https://github.com/xdan/jodit/blo…
Browse files Browse the repository at this point in the history
  • Loading branch information
xdan committed Nov 2, 2023
1 parent 42f4c70 commit 0f30561
Show file tree
Hide file tree
Showing 19 changed files with 585 additions and 424 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
> - :house: [Internal]
> - :nail_care: [Polish]
## 4.0.0-beta.96

- Removed `Jodit.modules.Helpers.val` method

## 4.0.0-beta.95

- Fixed the logic of the file upload module. When HTTP errors were simply ignored.
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jodit",
"version": "4.0.0-beta.95",
"version": "4.0.0-beta.96",
"description": "Jodit is awesome and usefully wysiwyg editor with filebrowser",
"main": "build/jodit.min.js",
"types": "./types/index.d.ts",
Expand Down
1 change: 0 additions & 1 deletion src/core/helpers/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,3 @@ export * from './selector';
export * from './set';
export * from './stack';
export * from './utils';
export * from './val';
27 changes: 0 additions & 27 deletions src/core/helpers/utils/val.ts

This file was deleted.

2 changes: 1 addition & 1 deletion src/modules/context-menu/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Context menu.
# Context menu

It's pretty easy to use:

Expand Down
2 changes: 1 addition & 1 deletion src/modules/dialog/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Jodit dialog system
# Dialog system

The Jodit dialog system enables the creation of modals with a title, footer, and content.
Each dialog is created as a distinct component that inherits from [[View]].
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 19 additions & 1 deletion src/modules/widget/file-selector/file-selector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
*/

import type { IFileBrowserCallBackData, IJodit } from 'jodit/types';
import { isFunction, $$, attr, val } from 'jodit/core/helpers';
import { isFunction, $$, attr } from 'jodit/core/helpers';
import { Dom } from 'jodit/core/dom/dom';
import { UIBlock, UIForm, UIInput, UIButton } from 'jodit/core/ui';

Expand Down Expand Up @@ -170,3 +170,21 @@ export const FileSelectorWidget = (

return TabsWidget(editor, tabs);
};

function val(
elm: HTMLElement,
selector: string,
value?: string | null
): string {
const child = elm.querySelector<HTMLInputElement>(selector);

if (!child) {
return '';
}

if (value) {
child.value = value;
}

return child.value;
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 10 additions & 9 deletions test/screenshots/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
FROM node:16.15.0-buster-slim
FROM --platform=linux/amd64 node:18.17.1-buster-slim

WORKDIR /app

RUN apt-get update --allow-insecure-repositories \
&& apt-get install -y wget gnupg \
&& wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \
&& sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' \
&& apt-get update \
&& apt-get install -y google-chrome-stable fonts-ipafont-gothic fonts-wqy-zenhei fonts-thai-tlwg fonts-kacst fonts-freefont-ttf libxss1 \
--no-install-recommends \
&& rm -rf /var/lib/apt/lists/*
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD true
ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/google-chrome-stable

RUN apt-get update && apt-get install gnupg wget -y && \
wget --quiet --output-document=- https://dl-ssl.google.com/linux/linux_signing_key.pub | gpg --dearmor > /etc/apt/trusted.gpg.d/google-archive.gpg && \
sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' && \
apt-get update && \
apt-get install google-chrome-stable -y --no-install-recommends && \
rm -rf /var/lib/apt/lists/*

COPY ./test/screenshots/package.json ./package.json
COPY ./test/screenshots/package-lock.json ./package-lock.json
Expand Down
10 changes: 9 additions & 1 deletion test/screenshots/bootstrap.screenshot.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,14 @@ if (typeof before !== 'undefined') {
this.timeout(10000);
browser = await puppeteer.launch({
headless: args.debug ? false : 'new',
args: ['--disable-web-security', '--no-sandbox']
executablePath: '/usr/bin/google-chrome-stable',
args: [
'--disable-dev-shm-usage',
'--disable-gpu',
'--disable-web-security',
'--no-sandbox',
'--disable-setuid-sandbo'
]
});

global.page = await browser.newPage();
Expand All @@ -94,6 +101,7 @@ if (typeof before !== 'undefined') {
});

beforeEach(async function () {
this.timeout(10000);
await global.page.reload({ waitUntil: 'networkidle2' });
await page.evaluate(() => {
window.editor?.destruct();
Expand Down
Loading

0 comments on commit 0f30561

Please sign in to comment.