Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3
This is the forum to discuss the Wrox book Beginning ASP.NET 3.5: In C# and VB by Imar Spaanjaars; ISBN: 9780470187593
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old November 22nd, 2013, 05:13 PM
Authorized User
Points: 101, Level: 2
Points: 101, Level: 2 Points: 101, Level: 2 Points: 101, Level: 2
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2013
Location: saudi arabia
Posts: 25
Thanks: 6
Thanked 0 Times in 0 Posts
Send a message via Skype™ to Areej Abdu
Default How to add a WYSIWYG text editor

hello

I would lik to add an input form that has one field only with a text box (multi lines) for the purpose of editing the content of the home page (editing mode)

which databound field should I use to edit the content of the home page

and I want to make it as a WYSIWYG text editor

how can I do this ???

-------------------------------------------------------------

Note : is it ok to post general questions like this one in this section
or ,, is there another suitabl section where programmers ask and answer general questions like this?
Reply With Quote
  #2 (permalink)  
Old November 24th, 2013, 02:34 AM
Imar's Avatar
Wrox Author
Points: 71,164, Level: 100
Points: 71,164, Level: 100 Points: 71,164, Level: 100 Points: 71,164, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 16,948
Thanks: 79
Thanked 1,555 Times in 1,532 Posts
Default

HI there,

You can use a rich text editor like CKEditor: http://ckeditor.com/

From an ASP.NET perspective, your field is just a text field and then you turn it into a rich text editor with some JavaScript.

With regards to where you should post questions like these: since it's not directly related to my book, you're better off posting them in the Basics category from this list: http://p2p.wrox.com/asp-net-3-5-436/

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
Reply With Quote
The Following User Says Thank You to Imar For This Useful Post:
Areej Abdu (November 25th, 2013)
  #3 (permalink)  
Old November 25th, 2013, 10:55 AM
Authorized User
Points: 101, Level: 2
Points: 101, Level: 2 Points: 101, Level: 2 Points: 101, Level: 2
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2013
Location: saudi arabia
Posts: 25
Thanks: 6
Thanked 0 Times in 0 Posts
Send a message via Skype™ to Areej Abdu
Default still need help

I opened this link
http://ckeditor.com/download

downloaded the basic editor and the ckeditor for asp.net

and I followed the instructions in these two links
http://docs.cksource.com/CKEditor_3....ation_Advanced
http://docs.cksource.com/CKEditor_3....tion_Beginners

and then all I get ,, is a white empty box ,, like this
http://www.shy22.com/upfiljpg/b3f93567.jpg

that's how I did things
http://www.shy22.com/upfilpng/jsn93815.png
-------------------------------------------

I don't know where exactly i'm going wrong !!!

-------------------------------------------

by the way ,, at the beginning ,, I tried to follow the instructions in chapter 12

u said ,, if we want to use an input form that would deal with a one record
we should either use form view or details view ,, I have chosen the details view , cause it offered me the two buttons update and cancel ,, after i made the default mode -> update mode ,, and i made the textbox -> mutilines with setting the height and width as needed ,, as described in the book

I created a new table in the database called Home with one column named contents ,, type ntext -> so it can support a large amount of english or arabic text
but then i figured ,, how it's gonna be updated without a key column ,, then I added a column ,, called Id ,, and I set it as the primary key ,,
am I working so far correctly ,, or i'm messing up ???

in the output form ,, I used the same details view ,, but in the read only mode
then I tried in the inputform to inter formatted text with tags like h1 p hr and br ,, and it didn't work well the way i wanted ,, most of the text didn't get inserted properly to the database ,, and then I erased up every thing I did

-----------------------------------

NOW ,, to make the wysiwyg thing work properly exactly the way I want ,, should i do the details view thing all again ,, and insert the ckeditor inside it ,, or just the i showed it in the screen shot ,, or what exactly ,, i'm messing up a lot on such a very easy thing ,,
Reply With Quote
  #4 (permalink)  
