Discussion Forums  >  Uncategorized

Replies: 8    Views: 245

XactWeb
Android Fan
Profile
Posts: 85
Reg: Jan 09, 2012
Bangor
850
02/03/12 08:16 AM (14 years ago)

Disable CKEditor

Is it possible to disable the CKEditor? I want a simple source box. CKEditor even with magic quotes off is generating extra code and breaking code and links.
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
02/03/12 09:09 AM (14 years ago)
Hi, If you just want to paste in source, then you could create a Custom URL screen and point it to an HTML document that you place somewhere on the web. Or, you could make an HTML screen, and include the file locally with your app. If you're not really using the WYSIWYG editor for your Custom HTML screen, and knowing that this type of screen has to make a trip to the BT servers to get the data, you might as well just host the file yourself somewhere. Does that make sense? Mark
 
XactWeb
Android Fan
Profile
Posts: 85
Reg: Jan 09, 2012
Bangor
850
like
02/03/12 09:19 AM (14 years ago)
Mark, It does make sense and that is what I have been doing. For simple HTML pages I wanted to use the functionality of the cutom html plugin so I wouldn't have to create a file and then upload to my own server. I can work around it, its just a pain.
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
02/03/12 09:21 AM (14 years ago)
I hear ya! CKEditor seems to be a bit problematic these days. At least there are options. Mark
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
02/03/12 12:05 PM (14 years ago)
From another thread: If the CKEditor is not working in your install, you can easily disabled it and just use a standard TEXT area. I have not done this before so I don't know the outcome but it should work fine? The CKEditor is used in in only one space, on the BT_screen_customHTML plugin. Open the /files/plugins/BT_screen_customHTML/index.php file. You'll see a javascript function that runs on the window.onload even. comment out this function to prevent the editor from converting the html text area on the screen to an editor. You may need to adjust the size of the html text area after doing this but I'll bet it works.
 
XactWeb
Android Fan
Profile
Posts: 85
Reg: Jan 09, 2012
Bangor
850
like
02/03/12 01:18 PM (14 years ago)
Awesome thanks for the lead David. Easy enough to change and exactly what I was looking for.
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
02/03/12 01:27 PM (14 years ago)
Ah but wait...funny. The submit button expects the CKEditor to exist. All it does is callt he updateThenSubmit() function in that same file. Find this file and look at it. What's doing is taking the value of the editors contents (the data), moving this data to a hidden form field, then calling the saveScreenData() method. The saveScreenData() method is the method that fires the AJAX request to save the data in the background. Not sure where your skill is but this could get trickier than I thought. At minimun you'll need to... a) comment out the lines of javascript in the updateThenSubmit() method that refer to the editor (it's no longer used). This just means that the only line uncommented will be saveScreenData('htmlEditorFlag'); b) Delete the hidden form element named editorContent. This just below the javascript call to updateThenSubmit(). Just remove the hidden form field, it's no longer needed. c) Change the id and name of the HTML text area so 'editorContent' like id='editorContent' name='editorContent' (these match). The reason for this is the save_AJAX.php file in this same directory is what actually does the saving. This file will look for the data in a form element named editorContent. Before, with the editor, it was finding this data in the hidden form field element. Now, it's finding it in the text area that we renamed. See if that works...
 
Toastyfevers
Lost but trying
Profile
Posts: 3
Reg: Dec 27, 2011
location unknow...
30
like
02/18/12 06:24 PM (13 years ago)
David, is it possible for you to post your updated version of the index.php file with the ckeditor disabled? I keep getting the loading animation. Thanks in advance
 
Toastyfevers
Lost but trying
Profile
Posts: 3
Reg: Dec 27, 2011
location unknow...
30
like
02/20/12 10:16 PM (13 years ago)
I hate to bump this but can anyone please give any guidance? I tried to create a .htaccess and php.ini file but its not taking the setting to disable the magic quotes
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.