I am currently implementing a wysiwyg feature in my Angular2 project. When I include the code in the index.html page (the root page), it functions correctly.
However, when I try to use it in a child view HTML file, the CSS and JavaScript do not load properly, resulting in the wysiwyg editor not displaying as expected.
<!doctype>
<html>
<head>
<base href="/">
<title>Arkloud Adservio</title>
<meta name="viewport" content="width=device-width, height=device-height, initial-scale=1.0, maximum-scale=1.0"/>
<!-- Load libraries -->
<!-- IE required polyfills, in this exact order -->
...
In the scenario where I place the wysiwyg editor in my index.html
, everything works perfectly.
However, if I attempt to move this functionality into another view component, it fails to function properly.
<div id="editor">
<form>
<textarea id='edit' style="margin-top: 30px;" placeholder="Type some text">
<h1>Textarea</h1>
<p>The editor can also be initialized on a textarea.</p>
</textarea>
<input type="submit">
</form>
</div>