Jump to content

UniDBHTMLMemo1: best way to insert text ???


erich.wanker

Recommended Posts

Hi,

 

what is the best way to insert uniMemo-text in a UniDBHTMLMemo?

 

i use  "UniDBHTMLMemo1.Lines.Append(UniMemo1.text);"

but this works not good (the text is allways on the end of the text and the database doent´realize the insert correct)

 

and: is it possible to insert a text on the current cursor position ?

 

thaX for suggestions

 

Link to comment
Share on other sites

hi,

 

it seems that the Database-HtmlMemo can´t use this solution ?

 

i got JS Errors

 

 

 

 

 

this following example produce error: JS Error: missing ) after argument list

 embed_file   :=  '<div style=""><font face="arial, roboto">[master.jpg]</font><br></div>';
 UniSession.AddJS(UniDBHTMLMemo1.JSName + '.insertAtCursor("'+ embed_file +'" + " ")');   // also Error with: .insertAtCursor("'+ embed_file +'")');

this following example produce error: JS Error: Invalid or unexpected token

UniSession.AddJS(UniDBHTMLMemo1.JSName + '.insertAtCursor("'+ UniMemo2.text +'" + " ")'); // also Error with: .insertAtCursor("'+ UniMemo2.text +'")');

the unimemo2.text was:

 

testtext (without return) 

Link to comment
Share on other sites

Hello,

 

Ok.. it works to 50% ... :-)

 

Just a simple Javascript Question (i think) :  How can i send a "Return"

 

The following code works - but makes no line-break?  .. the \n \r doesnt help

 

            for x:=0 to UniMemo2.Lines.Count-1 do
              begin
               embed_text:=unimemo2.Lines[x];
               UniSession.AddJS(UniDBHTMLMemo1.JSName + '.insertAtCursor("'+embed_text+'"+" \n \r");');


              end;

Thanx for help :-)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...