feature: Able to match newline in onTextInput handler
See original GitHub issueWhen implementing heading (H1, H2, H3) in WYSIWYG markdown editor, it would requires detecting if newline
is entered. So I can do something like this:
editor.onTextInput({
// "# " -> h1, "## " -> h2, "### " -> h3
match: /^(#{1,3})(.*)\n/,
run() {
// magic happens here
}
});
Is this possible in current structure?
Issue Analytics
- State:
- Created 7 years ago
- Comments:9 (4 by maintainers)
Top Results From Across the Web
Regular Expression to match every new line character (\n ...
Do you want to be able to access all the matched newline characters? If so, your best bet is to grab all content...
Read more >Regular Expression in Python with Examples | Set 1
Matches any character except newline. |, Means OR (Matches with any of the characters separated by it. ? Matches zero or one occurrence....
Read more >Queries | React Native Testing Library - Open Source
Returns a ReactTestInstance for a TextInput with a matching placeholder – may be a string or regular expression. import { render, screen }...
Read more >TextInput - React Native
A foundational component for inputting text into the app via a keyboard. Props provide configurability for several features, ...
Read more >TextInput QML Type | Qt Quick 6.4.1
The TextInput type displays a single line of editable plain text. ... If the family isn't available a family will be set using...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@bantic That sounds perfect to me! I’ll work on this - Add
willHandleNewline
hook prior tohandleNewLine
and will stop handling new line ifwillHandleNewline
returns explicitfalse
(It works as default ifwillHandleNewline
didn’t return or it returns true).I believe this is closed by #489. thanks @eguitarz ! Feel free to reopen if necessary.