Comments (7)
Hi Yermo, this is a bump since you were on vacation. This is kind of odd, but rich_textarea does not like spaces.
from rich_textarea.
The intent of insertObject() was to insert a block of HTML to represent some "thing" you want to embed in the text such as an image, a description of a link, etc. It's not intended to insert a single blank space.
Do you just want to insert a space at some location?
from rich_textarea.
I was trying to reconstruct a rich textarea based on plaintext. So I parsed '[o=object1] [o=object2]', needing to use insertObject on object 1, followed by a space, then insertObject on object2.
I also noticed that you can insert text (e.g. 'This is an object: '). If the last character is a space, it gets dropped. Only if the last character is a space.
from rich_textarea.
But actually, I brought up this issue about 2-3 weeks ago. Since then, I ended up inserting & nbsp; instead of a whitespace, which allows that as an insert in the single case.
And I started appending &npsp ; to make up for the missing last space.
These are workarounds and if you want handle some edge cases. Still really appreciate your plugin!
from rich_textarea.
Encase your objects in some tag. I didn't anticipate plain text for
insertObject().
e.g. This is an object
On 06/27/2014 01:55 PM, Andrew Chan wrote:
I was trying to reconstruct a rich textarea based on plaintext. So I
parsed '[o=object1] [o=object2]', needing to use insertObject on object
1, followed by a space, then insertObject on object2.I also noticed that you can insert text (e.g. 'This is an object: '). If
the last character is a space, it gets dropped. Only if the last
character is a space.—
Reply to this email directly or view it on GitHub
#6 (comment).
Yermo Lamers Software Guy, Motorcyclist and Reluctant Writer
http://miles-by-motorcycle.com
A social network for the lucky few who travel by motorcycle
and those who care about them.
from rich_textarea.
Ah, I see. I thought it was an insert for plaintext OR objects.
from rich_textarea.
You can just insert a DOM text node for that or I could add a separate convenience method for that.
from rich_textarea.
Related Issues (9)
- backspace to delete newline broken HOT 4
- _checkRegexes throws an undefined nodeValue exception on paste over selection.
- External data source for @ or # HOT 9
- Question about insertObject HOT 3
- Converting [o={data-value}]? HOT 3
- Up/Down arrow doesn't work in bootstrap modal HOT 11
- what is the best solution to indentity diffirent id type in value ? HOT 5
- Implement placeholder
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 rich_textarea.