react-textarea-code-editor icon indicating copy to clipboard operation
react-textarea-code-editor copied to clipboard

Possibly shown user errors in inserted code

Open HardCoreQual opened this issue 3 years ago • 1 comments

think will be great to add the possibility send errors props with the format

type Errors = {
   startAt: number; // start position in string
   endAt: number; // end position in string
   message: string; // message by hover
}[]

startAt, endAt will use to add a red underline for the respective code the message will show by hovering over the error line, but it is harder to implement

HardCoreQual avatar Aug 13 '22 18:08 HardCoreQual

@HardCoreQual Maybe your idea can be implemented with plugins + css.

  /**
   * rehypePlugins (Array.<Plugin>, default: `[[rehypePrism, { ignoreMissing: true }]]`)  
   * List of [rehype plugins](https://github.com/rehypejs/rehype/blob/main/doc/plugins.md#list-of-plugins) to use. See the next section for examples on how to pass options
   */
  rehypePlugins?: PluggableList;

jaywcjlove avatar Aug 14 '22 04:08 jaywcjlove