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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...