Files
slava.home/content/markdownMarkedJS.page.php

114 lines
2.2 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?xml version="1.0" encoding="utf-8"?>
<page>
<general>
<!--Kлючевые слова-->
<keywords>
</keywords>
<!--Условия доступа-->
<access>
<read>
<users>
</users>
<groups>
</groups>
</read>
<edit>
<users>
</users>
<groups>
</groups>
</edit>
</access>
</general>
<!--Содержание страницы-->
<!--Основное меню-->
<mainmenu>
<item name="имя" url="урл" title="описание">
</item>
</mainmenu>
<!--Текст страницы-->
<content tclass="btitle" bclass="bfloat">
<ru>
<![CDATA[<div>
<h3>
Markdown
</h3>
<textarea id="md" style="width:100%; height:300px;">
# Заголовок
Тестовый абзац текста.
Здесь есть **жирный текст**, *курсив*, `моноширинный текст`.
Ссылка: [Перейти](https://example.com)
Список:
- пункт один
- пункт два
- пункт три
</textarea>
</div>
]]>
<![CDATA[<div>
<h3>
HTML
</h3>
<div id="html" style="width:100%; height:300px; border:1px solid #ccc; padding:5px; overflow:auto;">
<h1>
Заголовок
</h1>
<p>
Тестовый абзац текста.
Здесь есть
<strong>
жирный текст
</strong>
,
<em>
курсив
</em>
,
<code>
моноширинный текст
</code>
.
</p>
<p>
Ссылка:
<a href="https://example.com">
Перейти
</a>
</p>
<p>
Список:
</p>
<ul>
<li>
пункт один
</li>
<li>
пункт два
</li>
<li>
пункт три
</li>
</ul>
</div>
</div>
<script>
function updateHtml() {
document.getElementById('html').innerHTML = marked.parse(document.getElementById('md').value);
}
document.getElementById('md').addEventListener('input', updateHtml);
window.addEventListener('DOMContentLoaded', updateHtml);
</script>
]]>
</ru>
<lv><![CDATA[
<p>Uz šo brīdi šeit ne kā nav</p>
]]></lv>
<en><![CDATA[
<p>??????</p>
]]></en>
</content>
<rblock/>
<lblock/>
</page>