Přidání xml editoru
This commit is contained in:
@@ -346,12 +346,9 @@ form input {
|
||||
gap: 1em;
|
||||
}
|
||||
|
||||
#textInput textarea {
|
||||
#textInput #textArea {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
resize: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
#textInput input {
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
<script src="./js/view.js"></script>
|
||||
<script src="./js/video.js"></script>
|
||||
<script src="./js/comments.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/ace/1.2.9/ace.js"></script>
|
||||
|
||||
|
||||
</head>
|
||||
@@ -56,7 +57,7 @@
|
||||
<div class="hidden" id="textInput">
|
||||
<div>XML soubor je pro zatím nutné vytvořit v tomto editoru. GUI editor není ještě vytvořen, ale je v plánu.
|
||||
</div>
|
||||
<textarea name="xml" id="textArea" form="form"></textarea>
|
||||
<div id="textArea"></div>
|
||||
<input type="submit" value="Přidat video" form="form">
|
||||
</div>
|
||||
|
||||
|
||||
@@ -24,7 +24,12 @@ class View {
|
||||
Connect.setRequestHeader("Content-Type", "text/xml");
|
||||
Connect.send(null);
|
||||
// Place the response in an XML document.
|
||||
textArea.value = Connect.responseText;
|
||||
var exampleText = document.createTextNode(Connect.responseText);
|
||||
textArea.append(exampleText);
|
||||
|
||||
this.editor = ace.edit("textArea");
|
||||
this.editor.setTheme("ace/theme/github");
|
||||
this.editor.getSession().setMode("ace/mode/xml");
|
||||
}
|
||||
|
||||
drawCommentTitles(comments) {
|
||||
|
||||
@@ -14,4 +14,5 @@
|
||||
</text>
|
||||
</comment>
|
||||
-->
|
||||
|
||||
</video>
|
||||
Reference in New Issue
Block a user