You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm a beginner in web development and make my first steps.
My problem is, that i can't get the demo code running using the following setup:
Visual Studio Code with Live Server installed (tried with different browsers)
npm install @textcomplete/core and @textcomplete/textarea
My own single HTML file with utilizing textarea
I cant use "require" or "import" in this environment. I can only use the <Script src .." tag to import the module.
The Problem is that "TextareaEditor" isn't properly referenced (Test.html:53 Uncaught ReferenceError: TextareaEditor is not defined at Test.html:53:23)
Please can anybody make a single HTML File which works? Or throw me a few keywords, that i can grasp what the solution is?
<html>
<head>Test TextComplete</head>
<body>
<textarea name="TE1_Name" id="TE1_ID" cols="100" rows="10">
</textarea>
</body>
<script type="text/typescript" src="../node_modules/@textcomplete/core/src/Textcomplete.ts"></script>
<script type="text/typescript" src="../node_modules/@textcomplete/textarea/src/TextareaEditor.ts"></script>
<script>
var textareaElement = document.getElementById('TE1_ID');
var editor = new TextareaEditor(textareaElement);
var textcomplete = new Textcomplete(editor, {
dropdown: {
maxCount: Infinity
}
})
textcomplete.register([{
// Emoji strategy
match: /(^|\s):(\w+)$/, // https://regex101.com/r/Z0Vbfe/1
search: function (term, callback) {
callback(emojies.filter(emoji => { return emoji.startsWith(term); }));
},
replace: function (value) {
return '$1:' + value + ': ';
}
}]);
</script>
</html>
The text was updated successfully, but these errors were encountered:
That's not an issue - it's a help request.
I'm a beginner in web development and make my first steps.
My problem is, that i can't get the demo code running using the following setup:
I cant use "require" or "import" in this environment. I can only use the <Script src .." tag to import the module.
The Problem is that "TextareaEditor" isn't properly referenced (Test.html:53 Uncaught ReferenceError: TextareaEditor is not defined at Test.html:53:23)
Please can anybody make a single HTML File which works? Or throw me a few keywords, that i can grasp what the solution is?
The text was updated successfully, but these errors were encountered: