Comments (4)
You can already do that using these methods
getStyleSpans(int paragraph, int from, int to)
setStyleSpans(int paragraph, int from, StyleSpans styleSpans)
e.g.
int par = area.getCurrentParagraph();
int parLen = area.getParagraphs().get(par).length();
StyleSpans<S> styles = area.getStyleSpans(par, 0, parLen);
StyleSpans<S> newStyles = styles.mapStyles(...);
area.setStyleSpans(par, 0, newStyles);
from richtextfx.
Nice! Thanks. That did it :D
On Wed, Apr 16, 2014 at 3:35 PM, TomasMikula [email protected]:
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/42
.
from richtextfx.
I added a convenience method, so the above code can now be rewritten as
int par = area.getCurrentParagraph();
StyleSpans<S> styles = area.getStyleSpans(par);
StyleSpans<S> newStyles = styles.mapStyles(...);
area.setStyleSpans(par, 0, newStyles);
from richtextfx.
Thanks! I just downloaded it. It works fine.
On Wed, Apr 16, 2014 at 4:31 PM, TomasMikula [email protected]:
I added a convenience method, so the above code can now be rewritten as
int par = area.getCurrentParagraph();StyleSpans
styles = area.getStyleSpans(par);StyleSpans
newStyles = styles.mapStyles(...);area.setStyleSpans(par, 0, newStyles);—
Reply to this email directly or view it on GitHubhttps://github.com//issues/42#issuecomment-40665036
.
from richtextfx.
Related Issues (20)
- SetPlaceholder is invalid and does not display placeholders HOT 6
- After adding inner margins to CodeArea, VirtualizedScrollPanel displays abnormally HOT 6
- ScrollPanel embedded with VirtualizedScrollPanel's rolling solution HOT 2
- Is there a built-in and universal code keyword highlighted? HOT 1
- 'Variables' in rich text HOT 2
- getTotalAreaWidthEstimate() HOT 1
- How to refresh/redraw the area? HOT 2
- Question: what is the best practice for frequently changed text? HOT 5
- Question: How to keep the selection when append text? HOT 2
- GenericStyledArea adding inappropriate character when using a different keyboard setup HOT 3
- Question: InlineCssTextArea for appending 100 000 lines HOT 2
- How to set the size of tab in CodeArea? HOT 2
- StyleClassedTextArea + PageUp/PageDown -> NoSuchElementException + IndexOutOfBoundsException HOT 3
- Question: xml highlighter gives StackOverflowError HOT 2
- Question: How to move selected code right/left using Tab/Shift+Tab? HOT 3
- Question: How to show vertical lines in CodeArea for indentations? HOT 6
- Question: How to set selection color via code or CSS? HOT 4
- Question: how I can use InlineCssTextField with multiple color and pattern text please HOT 3
- Question: codeArea.removeSelection delayed display HOT 1
- CodeArea seems to intercept the input method, preventing it from being passed to other TextFields.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from richtextfx.