/* ** Copyright (c) 2012 D. Richard Hipp ** ** This program is free software; you can redistribute it and/or ** modify it under the terms of the Simplified BSD License (also ** known as the "2-Clause License" or "FreeBSD License".) ** ** 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. ** ** Author contact information: ** drh@hwaci.com ** http://www.hwaci.com/drh/ ** ******************************************************************************* ** ** This file contains code that generates WYSIWYG text editors on ** web pages. */ #include "config.h" #include #include #include "wysiwyg.h" /* ** Output code for a WYSIWYG editor. The caller must have already generated ** the
that will contain the editor, and the call must generate the ** corresponding
after this routine returns. The caller must include ** an onsubmit= attribute on the
element that invokes the ** wysiwygSubmit() function. ** ** There can only be a single WYSIWYG editor per frame. */ void wysiwygEditor( const char *zId, /* ID for this editor */ const char *zContent, /* Initial content (HTML) */ int w, int h /* Initial width and height */ ){ @ @ @
Edit mode: @
@
@ @ @ @ @
@
@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ #if 0 /* Cut/Copy/Paste requires special browser permissions for security ** reasons. So omit these buttons */ @ @ @ #endif @
@
%s(zContent)
@ }