reactjsace-editorreact-ace

With react-ace I would like add mode php which is currently not supported


For https://github.com/securingsincity/react-ace

I know the documentation does not support mode php - but I would like to use that.

Is there a way to include that steps to add it? https://ace.c9.io seems to support it - is there an easy way to add additional modes / themes?


Solution

  • Hi brace package has support for php mode too...

    List of supported mode for brace(ace-editor) reference

    import React from 'react'
    import AceEditor from 'react-ace'
    
    import 'brace/mode/php'
    import 'brace/snippets/php';
    import 'brace/theme/tomorrow'
    
    const MyEditor = () => {
     return (
       <AceEditor
         name="my-editor"
         mode="php"
         theme="tomorrow"
         value=""
         width="100%"
         height="500px" />
     )
    }
    
    export default MyEditor