View and Edit Source Code

Editor not support 'check source code' and 'edit source code', but you can implement by yourself. We can check and edit content html source code by follow steps:

  • Create a <button>, get the content html by editor.txt.html when click.
  • To implement 'checkout source code', then create a <div>, putting the content html in and hide editor temporary. If you want to format content html, you can use highlight.js plugin.
  • To implement 'edit source code', then create a <div>, putting the content html in and hide editor temporary. If you want to edit content code, you can use monaco editor or codemirror.

Note edit source html code may cause XSS.

Copyright © wangEditor (2020 - present) all right reserved,powered by GitbookFile Modify: 2021-07-04 12:51:04

results matching ""

    No results matching ""