POGRAN Posted May 17, 2006 Share Posted May 17, 2006 I'm writing some forum that is going to use almost the same advantages while writing/editing a new topic (Bold text tag adding function, image adding function etc) as this forum does.Only one problem to which I didn't succeed to find decision is how to input the tags exactly in that line where cursor is flashing and not in the end of text..I hope somebody knows decision!Thanks in advance and bye for now.. Quote Link to comment https://forums.phpfreaks.com/topic/9842-problem-with-adding-tags-into-input-textarea/ Share on other sites More sharing options...
GBS Posted May 18, 2006 Share Posted May 18, 2006 Hi,,just posted that one:[a href=\"http://www.phpfreaks.com/forums/index.php?showtopic=93345\" target=\"_blank\"]cursor position in a textarea[/a],, :)The script works with both IE & FF,,just,... with IE, the script needs to add a "no-sense key" to find the correct cursor position,... & then, once the bbcode is added, it removes the "no-sense key",... (tested with IE, "ctrl+Z" displays the 'no-sense key',,, erff,....)with firefox, it was easier (as often,,, :p ), using the 'setSelectionRange' method,Hoping it helps,,l8tr,, Quote Link to comment https://forums.phpfreaks.com/topic/9842-problem-with-adding-tags-into-input-textarea/#findComment-36803 Share on other sites More sharing options...
POGRAN Posted May 18, 2006 Author Share Posted May 18, 2006 Thank you very much, GBS!that's exactly what I need.. [img src=\"style_emoticons/[#EMO_DIR#]/smile.gif\" style=\"vertical-align:middle\" emoid=\":smile:\" border=\"0\" alt=\"smile.gif\" /] Quote Link to comment https://forums.phpfreaks.com/topic/9842-problem-with-adding-tags-into-input-textarea/#findComment-36922 Share on other sites More sharing options...
POGRAN Posted May 19, 2006 Author Share Posted May 19, 2006 Does anyone know how to do the same thing but so that user can add an image in his message by clicking "BROWSE.." button? Quote Link to comment https://forums.phpfreaks.com/topic/9842-problem-with-adding-tags-into-input-textarea/#findComment-37158 Share on other sites More sharing options...
nogray Posted May 25, 2006 Share Posted May 25, 2006 If you want to add images, you can use a rich content editor like this one [a href=\"http://www.fckeditor.net/\" target=\"_blank\"]http://www.fckeditor.net/[/a] Quote Link to comment https://forums.phpfreaks.com/topic/9842-problem-with-adding-tags-into-input-textarea/#findComment-38802 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.