3.1.x SnippetsAdd a background image to textarea

Snippets
Previous topicNext topic
User avatar

Topic Author
dmzx
Founder
Founder
Magic user status: Online
Posts: 5974
Joined: Jan 13th, '14, 20:45
    Windows 10 Chrome

Add a background image to textarea

Post by dmzx »

Source from: martin

Open styles/prosilver/template/posting_editor.html
Find This may be a partial find and not the whole line (spaces may differ)

Code: Select all

<div id="message-box">
		<textarea <!-- IF S_UCP_ACTION and not S_PRIVMSGS and not S_EDIT_DRAFT -->name="signature" id="signature" style="height: 9em;"<!-- ELSE -->name="message" id="message"<!-- ENDIF --> rows="15" cols="76" tabindex="4" onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);" onfocus="initInsertions();" class="inputbox">{MESSAGE}{DRAFT_MESSAGE}{SIGNATURE}</textarea>
	</div>
Replace with Replace the preceding lines with the following

Code: Select all

<div id="message-box">
		<textarea <!-- IF S_UCP_ACTION and not S_PRIVMSGS and not S_EDIT_DRAFT -->name="signature" id="signature" style="height: 9em;"<!-- ELSE -->name="message" id="message" style="background: #E6EFF5 url('{ROOT_PATH}images/message.png') center no-repeat;"onclick="this.style.background='#FFFFFF';"<!-- ENDIF --> rows="15" cols="76" tabindex="4" onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);" onfocus="initInsertions();" class="inputbox">{MESSAGE}{DRAFT_MESSAGE}{SIGNATURE}</textarea>
	</div>
Open styles/prosilver/template/quickreply_editor.html
Find This may be a partial find and not the whole line (spaces may differ)

Code: Select all

<textarea style="height: 9em;" name="message" rows="7" cols="76" tabindex="3" class="inputbox"></textarea>
Replace with Replace the preceding lines with the following

Code: Select all

<textarea style="height: 9em; background: #FFFFFF url('{ROOT_PATH}images/message.png') center no-repeat;" onclick="this.style.background='#FFFFFF';" name="message" rows="7" cols="76" tabindex="3" class="inputbox"></textarea>
upload this image to /images
message.png
You do not have the required permissions to view the files attached to this post.
binance.com ;) try it!
Previous topicNext topic