Files
Lehrlingsparcours/LPWeb24 - Kopie/LPWeb20/RichtextEditor/dialogs/insertlink_dropdown.xml
2019-12-21 10:58:30 +01:00

49 lines
1.2 KiB
XML

<?xml version="1.0" encoding="utf-8" ?>
<jsml xmlns="http://cutesoft.net/jsml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://cutesoft.net/jsml ../core/jsml.xsd">
<panel jsml-class="insertlinkdropdown_dialog" dock="fill" overflow="visible">
<groupbox text="@internallink" dock="top" overflow="visible" margin="3">
<panel width="280" height="210" overflow="scroll">
<htmlcontrol jsml-local="container" dock="fill" margin="2" padding="4" overflow="visible">
</htmlcontrol>
</panel>
</groupbox>
<initialize>
<![CDATA[
editor.LoadLinks(function(group)
{
self.loadgroupcontent(group,container._content);
});
]]>
</initialize>
<jsml-ref name="linktree"/>
<attach name="clicklink" arguments="je,link">
<![CDATA[
var tag=new $rte.LinkElement("a");
tag.SetAttribute("href",link.href);
if(editor.GetSelectionType()=="Point")
{
tag.SetInnerText(link.href);
editor.InsertNode(tag);
editor.SelectContent(tag);
}
else
{
if(editor.SurroundNode(tag))
{
editor.RemoveInnerLink(tag);
editor.SelectContent(tag);
}
}
dialog.close();
]]>
</attach>
</panel>
<panel jsml-base="insertlinkdropdown_dialog" />
</jsml>