Comments (6)
@xpalko Hi. Have you found anything related to patterns?
from laraberg.
@ArtMin96 Hi. I've already solved both the localization and patterns issues, but now I can't figure out how to use a custom Media Library/Upload without Wordpress dependencies. Some idea?
doesn't work for me (probably not the whole code, just a hint).
from laraberg.
@xpalko Can you show an example of how you did it? I mean patterns and translations
Try this for media.
const mediaUpload = ({filesList, onFileChange}) => {}
Laraberg.init('element', {
mediaUpload,
//...
})
// Or
const mediaUploaded = ({
filesList,
onFileChange
}) => {
setTimeout(async () => {
let formD = new FormData;
Array.from(filesList).map(file => {
formD.append('upload', file);
});
const uploadedResponse = await $.ajax({
method: "POST",
url: `${APP_URL}/filemanager/upload`,
data: formD,
processData: false,
contentType: false,
success: function(response) {
console.log({
response
})
return response;
},
error: function(savePostErr) {
console.log({
savePostErr
})
}
})
const uploadedFiles = Array.from(filesList).map(file => {
return {
id: new Date().getTime(),
name: file.name,
url: uploadedResponse.url
}
})
console.log(uploadedFiles)
onFileChange(uploadedFiles)
}, 1000)
}
from laraberg.
@ArtMin96 Thanks a lot, I'll give it a try. As for localization and patterns, I implemented it in a similar Automattic/isolated-block-editor project, but the code could definitely be used for Laraberg as well. I hope to try it soon!
In more detail it is https://github.com/xpalko/isolated-block-editor/commits/trunk, commits on Jan 5, 2023
from laraberg.
@xpalko Thanks. When you get the block patterns in laraberg can you share?
from laraberg.
This issue has been automatically marked as stale because it has been open for 60 days with no activity.
from laraberg.
Related Issues (20)
- using UniSharp/laravel-filemanager with laraberg v2 HOT 1
- using UniSharp/laravel-filemanager with laraberg v2 HOT 1
- Adding a custom block category HOT 1
- Unpacked laraberg.js HOT 2
- No matter what happens, "Your site doesnโt include support for the block" gets thrown. HOT 1
- Cannot unselect in edit mode HOT 1
- The color picker in the inspector is broken HOT 2
- wp-block-group - ContentSize not working HOT 1
- wp-block-buttons justify content does not work HOT 1
- Migration Added Then Immediately Removed - Fresh Laravel 10 Install HOT 2
- With Livewire could an alternative to Gutenberg be made? HOT 1
- Data loss as a result of dropping lb_content table after ruinning laraberg migrations HOT 1
- RichText registerFormatType HOT 1
- Customizing Link Search / Autocomplete Links Functionality HOT 1
- Server Side Custom Block HOT 1
- not getting image to upload or select from library HOT 4
- multi language
- I cannot see medial library image choosing in image block. how can i implement with my custom library in laravel HOT 1
- No background color and text color for setting HOT 1
- I can't upload an image via the editor. Help!
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 laraberg.