MO-Movia / licit

LICIT is a feature rich editor based on ProseMirror and an initial foundation of CZI code that was shared with the community. It is React at the core, but there are examples of integrating this with Angular. There is a link in the Readme file to an Angular test app that embeds the editor component.
MIT License
35 stars 10 forks source link

Removing the StyleRuntime and integrating the style functionalities t… #314

Closed rohanrjohn closed 2 months ago

rohanrjohn commented 4 months ago

…o LicitRuntime

rohanrjohn commented 4 months ago

This shouldn't be necessary. They style runtime is already part of the style plugin, and all references to the style runtime should refer to that one. Just delete the old runtime here.

The style runtime is only being used for style plugin. In export pdf, we are accessing the style to list out the toc items and also there are many cases in various plugins where the styles are needed. if the base runtime of licit has the functions to get the styles, it can be accessed easily. There is no need for a separate runtime for styles and the base runtime can be passed for styles.

Tezra commented 4 months ago

This shouldn't be necessary. They style runtime is already part of the style plugin, and all references to the style runtime should refer to that one. Just delete the old runtime here.

The style runtime is only being used for style plugin. In export pdf, we are accessing the style to list out the toc items and also there are many cases in various plugins where the styles are needed. if the base runtime of licit has the functions to get the styles, it can be accessed easily. There is no need for a separate runtime for styles and the base runtime can be passed for styles.

Any reference to style should get that information from the style plugin. That is the only way to ensure that they are actually compatible with the installed style plugin. There needs to be a single source of a truth.

rohanrjohn commented 4 months ago

This shouldn't be necessary. They style runtime is already part of the style plugin, and all references to the style runtime should refer to that one. Just delete the old runtime here.

The style runtime is only being used for style plugin. In export pdf, we are accessing the style to list out the toc items and also there are many cases in various plugins where the styles are needed. if the base runtime of licit has the functions to get the styles, it can be accessed easily. There is no need for a separate runtime for styles and the base runtime can be passed for styles.

Any reference to style should get that information from the style plugin. That is the only way to ensure that they are actually compatible with the installed style plugin. There needs to be a single source of a truth.

In that case I feel we may need to add custom-styles as a dependency for export-pdf which will make it complex. Also removing the styleruntime from licit will only effect locally for testing and won't effect the Knite side.

Tezra commented 2 months ago

Part of https://github.com/MO-Movia/licit/pull/260/files