Old November 25th, 2013, 12:53 PM
Imar's Avatar
Wrox Author
Points: 71,164, Level: 100
Points: 71,164, Level: 100 Points: 71,164, Level: 100 Points: 71,164, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 16,948
Thanks: 79
Thanked 1,555 Times in 1,532 Posts
Default

It looks like the script is not firing correctly, or it's targeting an incorrect client HTML ID. You may want to look at the source of your page and see if there's a mismatch in control IDs.

Otherwise, try posting this on the CK Editor's forum, or post a lot more code and detail here.

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
Reply With Quote
The Following User Says Thank You to Imar For This Useful Post:
Areej Abdu (November 25th, 2013)
  #5 (permalink)  
Old November 25th, 2013, 02:43 PM
Authorized User
Points: 101, Level: 2
Points: 101, Level: 2 Points: 101, Level: 2 Points: 101, Level: 2
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2013
Location: saudi arabia
Posts: 25
Thanks: 6
Thanked 0 Times in 0 Posts
Send a message via Skype™ to Areej Abdu
Default

OK ,, the CKeditor worked well ,,, after modifying the basepath properly

Now :

before I start on implementing these steps ,, please tell if the steps that i'm willing to apply are correct


I use details view , cause it offers me two buttons update and cancel ,, after i make the default mode -> update mode ,, and i make the textbox -> mutilines with setting the height and width as needed ,, as described in the book
in the output form ,, I use the same details view ,, but in the read only mode

the table i'm gonna create is it ok to create the table home with one column (content) without an Id primary key ,, or is it necessary to create this Id column in order to achieve the updating process ????
Reply With Quote
  #6 (permalink)  
Old November 25th, 2013, 02:54 PM
Imar's Avatar
Wrox Author
Points: 71,164, Level: 100
Points: 71,164, Level: 100 Points: 71,164, Level: 100 Points: 71,164, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 16,948
Thanks: 79
Thanked 1,555 Times in 1,532 Posts
Default

Hi there,

You need a primary key in order for the control to work.

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
Reply With Quote
The Following User Says Thank You to Imar For This Useful Post:
Areej Abdu (November 25th, 2013)
  #7 (permalink)  
Old November 25th, 2013, 07:34 PM
Authorized User
Points: 101, Level: 2
Points: 101, Level: 2 Points: 101, Level: 2 Points: 101, Level: 2
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2013
Location: saudi arabia
Posts: 25
Thanks: 6
Thanked 0 Times in 0 Posts
Send a message via Skype™ to Areej Abdu
Default

thanx for all the support
it's all working great now
lovely regards
Reply With Quote
  #8 (permalink)  
Old March 12th, 2016, 02:37 AM
Registered User
Points: 28, Level: 1
Points: 28, Level: 1 Points: 28, Level: 1 Points: 28, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2016
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

You need a place in the CMS where we can put our custom code. This could be a plugin, module or theme. Modifying the H5P code is discouraged as you'll have issues upgrading and maintaining your patch. We recommend putting the code in a separate "mods" module or plugin, where you keep all the custom code for your CMS. See your CMS's documentation on how to create and set up a simple module or plugin, and activating it without any errors. Implement the "hook" that will modify the semantics of the content types.
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to make a WYSIWYG editor furia_cross Javascript How-To 11 August 9th, 2006 01:57 AM
WYSIWYG editor including spell checker that... mat41 HTML Code Clinic 0 July 31st, 2005 07:00 PM
Locking uneditable parts in WYSIWYG editor minesweeper222 Javascript 5 March 18th, 2005 01:40 PM
WYSIWYG editor question cutesneakers PHP How-To 5 January 1st, 2005 11:27 PM
open and revert back tag in wysiwyg editor android66 Javascript 0 August 18th, 2004 02:00 AM



All times are GMT -4. The time now is 03:31 AM.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.