Solved

Free RTE ( http://freerichtexteditor.com/ ) . Problem preloading content.

Posted on 2008-10-29
1
1,789 Views
Last Modified: 2012-06-27
Hello Experts,

I am new to ASP and relatively new to JS, so I apologize for this silly question.

I have a problem preloading content to  Free Rich Text Editor( http://freerichtexteditor.com/ ).
I included all the requires files to my ASP page:

<script LANGUAGE="javascript" type="text/javascript" src="/Includes/JS/config.js"></script>
<script LANGUAGE="javascript" type="text/javascript" SRC="/Includes/JS/richtext.js"></script>

and initialized RTE in my <table></table> successfully:

<SCRIPT LANGUAGE=javascript>
initRTE(' ', ' ');
</SCRIPT>

Now I need to preload some content there. I have a variable on my page which is basically a value from the DB, which is generated dynamically and I can' hardcode it. The value of this variable is supposed to preload in the textarea of RTE.

I tried to initialize RTE like this, first parameter is supposed to be preloaded content.

<SCRIPT LANGUAGE=javascript>
initRTE('<%=myVariable%> ', ' ');
</SCRIPT>

But it didn't work.

At the same tme  initRTE('some text ', ' '); works just fine.

I came across the following example for ASP:

http://mrcmain.net/Smitha/RTE/examples/example.asp

Can someone help me to make it work with VB6?

Thanks in advance.

0
Comment
Question by:snarinsky
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 7

Accepted Solution

by:
bluV11t earned 500 total points
ID: 22838974
Hi!
I think you just have to do some small syntax changes to freeRTE_Preload function to make it VB.
<%
function freeRTE_Preload(content)
	' Strip whitespace.
	content = trim(content);
	' Strip newline characters.
	content = replace(content, chr(10), " ")
	content = replace(content, chr(13), " ")
	' Replace single quotes.
	content = replace(content, chr(145), chr(39))
	content = replace(content, chr(146), chr(39))
	' Return the result.
	freeRTE_Preload = content
End function
' Send the preloaded content to the function.
myVariable = freeRTE_Preload("<i>This is some <b>preloaded</b> content</i>")
 
%>

Open in new window

0

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

729 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