I'm about to build a custom CMS using PHP, but I was hoping to add text formatting (bold, italic and maybe inline links) to a textarea in a secure admin section.
I was wondering whether it's possible to use Javascript to allow the user to highlight some text and click a button which will cause the script to write the appropriate HTML tags into the textarea.
I have read about using a SSI to incorporate .txt files into your site.
Okay, I did that, but the Items do not word wrap i.e "<br>
How can I get each item in the .txt file to break after each is printed using a SSI??
*Details ----------------- The .txt file is a listing of songs that get updated everyday and it is being put into a scroll area. I work in Notepad (does it matter for creating .txt)? -----------------
I need to know as soon as possible 'cause I want the site to go "Live".
Is it possible to have text formatting inside textareas? I mean, can you show parts of text in a textarea as bold, italic, underlined, or such? If so, how's that work?
I'm currently working on an online content management system which allows users to edit html-pages without seeing the HTML-tags.
Is it possible to use buttons for text formatting? I would like to have buttons for adding a link and adding headers. But without showing the user the html-tags.
i am making a content manager, i want to be able to have the user format text with bold, italics, fontsize, color, etc within the text field window, kind of like the page here where we post topics and reply, any ideas where i can find any free scripts for this?
I'm going through some "learning by doing" of javascript through trial and error, and admittedly have a lot to learn. But in taking various scripts and dissecting them, I still can't figure out if what I want to do is possible, and that is this:
I'm trying to include a paragraph on my page that is randomly chosen each time the page loads. This I can do. But in this paragraph I'm trying to include varied text formatting (parts bold, parts different color, etc), and make part of it a link.
If I use unformatted, un-linked text, it works fine, but that's not my goal. When I try including html in the items from which to be selected randomly, whether by directly specifying the attributes or using CSS class references, nothing displays, which makes me wonder what of all this is the problem.
Apologies for the almost duplicate post but thought this was much clearer description of the issue than what I originally posted.
I'm trying to do simple integration with a third-party web application. The app has an 'Action' button on all pages that can be associate with a JS function. Our application is very proficient at parsing text provided it is in some reasonably standard structure.
Is what we are trying to do is have a JS function that can be called from any page in their system that will provide a reasonable representation of the text on the screen. I need something close to document.body.innerText; the problem with this function is that it strips spacing from tables so we can't get consistent layout.
The consistent layout I am looking for would be the same as if you did the following on any page:
1) Select all 2) Copy 3) Paste to notepad
Is there a function or process that will retrieve all text and retain formatting?
I have been in the process of re-designing my website to utilize some of the functionality and benefits of jquery. I'm building a slider set for my site, and each slide contains it's own nav box and text description of said slide. Things are working fairly well for the most part, but I'm encountering an issue with text formatting on the slides, and I figured it would be best to post my information here and try to get some assistance.My script.js file contains all of the necessary info for the slides (a code example is below):
A cloud is a visible mass of water droplets or frozen ice crystals suspended in the Earth's atmosphere above the surface of the Earth or other planetary body. Clouds in the Earth's atmosphere are studied in the nephology or cloud physics branch of meteorology. Two processes, possibly acting together, can lead to air becoming saturated: cooling the air or adding water vapor to the air. Generally, precipitation will fall to the surface; an exception is virga which evaporates before reaching the surface.",}];Here's what the finished product of that code looks like on the front end:Each slide in the set looks similar to this (but obviously contains different information). As the text for each slide is contained within the .js file and not within the html, is there any way to format it so that I can use things like italics, bold, etc.?
I grabbed this code from Dynamic Drive. I'm trying to style it better. I've had some success, but some thing are giving me a run for my money since i don't know JS.I would actually like the text to scroll from right to left instead of up and downThe only way I can figure out how ot get the quotes inside by scroller to look like quotes is to add an insane amount of spaces (&nbps.
I have the below Java on a the mouse up event of a button in Adobe Professional 8.0. I would like to make the last part of the subject line either bold or all caps. Is there a way to do this? var cSubLine = "500 Order for " + this.getField("CustomerName").value + " " + this.getField("Unit_Down").value;
im sure this will be pretty simple, at the moment i have some code which sends text from a textarea to a php file, the php file then stores the data into a database.the javascript post is as follows:
var text = document.getElementById(area).value; http.open('post', 'autosave.php?text='+text);
there is a little bit more to this(just a handle response).My issue is that when the data is passed through javascript newlines and breaks disappear, so when i call the saved data it is presented as one long string with no formatting.i tried the nl2br() function and htmlspecialchars() function in the php file that the javascript passes the data to, this made no difference. I then tried to replace /n with <br /> in the javascript before passing the text variable again this made no differnce.
i am planning to create a blog for myself. whenever i want to post a code snippet, then i want that snippet to be neatly formatted just like how the snippets in this dream in code appears.links to free rich text editors that serves this purpose. i prefer editors created by using javascript, jquery, ajax or php(because i want to develop my blog using php)i googled and i found editors like tinymce, fckeditor, YUI editor, free richtext editor.but among all, i found YUI is serving my purpose to some extent. but remaining editors are not providing option for code formatting.(even YUI also doesn't provide directly. but to some extent it preserves that formatting..)and also i am very much interested to know what library dream in code is using for the text editor that we all members see when we post our replies or queries... i tried by going to page source
I am creating a small CMS module for a client. I created a little form and when they click Submit, it goes straight out into an include (.inc) file, which is connected to the web page to be displayed.
The trouble I am having is that I'd like to create an additional button that will insert some text (certain html tags to make their life easier, etc) - I got it to work, actually. The script executes and the text is inserted - but once the script runs and the page refreshes (or whatever it does), the text then disappears. The only way I can seem to get it to stay put is when I use "onmouseup" instead of "onclick" - which means that every time the user accidentally mouses over the thing, it inserts the text.
What I need to do is create a simple wiki editor. A user will be able to type <html> code and click submit. onclick a new window will appear with the html page that they typed
My problem is I am grabbing the textarea by its Id but when it opens the new window it is displaying the Id of the textarea, not the actual information inserted into it.
I try to created a function to (Add Text into <textarea>), but the problem is that if I click on the button again it keeps adding " - New Text" again and again, while it suppose to be stopped and be added only once.
I'm working on setting up a "Send this link to a Friend" page. The page has a couple of inputs and a textarea. I have some default text in the textarea that is populated at the time of page load. What I would like to do is replace the "Dear Friend" in the textarea with the name of the friend once it is entered in the input. Code:
Does anyone know if its possible to left-justfy text in a <textarea>? I can do left justify with a simple style declaration, but can't find any reference anywhere to a left justify as can be done.
End result: I want to have buttons along the top of a textarea which will be used to add tags around highlighted text / the text curser thingy. (Basically it will be an edit box like the I am using now to make this post).
Problem at the moment: I want to reference the var to use in the function. e.g.
function addtext(id) { var al = "<div style="text-align:left;"></div>"; document.myform.outputtext.value += id; }
"id" will be defined as "al" in the HTML onclick function, I want this to use "var al" where it says ".value += id;".
HTML:
<form name="myform"> <textarea name="inputtext">Type Here