Comments (7)
This is not supported currently. It should be possible according to the docs: https://github.com/basecamp/trix?tab=readme-ov-file#storing-attached-files, but I would have to play a bit with this. I'll leave this issue open and get back when I have more info.
from kvision.
Thank you for the response. I have noticed also that it doesn't support tables. Is there a way to use other editors that support tables?
from kvision.
In general, yes. You can write wrappers for any JS library out there (e.g CKEditor, Tiny MCE and others). But it's not an easy task because you need to know the chosen library quite well. As an alternative you can try using some React component, which would probably be easier to adapt but with additional bundle size cost. You can find an example of using editor-type React component in the guide: https://kvision.gitbook.io/kvision-guide/4.-integrating-with-javascript-libraries/using-react-components#advanced-components
from kvision.
I've unblocked file uploading with a new RichText
/RichTextInput
parameter. In the next release you will be able to process attachments like this:
richText(allowFileUploads = true) {
onEvent {
event("trix-attachment-add") { event: dynamic ->
if (event.attachment.file != null) {
KVScope.launch { // we will use suspending function so lauch is needed
val content = event.attachment.file.unsafeCast<File>().getContent() // extension function from io.kvision.utils
console.log(content) // content is a String containing data uri
// save content somewhere on a server, get url in return
val fileUrl = uploadService.uploadFileAndReturnUrl(content)
event.attachment.setAttributes(
obj {
this.url = fileUrl // change file url in the edited html code
}
)
}
}
}
}
}
from kvision.
This is good news. When is the next release which I can start using this code?
from kvision.
It's being published right now.
from kvision.
Fixed in 7.4.3
from kvision.
Related Issues (20)
- Request - support for crossorigin attribute in Image (and others) HOT 1
- Ability to intercept image load errors HOT 2
- Component lifecycle HOT 6
- StackPanel seems to not indexing components properly HOT 4
- Wrong module in kvision.gitbook.io. HOT 1
- trying to generate .pot files HOT 12
- overrides of `SimplePanel.AddAll` call refresh outside of a `singleRender` wrapper. HOT 1
- Allow KVService to have arguments with GET HOT 6
- Allow modifying response headers for Spring Boot and Micronaut apps HOT 1
- remove id parameter on get requests HOT 1
- Can't get data from Tabulator.RowComponent HOT 2
- Expandable/collapsible fieldset or panel HOT 2
- duplicated different word in kvision docs HOT 1
- did you consider to integrate kvision with ktor client? HOT 5
- can't make tabulator selectable with kvision v7.4.4 HOT 2
- My tabulator not selecting data HOT 5
- How to add more than one bottomCalc rows? HOT 2
- kvision gradle plugin not works well with Spring-Web-Flux HOT 4
- DropDown - call method instead of loading a route HOT 2
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 kvision.