sibiraj-s / ngx-editor

🖋️ Rich Text Editor for angular using ProseMirror
https://sibiraj-s.github.io/ngx-editor/
MIT License
423 stars 182 forks source link

[Feature request]: Make ImageViewComponent exported from ngx-editor package #471

Closed buchatsky closed 10 months ago

buchatsky commented 1 year ago

Proposal

I have images stored in DB and accessed via some web service. The access to the service is controlled by OAuth access_token, which should be attached as a query parameter to an image URL. So, the URL is volatile and should not be stored in the document itself but is to be generated on the fly. Instead, data-image-id attribute is stored in the document and is used to generate URL like "/api/images(imageId)?access_token=access_token_value". Currently ImageViewComponent class is declared as "export" but trying to use it like import { ImageViewComponent } from 'ngx-editor/lib/components/image-view/image-view.component'; brings an error `Error: Module not found: Error: Package path ./lib/components/image-view/image-view.component is not exported from package

\ClientApp\node_modules\ngx-editor (see exports field in \ClientApp\node_modules\ngx-editor\package.json)` The code peculiar to such task is located in image-resize.ts, so ImageViewComponent could be used without any changes if it were exported from NgxEditorModule ### Willing to submit a PR? None
sibiraj-s commented 10 months ago

Fixed in https://github.com/sibiraj-s/ngx-editor/commit/217cfe3fdf9e89740e58b7b3c1372c3ced2626cb will be published soon.

github-actions[bot] commented 9 months ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in the thread.