ousc / ng-milkdown

Milkdown(WYSIWYG markdown Editor ) for Angular out-of-box.
MIT License
12 stars 2 forks source link

Remove tailwindcss import in `ng-milkdown` componet #1

Closed hibjs closed 5 months ago

hibjs commented 5 months ago

Thanks for your work.

In ng-milkdown component

  template: `
      <div #editorRef [hidden]="loading" class="milkdown-editor" [class]="classList"></div>
      @if (loading) {
          <ng-container *stringTemplateOutlet="spinner">loading...</ng-container>
      }
  `,
  styles: [
    `
      @import "tailwindcss/base";
      @import "tailwindcss/components";
      @import "tailwindcss/utilities";

      :host {
        display: contents;
      }
    `
  ]

image

We should import tainlwindcss in app if needed, rather than import in base component, and it can occur 404 error for loading css.

Thanks again for your contribution!

ousc commented 5 months ago

Thanks for your work.

In ng-milkdown component

  template: `
      <div #editorRef [hidden]="loading" class="milkdown-editor" [class]="classList"></div>
      @if (loading) {
          <ng-container *stringTemplateOutlet="spinner">loading...</ng-container>
      }
  `,
  styles: [
    `
      @import "tailwindcss/base";
      @import "tailwindcss/components";
      @import "tailwindcss/utilities";

      :host {
        display: contents;
      }
    `
  ]

image

We should import tainlwindcss in app if needed, rather than import in base component, and it can occur 404 error for loading css.

Thanks again for your contribution!

You are right, and I will create a PR to fix it ASAP.