Making a complex text editor.
I put together a text editor that has all of the basic functions cut, copy, paste, save, open, and some other stuff. Here is the problem: I want to make it so it can display several different fonts, font sizes, and font colors, at once. I have a feeling that I have to use the editorKit and Document and Style classes and interfaces but I am not sure how. If someone could post some example code demonstrating some of these features and a link to a tutorial I would appreciate it. Thanks!!
In the future, Swing related questions should be posted in the Swing forum.
Read the API for JTextPane and follow the link to the Swing tutorial where you will find a working example.
Similar Messages
-
I am making a dynamic text editor.
Some of the fonts do not embed well? I have imported the
fonts, put a linkage name, assigned data to the label.
Some of the fonts change, but not on the server?
I am using the setTextFormat?
Does anyone have any ideas? It would be greatly appreciated,
EmmaHello I am wondering if you can help me. I am sorry I have no
answer for your problem.
I am looking to also create a custom text editor in flash but
I have no idea on how to do that. Would you happen to have a
tutorial or can direct me to one on the web that I can learn how to
create such a thing?
I am looking for tutorials on this subject for both AS2 AND
AS3 based text editor creation.
Thank you. -
Making Rich Text Editor with PHP in Dreamweaver - Problem with CKEditor...
Hi,
I am developing a website in Dreamweaver and using the platform of PHP and MYSQL. I need to develop a Rich Text Editor just like the one I am typing at the moment. With my recent searches I have come across with CKEditor as one of the possibilities to add a Rich Text Editor to my website. I have seen older versions of CKEditor also known as FCKEditor which I believe unfortunatley is out of date and obsolete now (discontinued). I cannot find any of the downloads now from anywhere on the web.
I can find FCKEditor tutorials with PHP, but can not find CKEditor tutorials for PHP (when I try googling it, it always gives me FCKEditor page). Can anyone please help me and tell me if I can still make Rich Text Editor using CKEditor and PHP?
If yes, please guide me how? Any tutorials or reading material will be very helpful.
Regards,
Bilal . KhanYes, you absolutely can use CKEditor to create a rich text editor with PHP/MySQL.I have tried several editors and it's my choice.
Here is a link to the documentation page:
http://docs.cksource.com/
CKFinder is also very good in conjunction with CKEditor. Although it costs $59/per website, it's better than the free alternatives. -
Making multilingual text editor
hi,
i would like to know how to proceed to make a multilingual text editor through java awt or swing.
how to save the multilingual files and retrieve it back.i tried with awt. but i couldn't retrieve it back.
Expecting a detailed help from you at the earliest.
kuttuHi there
Go to the JAVA Tutorial Doc there is a section that covers the java sulotion to this problem
Markus -
Creating content in InDesign or an external text editor
Hi,
I'm starting another technical manual project in InDesign. The manual will be about 500-600 A5 pages, mixing text, technical illustrations and screenshots. I'm the only author, and will have proofreader working on PDF copies.
I'm not sure if I should create my content right in InDesign, or using an external text editor. The point with both solutions are:
- InDesign
Pro: What you write is what you see. You always know how long is a section, and can immediately balance the mix between text and illustrations (both having the same relevance in this manual).
Con: There is no way to keep the overall structure under control; you can have an overview on chapter sequence with the Book, but that'a all - no finer level is allowed. And you cannot work on the iPad or another computer, without having InDesign installed.
- External text editor
Pro: Scrivener and Nisus Writer - to name two of the options - can always show a fine-detailed outline, where you can easily rearrange small sections and check the balance between parts. You can continue editing when at your clients. With Scrivener, you can synch text-only markdown files via Dropbox, and continue editing on an iPad when at the client.
Con: The final layout has to be done in InDesign, so you have to be careful when to import the finished first draft. Balance between small sections cannot be checked until you work on the final layout. Illustrations have to be added only when working at the layout. Tables will be a rough approximation.
What would you do? I would like to work on the external text editor, since my previous experience with a long manual in InDesign was a bit like working blind. But I hate the idea of not being immediately in control of all the elements of my work.
Cheers,
PaoloHalfway in the making of the manual, I can say that creating content in InDesign (CS6) is not feasible. The program is extremely slow and unrealiable. The spinning beachball takes most of the working time, and crashes are extremely frequent.
My book is not very complex. A single flow of text, with the simplest layout, and a few inline illustrations. A spare amount of cross-references, a few conditions. The book is made of less of ten chapters, with the longest no longer than 150 A5 pages.
As it is, I would consider InDesign a final layout app only. Writing and proofreading has to be done on a rough copy (assuming the proofreading do agree to work on a preliminary copy, and not the final work). InDesign should come into play when it is time to prepare the layout for printing.
I hope to read of someone more successful than me. Going back to FrameMaker and Windows is not my dream (plus, producing PDF files with FrameMaker on Windows has been a nightmare for me). Unfortunately, lucky technical writers using InDesign are very jealous, and don't seem to want to release their experience on the web.
Paolo -
Text editor in Score module agonizingly clunky! Fix?
When creating scores from midi regions, the text editor drives me nuts when adding lyrics: The word/character positioning is different between text edit/create mode and what appears on the screen after editing, and different again between that and what appears in print preview mode or actual print-out. This is absolutely crazy-making when trying to line words/syllables up with their corresponding notations!
Also the cut & paste functions don't work as in any other text editor I've seen.
Also-also I can't get it to accept a new default font and size.
Suggestions? Dr. Kevorkian's phone number?
Thanks!Hi,
it looks like you have some problem with RFC. It stopped on the following line:
* Communication error in RFC-Call
message x628(ke) with 'RFC_ERROR' subrc msg_text.
Ask your basis guy to check it. The job on application server tried to connect to the central instance and it failed. The job run on central instance does not need to make any RFC call. Hence there is no problem in this case.
Regards -
I am working on a project that needs a Rich-Text Editor with
ability to insert tables, images, and more complex editing features
such as what FCKEditor provides but ideally that was built with
Flex in mind. Is there such an editor available? I have seen a few
options but nothing that really matched the functionality of
FCKEditor for example.
ThanksHello,
I was looking for flex version of the FCK Editor,
unfortantly, I could not find a fully complete solution, but I
found the following which might help you:
1.
http://flashtexteditor.com/flexdemo/full/
2.
http://drumbeatinsight.com/examples/htmlcomponent/editor/HTMLWithRTE.html
L.L. -
Hello Experts,
I have an ALV Grid where the last column is displayed as push buttons. When i click on a pushbutton, a text editor is opened up using ABAP OO. Now, I enter the text and SAve it. A standard text is created against the selected row in ALV Grid. Then I come back to the alv grid and click on another button of some different row. Again the text editor opens up with the previous text. I nter the new text and click on save. However, this time the standard text is not created. I have am making the container and text editor free as i click on 'back'. Still the data is not getting refreshed.
Please, let me know where m i going wrong.
Regards,
SonalHi Sonal,
I have faced similar issue with respect to module pool with container on the screen.
Try using the following on back action....
call method wf_init_edit->delete_text. (wf_init_edit -> editor reference - type ref to cl_gui_textedit )
Also we can free the container using
call method wf_init_cont->free. (wf_init_cont -> container reference - type ref to cl_gui_custom_container )
Hope it helps.
Regards,
Byju -
Efficient data structure to implement simple text editor?
I was given this problem in an interview:
What data structure would you use to implement a simple text editor that does these 4 functions:
a) goto(line number)
b) insert(char input,location)
c) delete(location)
d) printAll() //print entire file
Given that i'm such a newb, i was stumped. I came up with making a 2d array that would allow for o(1) time for goto, but o(n) for everything else (shifting everything in the array). there were other downfalls too dealing with space issues and such, but he wanted me to optimize this data structure. I then came up with a linked list of arrays, but that had similar problems.
But thinking about it further is driving me a little crazy so I'm wondering if you guys have any suggestions on how to answer this question...
one thing that came to mind after is to implement the data structure as a binary tree, where each node contains
class Node
char theChar
int position; // ie 0 = first character in the file, and 81 could be the first character in the 2nd line
node left,right,parent;
}so how it works is the cursor would know where the location was so i would know where to delete and insert within the tree.
insert {
//search for location to insert after (log n)
//create new character node and append to current node
//increment position for all subsequent children
delete(x) {
search for x position
if found, remove node and decrement position value for all children
goto(line #) {
return line # * 80 (or whatever max length for a single line)
}the major problem i see here is balancing the tree after every insert/delete
Thanks in advance.One of many great things emacs has given us is the gap buffer:
http://en.wikipedia.org/wiki/Gap_buffer
To see a Java implementation of this you can look in the Java SDK source. The document model (I forget exactly what its called), used in Swing uses a gap buffer. -
Formatting text with a text editor within a website?
My wife wants to use her new iPad 2 to participate in an online community (Ravelry, a knitting and crocheting site). She does a great deal of posting to forums within this community. The text editor for posting in these forums allows users to format their text (bolding, italicize, etc.) as well as to link to other external and internal pages within the site (writers in the forum frequently link to patterns and project images within the site as references in their posts). When she attempts to use the text editor in Ravelry from her iPad, she is unable to select the text she wants to highlight and alter it (by bolding or making it a link). When we select the text, the only options are to copy or cut and we can't, once we've selected the text, tap on the "create a link" button in the text editor. We've tried to use both Safari and Atomic Web browsers, but no luck. Help?
ravelry.com is using WMD-Editor which is a WYWIWYM Markdown editor. Unfortunately it appears their chosen WYWIWYM Markdown editor is no longer or is pretty deprecated.
You as a user are not going to be able to swap out your own editor for use on any website...these editors are hard coded by the website developer...perhaps you could, as already suggested ask them to update to a more robust editor which supports today's standards. Though I doubt you will get far in having them swap out code for this.
A Solution:
Download an alternate browser such as iCabMobile for iOS...I tested ravelry against this browser and the editor does work but is pretty unstable. Funtional but not as intended. Safari cannot load this editor properly at all.
Log into your ravalry account and read their FAQ (http://www.ravelry.com/wiki/pages/UsingTheTextEditor#formatting_bolditalic_lists _and_other_basics)
Simple BBCODE commands for formatting where you do not need to even use the tool bar work fine...just a hassle to memorize.
Hope this helps. -
Replacing the Rich Text Editor with FCKeditor
Hi,
I've seen a few people mention that they've replaced Portals RTE with FCKeditor in the Portal 10.1.2 release. As ever Oracles documentation is scant (that's being generous) as to how to do this. If anyone has, can you give me an example of how you have modified your buildUIembed.html file.
I've currently got this partially working, the new RTE is displaying, but the page won't submit. Portals JS is trying to .save() the RTE content, a method which it apparently doesn't support!
Any help would be much appreciated.
Regards
DanHi Dan,
Per the OracleAS Portal User's Guide (available at http://www.oracle.com/technology/documentation/appserver1012.html)
Possibility of extending or replacing the seeded rich text editor
You can customize the OracleAS Portal rich text editor to support your needs: from simple changes, for example, replacement of buttons on the editor's toolbar, to more complex changes, for example, replacement of the seeded editor with one of your own.
Such changes involve altering the files that comprise the user interface and functions of the seeded rich text editor. This being the case, this feature is intended for advanced OracleAS Portal administrators. Additionally, you should be aware that future upgrades of OracleAS Portal may impact any modifications made to these files. Support for this feature is offered through the Portal Content Area discussion forum and not through Oracle Support;
You may want to pose this question in that forum.
Regards,
Pete -
MS Outlook uses Word as its text editor, and aside from the fact that Outlook in general is a bit clumsy, it's a joy to compose an email. Why can't Thunderbird engage a proper test editor (paid option, perhaps) to free us from the only really bad feature of an otherwise fine product?
A hoy that makes my life anything but with people here all the time with virus alerts, mails that do not forward or simply do not display correctly. All because Outlook uses a word processor to compose mails that it fills with Microsoft Word proprietary rubbish that send anti virus programs and real HTML programs into a spin. Microsoft gave their customers what they asked for an be damned about the rest. Unfortunately the customer is not always right, even if they think so, and the result is mail is a lot further from a homogeneous standards based thing than ever. It is almost to the point that you have to have a Microsoft client to read mail from a Microsoft client, an Apple client to read mail from an apple client and then there is everyone else.
Undoubtedly Thunderbird composer needs work, but it will never be a word processor. Your writing HTML for the web. therefore fonts are very limited, as are sizes. anything that pretends otherwise is just making a fool of you and your recipients. -
Hi,
I have been using text editor control.
In this when we click load file button...an open prompt window appears..
there we will be finding Files of type... dropdown..containing values like text(.txt) file and All file types..
Is there any way to restrict this dropdown to single value..i mean to .txt file..should only be viewed omitting
All files option in dropdown..
i am using CL_GUI_TEXTEDIT..control...
Is there any option to do it...
Please Help me out.
Thanks & Regards,
Sandy.Hi Sandy,
I don't think there is any method for this. As the dialog box opened is depending on your OS.
But, you can cross check the uploaded file for " .txt " using CP (contains pattern) function of string.
DATA: xl type string.
xl = '*.txt'.
IF not P_FILE CP xl. "P_FILE is name of file you will get.
"Error"
ENDIF.
Sachin -
Options -> Text Editor -> C/C++ missing intellisense entry. Intellisense not working. Solutions to turn options for the editor off and on are not working. The intellisense entry is present for other languages,
such as C#, but not C/C++.
By not working, I mean the intellisense right click menu items are grayed out, and intellisense files are not produced.Hi JerroldBrody,
Thank you for posting in MSDN forum.
>>I mean the intellisense right click menu items are grayed out, and intellisense files are not produced.
Based on your issue, could you please share me a screen shot about the intellisense right click menu items are grayed out?
Generally, I know that it is default that we can enable the intellisense for C/C++ by going to the TOOLS->Options -> Text Editor -> C/C++ ->Advanced-> IntelliSense like the following screen shot.
So please try to check if you set Disable Intellisense property as False in the VS IDE.
Best Regards,
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
We have portal release 2 running on HP-UX.
In release 2 there is a new text editor for publishing text. Its used for simple text and text item types.
How is this feature implemented? Is the source code available?
Feedback appreciated.Hi,
It is called Rich Text editing. A search on google with the keywords rich text edit
will give you links to quite a few sites, where the source is available. It uses
a combination of DHTML and JavaScript.
We have portal release 2 running on HP-UX.
In release 2 there is a new text editor for publishing text. Its used for simple text and text item types.
How is this feature implemented? Is the source code available?
Feedback appreciated.
Maybe you are looking for
-
i tried to install the recent itunes update and this kept popping up...what the heck does that mean? please help! Service-apple mobile device failed to start. verify that you have sufficient privileges to start system services
-
Reset Identity Column Value in SQL Server depending on whats being inserted
I have a SQL Server 2008 database with a table that has an ID field that has an identity increment and seed of 1. This work great as each new record created automatically gets a new and distinct number. Now when I insert certain new records I need to
-
Finding current directory location of file
Hi All, i want to know how to find out the directory path of the given file.when i am using the below code i am getting path where our program running.i.e.c://windows/system32. File f=new File("."); f.getAbsolutePath(); i want to know the path of fil
-
Advanced Datagrid from a MySQL DB
Hi, I want to create a tree like structure by reading data from a MYSQL DB, using PHP. How can I do this?
-
Disconnecting an accociated client
I am supporting a small cluster of AP541N WAPs and would like to know if there is an easy way to manually disconnect an associated client (recognized by MAC address) from the Associated Clients screen in the Access Point Configuration Utility Status