Search
Search titles only
By:
Search titles only
By:
Log in
Register
Search
Search titles only
By:
Search titles only
By:
Menu
Install the app
Install
Forums
New posts
All threads
Latest threads
New posts
Trending threads
Trending
Search forums
What's new
New posts
New ads
New profile posts
Latest activity
Free Ads
Latest reviews
Search ads
Members
Current visitors
New profile posts
Search profile posts
Contact us
Latest ads
🔒 NordVPN Premium – 3 Months
hrdilshan
Updated:
Yesterday at 8:29 PM
🚀 Microsoft Office 365 Pro Plus – Lifetime Access! 🚀
hrdilshan
Updated:
Yesterday at 8:28 PM
Linkedin Premium Business / Careere /Sales Navigator - 1/2/3/6/9/12 Months - Reddem Link
hrdilshan
Updated:
Yesterday at 8:27 PM
Colombo
YEYE 3 in 1 Instant Coffee Mix 50 Sachet
Romeshka
Updated:
Wednesday at 12:16 AM
Colombo
Red Hat Certified System Administrator (RHCSA) - RHEL 10
Sanjeewani95
Updated:
Jul 3, 2026
Electronics
Vehicles
Property
Search
Reply to thread
Forums
General
ElaKiri Talk!
Cursor/VSCode
Get the App
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Message
<blockquote data-quote="NEMISIS" data-source="post: 30678612" data-attributes="member: 494668"><p>මේ කමෙන්ට් එක ටයිප් කරන්න මේ වැඩේ කරනවට වඩා වෙලාවක් ගියා</p><p>Prompt, chatgpt Free</p><p>1 : I need to create HTML, JS based wysiwyg editor, can you give me html, css, and js code requried for this. </p><p>2 : this is very good, can you implement font color and highlight color as well</p><p></p><p>Output</p><p><img src="https://i.imgur.com/wxtM5KQ.png" alt="" class="fr-fic fr-dii fr-draggable " style="" /></p><p></p><p>Code</p><p>[CODE]<!DOCTYPE html></p><p><html lang="en"></p><p><head></p><p> <meta charset="UTF-8"></p><p> <title>Enhanced WYSIWYG Editor</title></p><p> <style></p><p> body {</p><p> font-family: Arial, sans-serif;</p><p> margin: 20px;</p><p> background: #f9f9f9;</p><p> }</p><p></p><p> .toolbar {</p><p> background: #fff;</p><p> border: 1px solid #ccc;</p><p> padding: 8px;</p><p> border-radius: 6px;</p><p> margin-bottom: 10px;</p><p> display: flex;</p><p> align-items: center;</p><p> flex-wrap: wrap;</p><p> gap: 6px;</p><p> }</p><p></p><p> .toolbar button {</p><p> background: #f1f1f1;</p><p> border: none;</p><p> padding: 6px 10px;</p><p> cursor: pointer;</p><p> border-radius: 4px;</p><p> }</p><p></p><p> .toolbar button:hover {</p><p> background-color: #ddd;</p><p> }</p><p></p><p> .toolbar input[type="color"] {</p><p> border: none;</p><p> width: 30px;</p><p> height: 30px;</p><p> padding: 0;</p><p> margin-left: 5px;</p><p> cursor: pointer;</p><p> }</p><p></p><p> #editor {</p><p> border: 1px solid #ccc;</p><p> padding: 10px;</p><p> min-height: 300px;</p><p> background: white;</p><p> border-radius: 6px;</p><p> }</p><p> </style></p><p></head></p><p><body></p><p></p><p> <div class="toolbar"></p><p> <button onclick="execCmd('bold')"><b>B</b></button></p><p> <button onclick="execCmd('italic')"><i>I</i></button></p><p> <button onclick="execCmd('underline')"><u>U</u></button></p><p> <button onclick="execCmd('insertOrderedList')">OL</button></p><p> <button onclick="execCmd('insertUnorderedList')">UL</button></p><p> <button onclick="execCmd('formatBlock', '<h1>')">H1</button></p><p> <button onclick="execCmd('formatBlock', '<h2>')">H2</button></p><p> <button onclick="execCmd('createLink', prompt('Enter URL:'))">🔗</button></p><p> <button onclick="execCmd('removeFormat')">🧹</button></p><p></p><p> <label>🖍️ Font Color:</p><p> <input type="color" onchange="execCmd('foreColor', this.value)"></p><p> </label></p><p></p><p> <label>🟨 Highlight:</p><p> <input type="color" onchange="execCmd('hiliteColor', this.value)"></p><p> </label></p><p> </div></p><p></p><p> <div id="editor" contenteditable="true"></p><p> <p>Start editing...</p></p><p> </div></p><p></p><p> <script></p><p> function execCmd(command, value = null) {</p><p> document.execCommand(command, false, value);</p><p> }</p><p> </script></p><p></p><p></body></p><p></html>[/CODE]</p></blockquote><p></p>
[QUOTE="NEMISIS, post: 30678612, member: 494668"] මේ කමෙන්ට් එක ටයිප් කරන්න මේ වැඩේ කරනවට වඩා වෙලාවක් ගියා Prompt, chatgpt Free 1 : I need to create HTML, JS based wysiwyg editor, can you give me html, css, and js code requried for this. 2 : this is very good, can you implement font color and highlight color as well Output [img]https://i.imgur.com/wxtM5KQ.png[/img] Code [CODE]<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Enhanced WYSIWYG Editor</title> <style> body { font-family: Arial, sans-serif; margin: 20px; background: #f9f9f9; } .toolbar { background: #fff; border: 1px solid #ccc; padding: 8px; border-radius: 6px; margin-bottom: 10px; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; } .toolbar button { background: #f1f1f1; border: none; padding: 6px 10px; cursor: pointer; border-radius: 4px; } .toolbar button:hover { background-color: #ddd; } .toolbar input[type="color"] { border: none; width: 30px; height: 30px; padding: 0; margin-left: 5px; cursor: pointer; } #editor { border: 1px solid #ccc; padding: 10px; min-height: 300px; background: white; border-radius: 6px; } </style> </head> <body> <div class="toolbar"> <button onclick="execCmd('bold')"><b>B</b></button> <button onclick="execCmd('italic')"><i>I</i></button> <button onclick="execCmd('underline')"><u>U</u></button> <button onclick="execCmd('insertOrderedList')">OL</button> <button onclick="execCmd('insertUnorderedList')">UL</button> <button onclick="execCmd('formatBlock', '<h1>')">H1</button> <button onclick="execCmd('formatBlock', '<h2>')">H2</button> <button onclick="execCmd('createLink', prompt('Enter URL:'))">🔗</button> <button onclick="execCmd('removeFormat')">🧹</button> <label>🖍️ Font Color: <input type="color" onchange="execCmd('foreColor', this.value)"> </label> <label>🟨 Highlight: <input type="color" onchange="execCmd('hiliteColor', this.value)"> </label> </div> <div id="editor" contenteditable="true"> <p>Start editing...</p> </div> <script> function execCmd(command, value = null) { document.execCommand(command, false, value); } </script> </body> </html>[/CODE] [/QUOTE]
Insert quotes…
Verification
Hathara warak wissa keeyada? (Hathara wadi karanna 20)
Post reply
Top
Bottom