Skip to content

Highlight text after selection? #19

@seedee007

Description

@seedee007

Sorry for the basic question. When the text is selected and a menu option is selected, should the text be highlighted in the colour of the highlightColour prop? If so, I cannot get it to work. This is my code. Is anyone able to shed some light on this?

const child = (
    <Text>Lorem Ipsum</Text>
);

return (
  <SelectableText
      menuItems={["Add", "Edit", "Delete"]}
      // Use the child we defined above
      textComponentProps={
          { children: child }
      }
      value="Lorem"
      TextComponent={Text}
      highlights={0, 6}
      highlightColor='#FFCC99'
      onSelection={({ eventType, content, selectionStart, selectionEnd }) => {console.log)}}
)
  />

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions