cuylib
This is a tiny library to implement Web server embedded editor.
You can find it in github.
Can be used either from haserl or directly from
a shell
script.
Features:
- Uses codemirror
- Escaped HTML entities (html_enc)
- Decode URL escaping (url_decode)
- Read POST form data (post_data)
- Parse
QUERY_STRING
(query_string and query_string_raw) - Render HTML and Markdown documents with pre-processing (cuy_render)
Support functions:
- codemirror_link : Configured URL to where you can find codemirror files.
- html_msg : generate a HTML response
- html_enc : Encode special HTML characters
- url_decode : Decode URL encoded strings
- post_data : Read data posted using a HTML POST request.
- query_string_raw : parse HTML query parameters.
- query_string : part HTML query paramters and also decodes URL encoding.
Editor components:
- cuy_header : snippet of code for the html document header.
- cuy_editform : snippet of code for genereting the html editor form
- cuy_editarea : snippet of code to bind codemirror to a text area
- cuy_savecb : snippet for save command callback
- cuy_render : convert content into suitable HTML markup
Main editing entry point
- cuy_editapp : A full editing page