mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-01 19:09:27 +00:00
Formatierungen für Überschriften zu WYSIWYG Editor hinzugefügt
This commit is contained in:
@@ -603,6 +603,19 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
<xul:toolbarbutton tooltiptext="Linksbündig" image="../skin/images/justifyleft.png" oncommand="document.getBindingParent(this).setJustifyLeft()"/>
|
||||
<xul:toolbarbutton tooltiptext="Zentriert" image="../skin/images/justifycenter.png" oncommand="document.getBindingParent(this).setJustifyCenter()"/>
|
||||
<xul:toolbarbutton tooltiptext="Rechtsbündig" image="../skin/images/justifyright.png" oncommand="document.getBindingParent(this).setJustifyRight()"/>
|
||||
<xul:toolbarseparator />
|
||||
<xul:toolbarbutton label="Format" type="menu">
|
||||
<xul:menupopup>
|
||||
<xul:menuitem label="Normal" oncommand="document.getBindingParent(this).setFormatblock('<p>')"/>
|
||||
<xul:menuitem label="Heading 1" oncommand="document.getBindingParent(this).setFormatblock('<h1>')"/>
|
||||
<xul:menuitem label="Heading 2" oncommand="document.getBindingParent(this).setFormatblock('<h2>')"/>
|
||||
<xul:menuitem label="Heading 3" oncommand="document.getBindingParent(this).setFormatblock('<h3>')"/>
|
||||
<xul:menuitem label="Heading 4" oncommand="document.getBindingParent(this).setFormatblock('<h4>')"/>
|
||||
<xul:menuitem label="Heading 5" oncommand="document.getBindingParent(this).setFormatblock('<h5>')"/>
|
||||
<xul:menuitem label="Heading 6" oncommand="document.getBindingParent(this).setFormatblock('<h6>')"/>
|
||||
<xul:menuitem label="Formatted" oncommand="document.getBindingParent(this).setFormatblock('<pre>')"/>
|
||||
</xul:menupopup>
|
||||
</xul:toolbarbutton>
|
||||
</xul:toolbar>
|
||||
<html:iframe anonid="wysiwyg-editor" editortype="html" src="about:blank" flex="1" type="content-primary" style="min-width: 100px; min-height: 100px; border: 1px solid gray;"/>
|
||||
</xul:vbox>
|
||||
@@ -688,6 +701,16 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
]]>
|
||||
</body>
|
||||
</method>
|
||||
<method name="setFormatblock">
|
||||
<parameter name="type" />
|
||||
<body>
|
||||
<![CDATA[
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
editor = document.getAnonymousElementByAttribute(this ,'anonid', 'wysiwyg-editor');
|
||||
editor.contentDocument.execCommand("formatblock", false, type);
|
||||
]]>
|
||||
</body>
|
||||
</method>
|
||||
<method name="setUnderline">
|
||||
<body>
|
||||
<![CDATA[
|
||||
|
||||
Reference in New Issue
Block a user