Skip to content

MarkdownRenderer.render cause render fail #428

@LincZero

Description

@LincZero

Please fill out these Check-boxes

  • I checked for existing similar feature requests
  • I have read the docs and checked that the feature I am requesting is not already implemented
  • My feature request consists of only one feature

Is your Feature Request related to a Problem or Annoyance?

No response

Describe the Feature you'd like

The effect I want

(Used with other plugins (anyblock plugin, I am the author of this plugin))

image

Actual result

The collaboration with buttons plugin was successful (See picture above),
but there were some problems with metabind (see image below):

  • Some btn live/read modes failed to render
  • Some btn failed in real time while reading mode succeeded

Analysis of causes

image

Anyblock Plugin use the MarkdownRenderer.render, it can renders a piece of markdown text and return element.
(Note: The result of re-rendering is the result of reading mode. so in reading mode, it might be better to work with plugins)

But there may be some differences between the ctx of 'MarkdownRenderer.render' and the ctx in reading mode, which may be the reason why it doesn't work: (See the bottom of the picture)

  • plugins may decide that something is not working in live mode (despite rendering something in read mode in live mode)
  • ctx differences, such as containerEl is no longer div.cm-scroller, but the parent element that triggers MardownRenderer.render

Alternatives

No response

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions