Solved

htmlbox JQuery based wysiwyg editor help

Posted on 2011-03-16
4
1,107 Views
Last Modified: 2012-05-11
ok so i have this html box wysiwyg editor that runs of of JQuery  

i am trying to add a button to get the content that the user has entered into it so i can update a table
you will see i have attempted to add a button :S but unsure. i have read the manual for it but still confused

 htmlbox.min.js jquery-1.3.2.min.js
<script language="Javascript" src="jquery-1.3.2.min.js" type="text/javascript"></script>
    
<script language="Javascript" src="htmlbox.min.js" type="text/javascript"></script>





<script language="Javascript" type="text/javascript">
var hb = $("#hb").htmlbox({
    buttons:[
	     ["separator_dots","bold","italic","underline"]
		 
		
	],
	icons:"default",
	skin:"green"
});
<button onclick="hb.get('save.php')">Save</button>
</script>

Open in new window

0
Comment
Question by:helpchrisplz
  • 2
  • 2
4 Comments
 
LVL 15

Expert Comment

by:dirknibleck
Comment Utility
I'm not sure what you're trying to do with your code here.

I would suggest creating a form on the page with a textarea. Run htmlbox against the textarea. Ie...
$("textarea").htmlbox({});

Open in new window


Then when the form is submitted, htmlbox will already have placed the html from the richtext editor in the textarea and it will be submitted along with any other form data.

0
 
LVL 1

Author Comment

by:helpchrisplz
Comment Utility
<textarea id='hb'></textarea>

i 4 got this when i was copy and pasting

is my button working?
0
 
LVL 15

Accepted Solution

by:
dirknibleck earned 500 total points
Comment Utility
It looks like what you are doing should be working. Can you tell if when you click on the button it is issuing an AJAX call? If you're using Firebug in Firefox, you should see a GET statement in the console after you click the button.
0
 
LVL 1

Author Closing Comment

by:helpchrisplz
Comment Utility
nice i have fire bug now
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
advertisement module in core php 4 78
Wordpress syntax error 1 27
resizeing PHP image 2 21
Wordpress Body Class 5 8
Author Note: Since this E-E article was originally written, years ago, formal testing has come into common use in the world of PHP.  PHPUnit (http://en.wikipedia.org/wiki/PHPUnit) and similar technologies have enjoyed wide adoption, making it possib…
These days socially coordinated efforts have turned into a critical requirement for enterprises.
Learn the basics of strings in Python: declaration, operations, indices, and slicing. Strings are declared with quotations; for example: s = "string": Strings are immutable.: Strings may be concatenated or multiplied using the addition and multiplic…
The viewer will learn how to count occurrences of each item in an array.

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now