SnippetMaster Support Forums
Return to main website
 
March 08, 2009, 10:12:32 AM
* Show unread posts since last visit.
* Show new replies to your posts.
Welcome, Guest. Please login or register.
Did you miss your activation email?
March 08, 2009, 10:12:32 AM

Login with username, password and session length
Search:  
Advanced search
* Home Help Search Login Register
SnippetMaster Support Forums  |  General  |  General Discussion & Support  |  Topic: SM adds a line break to JS file, causing error « previous next »
Pages: [1] Print
Author Topic: SM adds a line break to JS file, causing error  (Read 419 times)
pardus

Posts: 2


[-] SM adds a line break to JS file, causing error
« on: September 23, 2008, 05:08:55 PM »

I am trying to use SM to edit a js file. the JS file has variables that need to be on one line, if they get split onto 2, then the script wont function.

If I upload a fresh working JS file, open it and not even edit anything, just save it again, it splits up the lines.

example.

Code:
quotes[0]='<!-- #BeginSnippet name="Quote 1  -->the editable text here<!-- #EndSnippet -->'

and after save it does

Code:
quotes[0]='<!-- #BeginSnippet name="Quote 1  -->the editable text here
<!-- #EndSnippet -->'

how do i get it to stop doing that?
Report to moderator   Logged
admin
Forum Administrator
*
Posts: 2527

SnippetMaster Author


WWW
[-] Re: SM adds a line break to JS file, causing error
« Reply #1 on: September 23, 2008, 11:08:22 PM »

I would recommend using the "text editor" for editing this snippet, instead of the wysiwyg editor.  That might fix the problem.

Here is a link to instructions for how to specify the "WYSIWYG=no" attribute to the snippet tag:

http://www.snippetmaster.com/documentation/snippet-tag-attributes.html

Let me know how that goes...
Report to moderator   Logged
pardus

Posts: 2


[-] Re: SM adds a line break to JS file, causing error
« Reply #2 on: September 24, 2008, 07:33:06 AM »

Thanks that worked using that attribute.

I tried opening it normally in wysiwyg and then switching to text but that seemed to add the lines.


thanks for your quick response Smile
Report to moderator   Logged
Pages: [1] Print 
SnippetMaster Support Forums  |  General  |  General Discussion & Support  |  Topic: SM adds a line break to JS file, causing error « previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.8 | SMF © 2006-2008, Simple Machines LLC Valid XHTML 1.0! Valid CSS!