1.0.1 • Published 4 years ago
editor-input v1.0.1
Integration React & Angular
Vscode autocompletion
add .vscode/settings.json file
{
"html.customData": ["@node_modules/editor-input/html.customData.json"]
}
React
main file
import { defineCustomElements, JSX as LocalJSX, applyPolyfills } from 'editor-input/loader';
import { HTMLAttributes } from 'react';
type StencilToReact = {
[P in keyof LocalJSX.IntrinsicElements]?: LocalJSX.IntrinsicElements[P] & Omit<HTMLAttributes<Element>, 'className'> & { class?: string };
};
declare global {
export namespace JSX {
interface IntrinsicElements extends StencilToReact {}
}
}
applyPolyfills().then(() => defineCustomElements(window));
Anguler
https://stenciljs.com/docs/angular
main.ts
import { defineCustomElements, applyPolyfills } from 'editor-input/loader';
applyPolyfills().then(() => {
defineCustomElements();
});
using
<editor-input></<editor-input>>