diff --git a/projects/demo/src/app/pages/anchors/examples/1/index.ts b/projects/demo/src/app/pages/anchors/examples/1/index.ts index 869dbcbf5..1636219bf 100644 --- a/projects/demo/src/app/pages/anchors/examples/1/index.ts +++ b/projects/demo/src/app/pages/anchors/examples/1/index.ts @@ -41,6 +41,6 @@ export class TuiEditorAnchorsExample1 { ]; control = new FormControl( - '

War and Peace (Russian: Война и мир, romanizedVoyna i mir; pre-reform Russian: Война и миръ; [vɐjˈna i ˈmʲir]) is a literary work by the Russian author Leo Tolstoy that mixes fictional narrative with chapters on history and philosophy. It was first published serially, then published in its entirety in 1869. It is regarded as Tolstoy\'s finest literary achievement and remains an internationally praised classic of world literature.[1][2][3]

The novel chronicles the French invasion of Russia and the impact of the Napoleonic era on Tsarist society through the stories of five Russian aristocratic families. Portions of an earlier version, titled The Year 1805,[4] were serialized in The Russian Messenger from 1865 to 1867 before the novel was published in its entirety in 1869.[5]

Tolstoy said that the best Russian literature does not conform to standards and hence hesitated to classify War and Peace, saying it is "not a novel, even less is it a poem, and still less a historical chronicle". Large sections, especially the later chapters, are philosophical discussions rather than narrative.[6] He regarded Anna Karenina as his first true novel.

References:

  1. Moser, Charles. 1992. Encyclopedia of Russian Literature. Cambridge University Press, pp. 298–300.

  2. Thirlwell, Adam "A masterpiece in miniature". The Guardian (London, UK) October 8, 2005

  3. Briggs, Anthony. 2005. "Introduction" to War and Peace. Penguin Classics.

  4. Pevear, Richard (2008). "Introduction". War and Peace. Trans. Pevear; Volokhonsky, Larissa. New York: Vintage Books. pp. VIII–IX. ISBN 978-1-4000-7998-8.

  5. Knowles, A. V. Leo Tolstoy, Routledge 1997.

  6. "Introduction?". War and Peace. Wordsworth Editions. 1993. ISBN 978-1-85326-062-9. Retrieved 2009-03-24.

', + '

War and Peace (Russian: Война и мир, romanizedVoyna i mir; pre-reform Russian: Война и миръ; [vɐjˈna i ˈmʲir]) is a literary work by the Russian author Leo Tolstoy that mixes fictional narrative with chapters on history and philosophy. It was first published serially, then published in its entirety in 1869. It is regarded as Tolstoy\'s finest literary achievement and remains an internationally praised classic of world literature.[1][2][3]

The novel chronicles the French invasion of Russia and the impact of the Napoleonic era on Tsarist society through the stories of five Russian aristocratic families. Portions of an earlier version, titled The Year 1805,[4] were serialized in The Russian Messenger from 1865 to 1867 before the novel was published in its entirety in 1869.[5]

Tolstoy said that the best Russian literature does not conform to standards and hence hesitated to classify War and Peace, saying it is "not a novel, even less is it a poem, and still less a historical chronicle". Large sections, especially the later chapters, are philosophical discussions rather than narrative.[6] He regarded Anna Karenina as his first true novel.

References:

  1. Moser, Charles. 1992. Encyclopedia of Russian Literature. Cambridge University Press, pp. 298–300.

  2. Thirlwell, Adam "A masterpiece in miniature". The Guardian (London, UK) October 8, 2005

  3. Briggs, Anthony. 2005. "Introduction" to War and Peace. Penguin Classics.

  4. Pevear, Richard (2008). "Introduction". War and Peace. Trans. Pevear; Volokhonsky, Larissa. New York: Vintage Books. pp. VIII–IX. ISBN 978-1-4000-7998-8.

  5. Knowles, A. V. Leo Tolstoy, Routledge 1997.

  6. "Introduction?". War and Peace. Wordsworth Editions. 1993. ISBN 978-1-85326-062-9. Retrieved 2009-03-24.

', ); } diff --git a/projects/demo/src/app/pages/focus/examples/1/index.ts b/projects/demo/src/app/pages/focus/examples/1/index.ts index 2942c3751..b04d3d2c1 100644 --- a/projects/demo/src/app/pages/focus/examples/1/index.ts +++ b/projects/demo/src/app/pages/focus/examples/1/index.ts @@ -106,6 +106,6 @@ export class TuiEditorFocusExample1 { control = new FormControl( // eslint-disable-next-line @typescript-eslint/quotes - `

WYSIWYG (What you see is what you get) — Rich Text Editor for using with Angular forms.

Heading

Lorem ipsum dolor sit amet consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim

ad minim veniam, quis nostrud exercitation ullamco, laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.

Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

class EditorExample {}

Free

Pro

24/7 support

+

+

Code in text

`, + `

WYSIWYG (What you see is what you get) — Rich Text Editor for using with Angular forms.

Heading

Lorem ipsum dolor sit amet consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim

ad minim veniam, quis nostrud exercitation ullamco, laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.

Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

class EditorExample {}

Free

Pro

24/7 support

+

+

Code in text

`, ); } diff --git a/projects/demo/src/app/pages/images/preview/examples/1/index.ts b/projects/demo/src/app/pages/images/preview/examples/1/index.ts index 21e46dd7d..465605b20 100644 --- a/projects/demo/src/app/pages/images/preview/examples/1/index.ts +++ b/projects/demo/src/app/pages/images/preview/examples/1/index.ts @@ -39,7 +39,7 @@ export class TuiEditorPreviewImagesExample1 { constructor(@Inject(TUI_IS_STACKBLITZ) private readonly isStackblitz: boolean) { this.control.patchValue( - `

Small image

Big image

`, + `

Small image

Big image

`, ); } } diff --git a/projects/demo/src/app/pages/images/resizable/examples/1/index.html b/projects/demo/src/app/pages/images/resizable/examples/1/index.html index c43f4d9ee..a3a09b9f7 100644 --- a/projects/demo/src/app/pages/images/resizable/examples/1/index.html +++ b/projects/demo/src/app/pages/images/resizable/examples/1/index.html @@ -6,3 +6,6 @@

HTML:

+ +

Text:

+

{{ control.value }}

diff --git a/projects/demo/src/app/pages/images/resizable/examples/1/index.ts b/projects/demo/src/app/pages/images/resizable/examples/1/index.ts index 41047c329..dac0de872 100644 --- a/projects/demo/src/app/pages/images/resizable/examples/1/index.ts +++ b/projects/demo/src/app/pages/images/resizable/examples/1/index.ts @@ -59,7 +59,7 @@ export class TuiEditorResizableEditorExample1 { this.base64Image$.pipe(takeUntil(destroy$)).subscribe(src => { this.control.patchValue( ` - +

Try to drag right border of image!

To change min/max size of image use token TUI_IMAGE_EDITOR_OPTIONS. `, diff --git a/projects/demo/src/app/pages/images/upload/examples/1/index.ts b/projects/demo/src/app/pages/images/upload/examples/1/index.ts index 495ae9861..3a0f95964 100644 --- a/projects/demo/src/app/pages/images/upload/examples/1/index.ts +++ b/projects/demo/src/app/pages/images/upload/examples/1/index.ts @@ -75,7 +75,7 @@ export class TuiEditorUploadingImagesExample1 { ) { this.control.patchValue( ` - +

Try to drag right border of image!

To change min/max size of image use token TUI_IMAGE_EDITOR_OPTIONS.

`, diff --git a/projects/tui-editor/extensions/iframe-editor/iframe-editor.extension.ts b/projects/tui-editor/extensions/iframe-editor/iframe-editor.extension.ts index a23506e81..80b257cb9 100644 --- a/projects/tui-editor/extensions/iframe-editor/iframe-editor.extension.ts +++ b/projects/tui-editor/extensions/iframe-editor/iframe-editor.extension.ts @@ -71,7 +71,11 @@ export const createIframeEditorExtension = (injector: Injector): Node => addNodeView(): NodeViewRenderer { return (props: NodeViewRendererProps) => - new TuiNodeView(TuiIframeEditorComponent, props, {injector, ...props}); + Reflect.construct(TuiNodeView, [ + TuiIframeEditorComponent, + props, + {injector, ...props}, + ]); }, addCommands(): Partial { diff --git a/projects/tui-editor/extensions/image-editor/image-editor.extension.ts b/projects/tui-editor/extensions/image-editor/image-editor.extension.ts index 1e80486af..86c64bbb2 100644 --- a/projects/tui-editor/extensions/image-editor/image-editor.extension.ts +++ b/projects/tui-editor/extensions/image-editor/image-editor.extension.ts @@ -27,7 +27,7 @@ declare module '@tiptap/core' { } } -const IMAGE_EDITOR_PARSE_META = [{tag: `img[data-type="image-editor"]`}]; +const IMAGE_EDITOR_PARSE_META = [{tag: `img`}]; const DEFAULT_IMAGE_ATTRS = { src: { @@ -127,15 +127,19 @@ export function createImageEditorExtension( }, renderHTML({HTMLAttributes}: Record): DOMOutputSpec { - return [ - `img`, - mergeAttributes(HTMLAttributes, {'data-type': `image-editor`}), - ]; + return [`img`, mergeAttributes(HTMLAttributes)]; }, addNodeView(): NodeViewRenderer { return (props: NodeViewRendererProps) => - new TuiNodeView(TuiImageEditorComponent, props, {injector, ...props}); + Reflect.construct(TuiNodeView, [ + TuiImageEditorComponent, + props, + { + injector, + ...props, + }, + ]); }, addCommands(): Partial { diff --git a/projects/tui-editor/extensions/tiptap-node-view/node-view-render.ts b/projects/tui-editor/extensions/tiptap-node-view/node-view-render.ts index 2520a031b..da100016d 100644 --- a/projects/tui-editor/extensions/tiptap-node-view/node-view-render.ts +++ b/projects/tui-editor/extensions/tiptap-node-view/node-view-render.ts @@ -5,7 +5,6 @@ import { Editor, NodeView, NodeViewProps, - NodeViewRenderer, NodeViewRendererOptions, NodeViewRendererProps, } from '@tiptap/core'; @@ -176,14 +175,3 @@ export class TuiNodeView extends NodeView< } } } - -/** - * @deprecated - */ -// eslint-disable-next-line @typescript-eslint/naming-convention -export function TuiNodeViewRenderer( - component: Type, - options: Partial, -): NodeViewRenderer { - return (props: NodeViewRendererProps) => new TuiNodeView(component, props, options); -}