Coder Social home page Coder Social logo

Comments (3)

cipchk avatar cipchk commented on June 14, 2024

麻烦提供一个在线stackblitz重现示例。

from ngx-tinymce.

apphost avatar apphost commented on June 14, 2024

在ng-alain中,app/routes/editor/tinymce/tinymce.component.html修改如下可重现问题:

<div class="content__title">
    <h1>Tinymce
        <small>Dependencies
            <a href="//github.com/cipchk/ngx-tinymce" target="_blank">ngx-tinymce</a>
        </small>
    </h1>
</div>
<nz-card nzTitle="Basic">
    <nz-card-tab [nzTabHeading]="'Editor 1'">
        <tinymce [(ngModel)]="html" [config]="config" loading="加载中……"></tinymce>
    </nz-card-tab>
    <nz-card-tab [nzTabHeading]="'Editor 2'">
        <tinymce [(ngModel)]="html" [config]="config_classic" loading="loading……"></tinymce>
    </nz-card-tab>

</nz-card>
<nz-card nzTitle="Classic">
    <tinymce [(ngModel)]="html" [config]="config_classic" loading="loading……"></tinymce>
</nz-card>

1、Editor 2中的实例显示不了。
2、在reuseTab栏中关闭该页,再重新打开,Editor 1 和 Editor 2中的实例均显示不了。

from ngx-tinymce.

cipchk avatar cipchk commented on June 14, 2024

这个问题有点复杂,其实原因不在 ngx-tinymce 而在于 nz-card 的机制引起的,tinymce 在加载过程中需要一个明确的容器,但又由于 nz-card 的 tab 标签实现原因,导致 editor2 已经实例过,但实际在实例过程中容器还无法被渲染在DOM树中,结果渲染失败。

当然 reuse 也是同理。

目前恐怕没办法使用 ngx-tinymce 解决这个问题,或许你可以在外部当 nz-card 标签变更回调时重新渲染一个 tinymce 编辑器,除此之外没有什么好的办法。

from ngx-tinymce.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.