Textarea and rendering of its marked-up value

(1) Now we send 'textarea' to server to save in some database.

But today databases without markup don't satisfy people's needs.

So, if we allow to type marked-up text in 'textarea'

(and we, of course, are allowing that),

we also must not torment user,

but give possibility to see rendered image,

that he can verify visually, what he typed.

Several 'textarea's can be in form

(each with own master html-element),

but only one button 'render'.



<div id="id1">New content will be put here</div>

...

<form>

  <input type="textarea"  name="A"

         value="..."

         mime="text/html" arg="..."

         master="id1">

  <input type="clear">

  <input type="render">

  <input type="submit">

</form>



When user press button 'render', browser:

(I)  calls local application, serving this MIME-type,

     and give meaning of @value and @arg to it

     (usage of @arg depends of MIME-type)

(II) replace whole master html-element

     (with all embedded, enclosed sub-elements)

     by image, created by called application.

Element <form> uses encoding, specified in @enctype,

to send meaning of control 'A' to server.





(1.1) If @mime is omited, than it's equal to "text/html" by default

(@arg specified css-file in this case;

css-file, defined in <link> for whole document,

doesn't affect at new rendered image).

If @mime="text/html" (or omited) and @arg is omited,

than default style is used

(instead of css-file, defined in <link> for whole document).

I'm sure, "text/html" will be the most widespread MIME-type

in all full-text databases, not only in new wiki.



<div id="id1">New content will be put here</div>

...

<form>

  <input type="textarea"   name="A"

         value="<em>aaa</em> bbb <table>ccc<tr>ddd</table>"

                           arg="./style.css" 

         master="id1">

  <input type="clear">

  <input type="render">

  <input type="submit">

</form>





After pressing button 'render', it will __looks__ on display like





<em>aaa</em> bbb <table>ccc<tr>ddd</table>

...

<form>

  <input type="textarea"   name="A"

         value="aaa <em>bbb</em> <table>ccc<tr>ddd</table>"

                           arg="./style.css" 

         master="id1">

  <input type="clear">

  <input type="render">

  <input type="submit">

</form>



I'm sure, that even traditional html-tags will be enough -

so we can allow button 'render' just now !



==============================



(2) Can meaning of @value contain sign " (e.g. look at example below) !?



<form>

  <input type="textarea"   name="A"

         value="<tag attr="val">aaa</tag> <tg atr="v">bbb</tg>"

         master="id1">

  ...

</form>



There are two ways:

(2.1) No, @value contain only sign < and sign > , i.e. contain only tags -

but __arbitrary__ tags, representation of which is specified in css-file,

something like



tag {

  kind: table

}



(2.2) Yes, but mark " should be twin:

opening double inverted comma below base-line,

and closing double inverted comma above base-line (i.e. ").

  http://unicode2.chat.ru/site/unicode2/en/author/printable_eng.htm

This will be like below (i designated opening double inverted comma by dot)



<form>

  <input type=.textarea"   name=.A"

         value=.<tag attr=.val">aaa</tag> <tg atr=.v">bbb</tg>"

         master=.id1">

  ...

</form>



There is branching too:

(2.2.1) We admit opening double inverted comma

only in Unicode encoding of document

(2.2.2) We allow to use some sign from

standard ANSI, ISO, Windows, etc encodings

as opening double inverted comma.

For example, sign dot (literally as in example above) -

combination =. will signalize about special role of dot

(2.2.3) We allow both (2.2.1) and (2.2.2)



P.S.

I vote for opening double (and single) inverted comma

independently of decision for (2.2.2),

because this is non-single case, when quotation inside quotation is necessary:

meaning of some other controls can be intended for database as request,

and this request can contain quotated string, something like



<input value=.select _ _ _ where x=.string" ">







Dmitry Turin

HTML6     (6.4.0)  http://html60.chat.ru

SQL4      (4.3.0)  http://sql40.chat.ru

Unicode2  (2.0.1)  http://unicode2.chat.ru

Computer2 (2.0.3)  http://computer20.chat.ru

Received on Sunday, 2 September 2007 05:10:50 UTC