Version
www.capesoft.com |
|||
FeHtmlEditor |
|
Contents | |||
The FeHtmlEditor Object | |||
The Templates | |||
Useful References | |||
Formerly known as the Html2 file type / object, the FeHtmlEditor Object is used to edit html pages. |
Quick Reference |
Edit |
GetHtmlGraphicsInfo |
GetInfo |
HideControl |
Init |
InsertHtml |
InsertTable |
InsertText |
KeyPressed |
Kill |
Load |
NewDocument |
PrintMe |
Reload |
Save |
SetFocus |
Settings |
UnhideControl |
Update |
Edit ( long EditType ) ThisViewer1.Edit (fe:HtmlEditor_Copy)
|
GetHtmlGraphicsInfo
( *string HtmlSource )
TempString = ThisViewer1.Source ! needed only for the next line
|
GetInfo
( ) ThisViewer1.GetInfo ()
|
HideControl
( )
ThisViewer.HideControl ()
|
Init
( long CurrentControl )
ThisViewer1.Init (?feControl)
|
InsertHtml
( byte Location, string TextToInsert )
MyVar = '<strong>I
am here</strong>'
|
InsertTable
( <string pCaption> )
APPROACH 1: APPROACH 2:
|
InsertText
( byte Location, string TextToInsert )
MyVar = 'I am here'
|
KeyPressed
( signed FeControl ) ,long
if OLEEvent = 13 ! Keypress Event
|
Kill
( )
ThisViewer1.Kill()
|
Load
( string CurrentPath, <long CurrentControl>, <byte
LoadFromVar> )
ThisViewer1.Load (MyVariable, ?feControl, true)
|
NewDocument
( )
ThisViewer1.NewDocument()
|
PrintMe
( byte ShowDialog )
ThisViewer1.PrintMe (true)
|
Reload
( <long CurrentControl> )
ThisViewer1.Reload ()
|
Save
( *string SaveLocation, byte SaveType, byte PromptUser=true
),byte,proc
FileNameString = longpath()
& '\MyFile.htm'
|
SetFocus
( )
ThisViewer.SetFocus()
|
Settings
( string BkgColor ) ,byte
ThisViewer1.Settings ('Blue')
|
UnhideControl
( )
ThisViewer.UnhideControl ()
|
Update
( string Property, string PropValue )
ThisViewer1.Update('Source', 'I wrote this')
|
Active (Byte) | ( obsolete ) |
Browser (Byte) | Setting this property to true (1) changes the FeHtmlEditor
object to a "read only", html-browsing control. In this
mode you cannot edit anything, and the hyperlinks become active, launching
separate (new) windows. By default this is set to false (0).
Can be "set" either "directly", or using the GetInfo
and Update methods. Can be a very useful property for setting
access permissions etc. Example 1 : ThisViewer1.Update ('Browser', 1) Example 2 : ThisViewer1.Browser = true ThisViewer1.Load ('c:\mydoc.html') |
CurrentPath (String) | The full path (including filename) of the file currently loaded in the object. Refreshed using the GetInfo method. e.g. 'c:\documents\page1.html'. |
DocInnerText (CString) | Same as the InnerText property, but this property holds the InnerText component for the whole document, not just the currently selected portion. Use this property if you're wanting the "text" from an entire html page. Refreshed using the GetInfo method. |
InnerHtml (CString) | Holds the HTML for the selected object, between the start and end tags. See the GetInfo and Update methods. |
InnerText (CString) | Holds the text for the selected object, between the start and end tags. See the GetInfo and Update methods. |
ObjType (String) | This property holds the selected object type within the
current document. It can be one of three things:
|
OuterHtml (CString) | Holds the selected (html) object's html content See the GetInfo and Update methods. |
OuterText (CString) | Holds the selected (html) object's text content See the GetInfo and Update methods. |
PageTitle (String) | Holds the title of the page being displayed. See the GetInfo method. |
PicAlign (String) | Holds the "Alignment" setting for the currently selected image in an html document. Use the GetInfo and Update methods. |
PicBorder (Byte) | Holds the "Border" width for the currently selected image in an html file. Use the GetInfo and Update methods. (Setting the border to 0 will result in the image having no border). |
PicHSpacing (Byte) | Holds the "Horizontal Spacing" setting for the currently selected image in an html file. Use the GetInfo and Update methods. |
PicVSpacing (Byte) | Holds the "Vertical Spacing" setting for the currently selected image in an html file. Use the GetInfo and Update methods. |
PicSource (String) | Holds the source (web url or filename) for the currently selected image in an html file. Use the GetInfo and Update methods. |
PicText (String) | Holds the "Alternate Text" (the text that displays when you point at the image, and/or if the image fails to load) for the currently selected image in an html file. Use the GetInfo and Update methods. |
RootFolder (String) | This property is used in the GetHtmlGraphicsInfo
method, for the following purpose. When you are trying to establish
the list of graphics in an html document ( primarily useful for when you
are using NetTalk to send an email written using File Explorer - see the
GraphicsList property ) there may be graphics with paths such as
" /MySubfolder/MyImage.gif ". The problem arises that
when you pass NetTalk a graphic path like that ( to embed the graphic
into the email at send-time ), it fails as the path is not "valid".
File Explorer handles this problem as follows: If you have first
set the HtmlRootFolder property, before calling the GetHtmlGraphicsInfo
method, then File Explorer automatically constructs valid paths for these
graphics, using the HtmlRootFolder property to establish valid
paths for these files. Example... Example: ThisViewer1.RootFolder = "c:\My Documents\Website1" ! Here we set this property with the folder that contains the actual html page we're working with. Any graphics in this html file that have no path ( Image1.gif ) or an "incomplete" path ( /Subfoler/Image.gif ) will be assumed to be in this folder or have this folder as their root. ThisViewer1.GetHtmlGraphicsInfo() If you do not set the RootFolder property before calling the GetHtmlGraphicsInfo method, File Explorer will assume that such graphics stem from the exe directory. |
Source (CString) | Holds the html component (source / text) of the loaded page. See the GetInfo and Update methods. |
TagName (String) | Holds the Tag Name of the selected object (e.g. "STRONG", "FONT", "A"). See the GetInfo method. |
Url (String) | Holds the path / url to the file currently loaded. Refreshed using the GetInfo method. e.g. 'c:\documents\'. |
At this time there is quite an overlap in terms of multiple File Explorer classes being implemented by the same templates. In the future we may revisit this, but for now all templates are covered in the main (FileExplorer.htm) help document, please click here.
See the FeHtmlEditor_Callbacks
procedure in the feabc.app example application for more info.
Event Name | Equate | Description |
ContextMenuAction | fe:EdEvt_ContextMenuAction | The user right clicked to display the popup context menu |
DisplayChanged | fe:EdEvt_DisplayChanged | The display of the page changed |
DocumentComplete | fe:EdEvt_DocumentComplete | The document completed downloading. For frames pages this will be called once for each frame |
OnBlur | fe:EdEvt_OnBlur | The control lost focus |
OnClick | fe:EdEvt_OnClick | The control was clicked on by the user |
OnDblClick | fe:EdEvt_OnDblClick | The control was double clicked on by the user |
OnKeyDown | fe:EdEvt_OnKeyDown | The user pressed a key |
OnKeyPress | fe:EdEvt_OnKeyPress | The user pressed a key |
OnKeyUp | fe:EdEvt_OnKeyUp | The user released the pressed key |
OnMouseDown | fe:EdEvt_OnMouseDown | The mouse button was pressed |
OnMouseMove | fe:EdEvt_OnMouseMove | The mouse was moved |
OnMouseOut | fe:EdEvt_OnMouseOut | The mouse was moved outside the control |
OnMouseOver | fe:EdEvt_OnMouseOver | The mouse was moved over the control |
OnMouseUp | fe:EdEvt_OnMouseUp | The mouse button was released |
OnReadyStateChange | fe:EdEvt_OnReadyStateChange | |
ShowContextMenu | fe:EdEvt_ShowContextMenu | The right click context menu will be displayed |
The new feEditor class that ships with FileExplorer 5 and later is compatible with Vista and Windows Server 2008 and does not have any dependancies other than requiring Internet Explorer.
To use the old FeHtmlEditor under Windows Vista you need to ship the DhtmlEd.msi that FileExplorer will place in your Clarion\3rdparty\bin\ directory when it is installed. This should be run to install the MS DHTML control on the users machine when your application is installed. We recommend not using the old control, but rather using the new feEditor, which is the default with FileExplorer 5 and higher. Not only is it faster, but it is more feature rich and stable than the Microsoft based control is.
[end of document]