mirror of
https://gitlab.com/freepascal.org/fpc/pas2js.git
synced 2025-04-07 13:27:50 +02:00
* Namespaced tinyeditor API
This commit is contained in:
parent
1e4a6845b9
commit
ad4c5b5a85
@ -1,21 +0,0 @@
|
||||
unit libtinyeditor;
|
||||
|
||||
{$mode objfpc}
|
||||
{$modeswitch externalclass}
|
||||
|
||||
interface
|
||||
|
||||
Uses JS, Web;
|
||||
|
||||
Type
|
||||
TTinyEditor = class external name 'Object' (TJSObject)
|
||||
Public
|
||||
procedure transformToEditor(aElement : TJSHTMLElement);
|
||||
end;
|
||||
|
||||
var
|
||||
tinyEditor : TTinyEditor; external name '__tinyEditor';
|
||||
|
||||
Implementation
|
||||
|
||||
end.
|
3
packages/tinyeditor/namespaced/Api.TinyEditor.pas
Normal file
3
packages/tinyeditor/namespaced/Api.TinyEditor.pas
Normal file
@ -0,0 +1,3 @@
|
||||
{$DEFINE FPC_DOTTEDUNITS}
|
||||
unit Api.TinyEditor;
|
||||
{$include ../src/libtinyeditor.pp}
|
42
packages/tinyeditor/src/libtinyeditor.pp
Normal file
42
packages/tinyeditor/src/libtinyeditor.pp
Normal file
@ -0,0 +1,42 @@
|
||||
{
|
||||
This file is part of the Pas2JS run time library.
|
||||
Copyright (C) 2023 Michael Van Canneyt
|
||||
|
||||
tinyeditor import unit
|
||||
|
||||
See the file COPYING.FPC, included in this distribution,
|
||||
for details about the copyright.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
**********************************************************************}
|
||||
{$IFNDEF FPC_DOTTEDUNITS}
|
||||
unit libtinyeditor;
|
||||
{$ENDIF}
|
||||
|
||||
{$mode objfpc}
|
||||
{$modeswitch externalclass}
|
||||
|
||||
interface
|
||||
|
||||
Uses
|
||||
{$IFDEF FPC_DOTTEDUNITS}
|
||||
JSApi.JS, BrowserApi.Web;
|
||||
{$ELSE}
|
||||
JS, Web;
|
||||
{$ENDIF}
|
||||
|
||||
Type
|
||||
TTinyEditor = class external name 'Object' (TJSObject)
|
||||
Public
|
||||
procedure transformToEditor(aElement : TJSHTMLElement);
|
||||
end;
|
||||
|
||||
var
|
||||
tinyEditor : TTinyEditor; external name '__tinyEditor';
|
||||
|
||||
Implementation
|
||||
|
||||
end.
|
Loading…
Reference in New Issue
Block a user