erich.wanker Posted August 7, 2020 Share Posted August 7, 2020 Hi .. is it possible to reduce the toolbar functions with some javascript-code ???: i need: just 1 font (Arial) just 2 colors (black and red) Textfunctions: bold, cursive, underline, bigger and smaller Hope someone can help :-) ThanX Erich Link to comment Share on other sites More sharing options...
Sherzod Posted August 7, 2020 Share Posted August 7, 2020 Hi, For example like this: Link to comment Share on other sites More sharing options...
erich.wanker Posted August 7, 2020 Author Share Posted August 7, 2020 Hy Sherzod :-) thanx for answer - BUT ..;-) it has nothing to do with the question :-) i need a uniHTMLMemo with JUST 1 Font, 2 Colors(black and red) .. and text-manipulation for (bold, cursive, underline, bigger and smaller) ThanX for infos Erich Link to comment Share on other sites More sharing options...
erich.wanker Posted August 10, 2020 Author Share Posted August 10, 2020 push :-) Link to comment Share on other sites More sharing options...
Sherzod Posted August 10, 2020 Share Posted August 10, 2020 On 8/7/2020 at 11:54 PM, erich.wanker said: it has nothing to do with the question :-) On 8/7/2020 at 11:54 PM, erich.wanker said: underline On 8/7/2020 at 4:32 PM, Sherzod said: For example like this: At least have you tried this code!? procedure TMainForm.UniButton4Click(Sender: TObject); begin UniHTMLMemo1.JSInterface.JSCall('execCmd', ['underline']); end; Link to comment Share on other sites More sharing options...
erich.wanker Posted August 10, 2020 Author Share Posted August 10, 2020 Hy Sherzod :-) nice greetings from austria ... thanX .. now i understand :-) i can set the toolbar invisible - and create my own needed buttons .. OK ... sorry for my stupidity.. ;-) Now i have a new problem: where can i find all possible commands...? UniHTMLMemo1.JSInterface.JSCall('execCmd', [' *****for bold***** ']); UniHTMLMemo1.JSInterface.JSCall('execCmd', [' *****for italian***** ']); UniHTMLMemo1.JSInterface.JSCall('execCmd', [' *****for Red font color ***** ']); UniHTMLMemo1.JSInterface.JSCall('execCmd', [' *****for bigger font ***** ']); UniHTMLMemo1.JSInterface.JSCall('execCmd', [' *****for smaller font ***** ']); .... Link to comment Share on other sites More sharing options...
Sherzod Posted August 11, 2020 Share Posted August 11, 2020 16 hours ago, erich.wanker said: UniHTMLMemo1.JSInterface.JSCall('execCmd', [' *****for bold***** ']); UniHTMLMemo1.JSInterface.JSCall('execCmd', [' *****for italian***** ']); UniHTMLMemo1.JSInterface.JSCall('execCmd', [' *****for Red font color ***** ']); UniHTMLMemo1.JSInterface.JSCall('execCmd', [' *****for bigger font ***** ']); UniHTMLMemo1.JSInterface.JSCall('execCmd', [' *****for smaller font ***** ']); Hi, JSCall('execCmd', ['bold']); JSCall('execCmd', ['italic']); JSCall('execCmd', ['FontSize', 5]); // 0-7 16 hours ago, erich.wanker said: *****for Red font color ***** 1. htmlMemo... -> UniEvents function beforeInit(sender, config) { this.setColor = function(color) { this.execCmd('forecolor', Ext.isWebKit || Ext.isIE ? '#'+color : color); this.deferFocus(); }; this.setBGColor = function(color) { if (Ext.isGecko) { this.execCmd('useCSS', false); this.execCmd('hilitecolor', color); this.execCmd('useCSS', true); this.deferFocus(); } else { this.execCmd(Ext.isOpera ? 'hilitecolor' : 'backcolor', Ext.isWebKit || Ext.isIE ? '#' + color : color); this.deferFocus(); } } } 2. Usage: UniHTMLMemo1.JSInterface.JSCall('setColor', ['FF0000']); UniHTMLMemo1.JSInterface.JSCall('setBGColor', ['FF0000']); 1 Link to comment Share on other sites More sharing options...
erich.wanker Posted August 11, 2020 Author Share Posted August 11, 2020 WOW ... !!!!!!! thank you VERY VERY MUCH !!! nice greetings erich 1 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