erich.wanker Posted March 20, 2018 Share Posted March 20, 2018 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 More sharing options...
Sherzod Posted March 20, 2018 Share Posted March 20, 2018 Hi, Can you try this approach?: http://forums.unigui.com/index.php?/topic/6514-unihtmlmemo-insert-text-at-cursor-position/&do=findComment&comment=33176 Link to comment Share on other sites More sharing options...
erich.wanker Posted March 20, 2018 Author Share Posted March 20, 2018 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 More sharing options...
Sherzod Posted March 20, 2018 Share Posted March 20, 2018 Which build are you using? Link to comment Share on other sites More sharing options...
erich.wanker Posted March 20, 2018 Author Share Posted March 20, 2018 Hi .. i now have 1.0.0.1425 But the above code still doesnt work ... any suggestions? Link to comment Share on other sites More sharing options...
Sherzod Posted March 20, 2018 Share Posted March 20, 2018 Hi .. i now have 1.0.0.1425 But the above code still doesnt work ... any suggestions? Ok we will check Link to comment Share on other sites More sharing options...
Sherzod Posted March 20, 2018 Share Posted March 20, 2018 I couldn't reproduce this, Can you make a simple testcase for this ?! Link to comment Share on other sites More sharing options...
erich.wanker Posted March 21, 2018 Author Share Posted March 21, 2018 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 More sharing options...
Oliver Morsch Posted March 21, 2018 Share Posted March 21, 2018 <br> ??? Link to comment Share on other sites More sharing options...
erich.wanker Posted March 22, 2018 Author Share Posted March 22, 2018 .... ... ... thanX Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now