diff --git a/Makefile b/Makefile index 545436920..31d202b55 100644 --- a/Makefile +++ b/Makefile @@ -27,10 +27,9 @@ BUILD_ESM := true UGLIFY_ESM := false CHANGELOG_URL := https://github.com/xdan/jodit/blob/main/CHANGELOG.md NODE_MODULES_BIN := ./node_modules/.bin -TS_NODE_BASE := $(NODE_MODULES_BIN)/ts-node --project ./tools/tsconfig.json +TS_NODE_BASE := $(NODE_MODULES_BIN)/ts-node --project $(cwd)tools/tsconfig.json WEBPACK := $(TS_NODE_BASE) $(NODE_MODULES_BIN)/webpack KARMA := @TS_NODE_TRANSPILE_ONLY=true $(TS_NODE_BASE) $(NODE_MODULES_BIN)/karma start -MOCHA := $(TS_NODE_BASE) $(NODE_MODULES_BIN)/mocha .PHONY: update update: diff --git a/src/config.ts b/src/config.ts index 52a5c7d1b..1ce9083b1 100644 --- a/src/config.ts +++ b/src/config.ts @@ -171,6 +171,28 @@ class Config implements IViewOptions { /** * Shadow root if Jodit was created in it + * + * ```html + *
+ * ``` + * + * ```js + * const app = document.getElementById('editor'); + * app.attachShadow({ mode: 'open' }); + * const root = app.shadowRoot; + * + * root.innerHTML = ` + * + *

Jodit example in Shadow DOM

+ *
+ * `; + * + * const editor = Jodit.make(root.getElementById('edit'), { + * globalFullSize: false, + * shadowRoot: root + * }); + * editor.value = '

start

'; + * ``` */ shadowRoot: Nullable = null; diff --git a/tools/dev-server/index.ts b/tools/dev-server/index.ts index d66e1a761..79d65dbc3 100644 --- a/tools/dev-server/index.ts +++ b/tools/dev-server/index.ts @@ -28,6 +28,10 @@ export const devServer = ({ port, dirname }: Variables): Configuration => ({ directory: path.join(dirname, 'test'), publicPath: '/test' }, + { + directory: path.join(dirname, 'build'), + publicPath: '/build' + }, { directory: path.join(dirname, 'src'), publicPath: '/src'