Thread Rating:
  • 4 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Tutorial: Adding Extra Function Buttons to the Editor v2
#31
Quote:7.3 Add after it:

	insertSpoiler: function()
	{
		selectedText = this.getSelectedText($(this.textarea));
		title = prompt("Please enter a title for your spoiler.", "");
 
		if(title)
		{
			if(!selectedText)
			{
				text = prompt("Enter a text for your spoiler.", "");
			}
			else
			{
				text = selectedText;
			}
 
			if(title && text)
			{
				this.performInsert("[spoiler="+title+"]"+text+"[/spoiler]", "", true, false);
			}
 
		}
	},

Possible to edit the input box so that the carriage returns / line breaks show? Now it's lumping the text together into one paragraph.

This:

- MTK6592 1.7GHz Octa Core
- 6.5 inch 1920*1080 FHD IPS Screen
- 2GB RAM + 32GB ROM
- Android 4.2.2 Smartphone
- 13.0MP Rear Camera + 5.0MP Front Camera
- Support Multi language, 3G, GPS, WIFI, Bluetooth, Play Store, etc

Pastes as this:

Goophone S4 Max MTK6592 1.7GHz Octa Core Android 4.2 Smartphone 2G Ram 32G Rom 6.5 Inch FHD IPS Screen - MTK6592 1.7GHz Octa Core - 6.5 inch 1920*1080 FHD IPS Screen - 2GB RAM + 32GB ROM - Android 4.2.2 Smartphone - 13.0MP Rear Camera + 5.0MP Front Camera - Support Multi language, 3G, GPS, WIFI, Bluetooth, Play Store, etc
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)