Skip to content

是否支持json content直接转换成html #4770

Closed
@yolocgt

Description

@yolocgt

问题描述

请问大大是否提供了content转换成html的方法。 目前项目中需要将content转为html后进行截图,但需要经过创建editor设置 JSON后才能获取到解析后的html,想有没有提供方法能够直接content转html,而不经过editor这层的渲染呢

wangEditor 版本

5.0.1

是否查阅了文档 ?

(文档链接 www.wangeditor.com

Activity

wangfupeng1988

wangfupeng1988 commented on Aug 26, 2022

@wangfupeng1988
Collaborator

那你直接使用 HTML 即可,不用管 content

使用 editor.getHtml() 获取 HTML 内容,使用 editor.setHtml(html) 设置 HTML

youfeed

youfeed commented on Jun 26, 2023

@youfeed

老大 有些方面支持吗?我也是弄的json,为了方便以后扩展给小程序渲染,json友好一些

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @wangfupeng1988@youfeed@yolocgt

        Issue actions

          是否支持json content直接转换成html · Issue #4770 · wangeditor-team/wangEditor