smartEntry
ai-research-agent / editor/modules/smartEntry
Functions
lineReplace()
function lineReplace(
editor,
index,
prefix): boolean
Allow text representations to format a line
Parameters
Parameter | Type |
---|---|
| |
|
|
|
|
Returns
boolean
linkReplace()
function linkReplace(
editor,
index,
prefix): boolean
Parameters
Parameter | Type |
---|---|
| |
|
|
|
|
Returns
boolean
markReplace()
function markReplace(
editor,
index,
prefix,
wholeText): boolean
Parameters
Parameter | Type |
---|---|
| |
|
|
|
|
|
|
Returns
boolean
smartEntry()
function smartEntry(handlers): (editor) => object
Parameters
Parameter | Type | Default value |
---|---|---|
|
|
|
Returns
Function
Parameters
Parameter | Type |
---|---|
|
Returns
object
Name | Type |
---|---|
destroy() |
textReplace()
function textReplace(
editor,
index,
prefix): boolean
Parameters
Parameter | Type |
---|---|
| |
|
|
|
|
Returns
boolean
Type Aliases
Handler()
type Handler: (editor?, index?, prefix?, wholeText?) => void;
Parameters
Parameter | Type |
---|---|
| |
|
|
|
|
|
|
Returns
void
Replacement
type Replacement: [RegExp, (captured, attr) => default];
TextReplacement
type TextReplacement: [RegExp, (captured) => string];
Variables
defaultHandlers
const defaultHandlers: (editor, index, prefix) => boolean[];
Allow text representations to format a line
Parameters
Parameter | Type |
---|---|
| |
|
|
|
|
Returns
boolean
lineReplacements
const lineReplacements: Replacement[];
A list of [ RegExp, Function ] tuples to convert text into a formatted line with the attributes returned by the function. The function's argument will be the captured text from the regular expression.
linkReplacements
const linkReplacements: Replacement[];
markReplacements
const markReplacements: Replacement[];
A list of [ RegExp, Function ] tuples to convert text into formatted text with the attributes returned by the function. The function's argument will be the captured text from the regular expression.
textReplacements
const textReplacements: TextReplacement[];
A list of [ RegExp, Function ] tuples to convert text into another string of text which is returned by the function. The function's argument will be the captured text from the regular expression.