August 15th in Javascript by pbu .

Free Markup BBCode Editor in Javascript

blueskin.PNG

Free Markup BBCode Editor in Javascript

A simple homemade and lightweight free to use textarea bbcode markup editor written in javascript. Although not complex it has all the basic bbcode functions like hyperlink, quote and code, list tags. This editor can be used in forums, content management systems (CMS), blog applications and in many other php scripts.

- Fast loading and lightweight
- Works in IE and Firefox
- No popup html window for inserting hyperlinks.
- Easy to integrate
- Works on all major browsers

You …

August 10th in Javascript by pbu .

how to get selected textarea value using javascript

how to get the selected value in textbox and change its value? how to do it in javascript?

This is what i am after. I was working on a bbcode editor and i wanted to get the the selected text in the textarea and wanted to insert bbcode tags in place of them. I needed just very simple javascript code an finally i found a solution working in both IE and Firefox.

// code for IE
var textarea = document.getElementById("textarea");

if (document.selection)
{
textarea.focus();
var …

July 30th in General, Internet, Javascript, PHP Scripts by pbu .

Lightweight PHP WYSIWYG HTML Editor

Lightweight WYSIWYG Editor for PHP

A dead simple javascript based WYSIWYG html editor for PHP. It is lightwight, fastloading html editor can be integrated to PHP scripts easily.

I always wanted a very simple WYSIWYG editor for my PHP scripts with just simple functions like bold, italic, URL and Image insertion and nothing more than that! I came across many many open source editors and each had disadvantages like popup html window for inserting links, slow loading and much more, which …

July 28th in Javascript by pbu .

how to hide textarea?

how to hide textarea from javascript?

The simple problem i faced to hide textarea while replacing a textarea with wysiwyg html editor simply because there is no visible property for textarea.

All you have to do is set the style to hidden

document.getElementById(‘textareabox’).style.visibility=”hidden”;

Thats it!

July 28th in Javascript by pbu .

iframe innerHTML value from textarea

If you want to assign value to iframe innerHTML its just easy. All you have to do is just assign the value of the textarea to the iframes innerHTML property. If the value is html source, the iframe will give a rich text look. There may a situation as well if you want to pull mysql html data and format it inside a html editor.

lets say you have a textarea where you have a html code and want to …

July 28th in Javascript by pbu .

iframe value to textbox in javascript

iframe componenet in javascript can provide a rich text editing and a html page can be easily embeeded inside iframe as it is just like frames.

<iframe id="edior" width="300" height="200 style="border:0px solid grey"></iframe>

To remove the border both in IE and firefox you can set the style to 0px.

You can also load the iframe dynamically with javascript

document.write("<iframe id=\"rte\" width=\"" + width + "\" height=\"" + height + "\" style=\"border:1px solid grey\"></iframe>");

But what if you want to send a value from iframe to …

July 22nd in Javascript by pbu .

iFrame in javascript wont work in Firefox [solved]

iFrame when enabled in design just wont work in firefox. It wont accept any input, but it works very well in internet explorer. I was working on a rich text editor with iframe and this has been a major problem with it.

i finally resolved this.

Mozilla says this line must be called from by the onLoad() in the body, only then it would work

document.getElementById(“rte”).contentWindow.document.designMode = “On”

2. All elements in the javascript must by called by this function getElementbyID() .

<script type="text/javascript">
function Init() …

July 22nd in General, Internet, Javascript, PHP Scripts by pbu .

A Simple WYSIWYG Editor in Javascript

I have been always under the impression that making a html based WYSIWYG editor is hard and required complex code. Being myself a beginner in javascript i just cannot believe that how simple it is to make a rich text html editor with WYSIWYG environment.

With just few lines of simple code you can make yourself a simple rich text editor with javascript. All you need is to put iframe in the page which does most of the html processing work. …

July 22nd in Javascript by pbu .

Create selected text to hyperlink in Javascript

i have come across many many open source WYSISWYG html editors and one thing that kept me always annoying is a popup html window to create a link. Since creating the hyperlink is such an important feature in the wysiwyg editor, keeping it simple is so important.

I just wanted like a prompt asking for URL and then creating a link. No more popup windows. I have searched a lot in the web for such a simple javascript code and its …

 Page 2 of 2 « 1  2