![]() |
Insert text into WYSIWYG Editor via link
I have seen a few requests for this in the past, however I cannot seem to understand how to achieve the same effect for the WYSIWYG editor as I have for the standard text editor.
All I am trying to do is have text appear in the textarea when creating a new post based on clicking a link, similar to how you click on a smilie and it appears inside the editor. Here is my code: Code:
<script type="text/javascript"> Code:
<input type="button" value="hello" onclick="insert(this.form.{$editorid}_textarea,'hello')"> --------------- Added [DATE]1209215442[/DATE] at [TIME]1209215442[/TIME] --------------- === UPDATE === ????????????????? Alright, I have made some progress and have found a partial solution but require someones helpful guidance with javascript in order to make it fully functional. Here is my dilemma. I have 2 javascripts which I need to merge. Here is the first: Code:
<script type="text/javascript"> Code:
<input type="button" value="test" onclick="insert(this.form.{$editorid}_textarea,'test123')"> Code:
<script> Code:
<a href="javascript:;" onClick="insertText()">test</a> --- Bottom line, I'd like to have a dual action javascript which allows for the detection of {$editorid}_textarea being the textarea (standard editor) and {$editorid}_iframe being an iframe (wysiwyg editor)and allows for specific content to be placed within both via an OnClick event from a link. |
Although I understand this is quite a daunting request, since it involves a substantial amount of thought. Would anyone be so kind to point me to a forum that may also be able to help me with this problem in case no one here is able to help?
|
All times are GMT. The time now is 04:59 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|