Commit 2dea4999 authored by jan.koester's avatar jan.koester
Browse files

Remove temporary test harness accidentally committed by auto-commit hook

parent fea7bdb7
Loading
Loading
Loading
Loading

editor/html/_test_harness.html

deleted100644 → 0
+0 −90
Original line number Diff line number Diff line
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>HtmlCodeEditor test harness</title>
<link rel="stylesheet" href="css/editor.css">
</head>
<body style="overflow:auto;height:auto;display:block;padding:20px;">

<button id="open-btn" type="button">Open HTML editor</button>
<pre id="result" style="white-space:pre-wrap;background:#111;color:#0f0;padding:10px;margin-top:10px;"></pre>

<dialog id="html-code-editor-dialog" class="html-code-editor-dialog">
    <div class="hce-header">
        <h3>HTML-Editor</h3>
    </div>
    <div class="hce-body">
        <div class="hce-main-pane">
            <div class="prop-tabs">
                <button type="button" class="prop-tab active" id="btn-hce-tab-source">Quelltext</button>
                <button type="button" class="prop-tab" id="btn-hce-tab-preview">Vorschau</button>
            </div>
            <div class="hce-tab-panels">
                <div class="hce-tab-panel" id="hce-panel-source">
                    <textarea id="hce-source" spellcheck="false"></textarea>
                </div>
                <div class="hce-tab-panel" id="hce-panel-preview" style="display:none">
                    <div class="hce-font-toolbar">
                        <span class="hce-font-hint" id="hce-font-hint">Text lässt sich direkt bearbeiten. Element anklicken, um zusätzlich die Schrift zu bearbeiten.</span>
                        <div class="hce-font-controls" id="hce-font-controls" style="display:none">
                            <input type="text" id="hce-font-family" list="hce-font-family-list" placeholder="Schriftart">
                            <datalist id="hce-font-family-list">
                                <option value="Arial, sans-serif">
                                <option value="Georgia, serif">
                                <option value="'Courier New', monospace">
                            </datalist>
                            <input type="text" id="hce-font-size" placeholder="Größe">
                            <select id="hce-font-weight">
                                <option value="100">100</option>
                                <option value="200">200</option>
                                <option value="300">300</option>
                                <option value="400">400</option>
                                <option value="500">500</option>
                                <option value="600">600</option>
                                <option value="700">700</option>
                                <option value="800">800</option>
                                <option value="900">900</option>
                            </select>
                            <button type="button" id="hce-font-italic" class="rte-btn" style="font-style:italic" title="Kursiv">I</button>
                            <input type="color" id="hce-font-color" class="hce-color-input" title="Farbe">
                            <button type="button" id="hce-font-clear">Zurücksetzen</button>
                        </div>
                    </div>
                    <div class="hce-preview-frame-wrap">
                        <iframe id="hce-preview-iframe" title="Vorschau"></iframe>
                    </div>
                </div>
            </div>
        </div>
        <div class="hce-tree-pane">
            <div class="hce-tree-actions">
                <button type="button" id="btn-hce-expand-all" title="Alle aufklappen">&#x25BC;</button>
                <button type="button" id="btn-hce-collapse-all" title="Alle zuklappen">&#x25B6;</button>
            </div>
            <div id="hce-tree"></div>
        </div>
    </div>
    <div class="dialog-actions">
        <button type="button" id="btn-hce-apply" class="set-save-btn">Übernehmen</button>
        <button type="button" id="btn-hce-cancel">Abbrechen</button>
    </div>
</dialog>

<script src="js/i18n.js"></script>
<script src="js/html-code-editor.js"></script>
<script>
var SAMPLE = '<div class="hero" id="top">\n' +
    '  <h1>Hello World</h1>\n' +
    '  <p class="lead">Some text.</p>\n' +
    '</div>';
var CSS_CONTEXT = 'padding: 20px;';

document.getElementById('open-btn').addEventListener('click', function() {
    HtmlCodeEditor.open(SAMPLE, CSS_CONTEXT, function(newValue) {
        document.getElementById('result').textContent = newValue;
    });
});
</script>
</body>
</html>