wangEditor icon indicating copy to clipboard operation
wangEditor copied to clipboard

代码语言能支持yaml吗?

Open 13675870972 opened this issue 1 year ago • 5 comments

      editorConfig.MENU_CONF['codeSelectLang'] = {
        // 代码语言
        codeLangs: [
          { text: 'html', value: 'html' },
          { text: 'java', value: 'java' },
          { text: 'bash', value: 'bash' },
          { text: 'python', value: 'python' },
          { text: 'sql', value: 'sql' },
          { text: 'css', value: 'css' },
          { text: 'xml', value: 'xml' },
          { text: 'javascript', value: 'javascript' },
          { text: 'jsx', value: 'jsx' },
          { text: 'php', value: 'php' },
          { text: 'c', value: 'c' },
          { text: 'c++', value: 'c++' },
          { text: 'c#', value: 'c#' },
          { text: 'go', value: 'go' },
          { text: 'ruby', value: 'ruby' },
          { text: 'swift', value: 'swift' },
          { text: 'markdown', value: 'markdown' },
          { text: 'yaml', value: 'yaml' },
        ]
      }

目前yaml好像还是黑白的,没有高亮。

13675870972 avatar Aug 04 '23 03:08 13675870972

#https://github.com/wangeditor-team/wangEditor/issues/5721

fyac avatar Jan 09 '24 07:01 fyac

      editorConfig.MENU_CONF['codeSelectLang'] = {
        // 代码语言
        codeLangs: [
          { text: 'html', value: 'html' },
          { text: 'java', value: 'java' },
          { text: 'bash', value: 'bash' },
          { text: 'python', value: 'python' },
          { text: 'sql', value: 'sql' },
          { text: 'css', value: 'css' },
          { text: 'xml', value: 'xml' },
          { text: 'javascript', value: 'javascript' },
          { text: 'jsx', value: 'jsx' },
          { text: 'php', value: 'php' },
          { text: 'c', value: 'c' },
          { text: 'c++', value: 'c++' },
          { text: 'c#', value: 'c#' },
          { text: 'go', value: 'go' },
          { text: 'ruby', value: 'ruby' },
          { text: 'swift', value: 'swift' },
          { text: 'markdown', value: 'markdown' },
          { text: 'yaml', value: 'yaml' },
        ]
      }

目前yaml好像还是黑白的,没有高亮。

怎么使用在

标签中使用

wangShiBoGT avatar Jul 12 '24 07:07 wangShiBoGT

@wangShiBoGT 标签?是引用吗

cycleccc avatar Jul 12 '24 07:07 cycleccc

@wangShiBoGT标签?是引用吗

在pre标签中当成JSON数据那种展示

wangShiBoGT avatar Jul 15 '24 07:07 wangShiBoGT

@wangShiBoGT标签?是引用吗

在pre标签中当成JSON数据那种展示

wangEditor 代码高亮就是用的 pre 标签包裹的呀 image

cycleccc avatar Jul 15 '24 09:07 cycleccc