Closed vinumweb closed 8 months ago
Hi
The easiest way is to add a component for <html>
element that allows editing child elements like <title>
You can use the following code to add the component.
Vvveb.Components.extend("_base", "html/html", {
nodes: ["html"],
name: "Html Page",
image: "icons/posts.svg",
html: `<html><body></body></html>`,
properties: [{
name: "Title",
key: "title",
htmlAttr: "innerHTML",
inputtype: TextInput,
child:"title",
}, {
name: "Meta description",
key: "description",
htmlAttr: "content",
inputtype: TextInput,
child:'meta[name=description]',
}, {
name: "Meta keywords",
key: "keywords",
htmlAttr: "content",
inputtype: TextInput,
child:'meta[name=keywords]',
}]
});
The only downside is that to select the html
element you need to first select body
and then use the Select parent
action from the element toolbar.
Hey Givanz. Thanks for the reply. I will try try that now. Just to be sure: Im making a website where my customers can create a website using vvvebjs. Is that okay? Or what. I really hope it is.
And just another question. When using the text editor on text in vvvebjs if i use the underline and all that it creates a element. How do i make that now appear when editing it again. Its very problematic editing text that has already been edited with underlines and bold text
Is that okay? Or what. I really hope it is.
Your question is related to license?
It is allowed, you can use VvvebJs for both free or commercial projects without any restriction.
VvvebJs is licensed under permissive Apache 2 license.
How do i make that now appear when editing it again.
You can't edit the new element that was created by underline button in text editor? Can you please provide more details? if possible a screencast or screenshot.
Wow, thanks for the quick reply. I think it is absolutely amazing that you want to share this project with other for FREE! You are the definition of a legend.
This is what i mean. It makes theese span elements and if i click the whole <h1>
thing i cant delete the underline. I need to delete the whole text and retype it without underline.
I like the open source concept and I believe that collaboration is a better way to develop software, it also has the advantage of a wider audience that leads to more people using the code.
i cant delete the underline.
Thanks for the screenshot, this is a limitation (undo the underline/italic operation) of the text editor that will be fixed in the next update.
Alright! Thank you Givanz!
I disabled element highlighting and select inside text editor in the last commit to avoid issues with elements created by underline/bold etc actions.
Thanks! Where did you do it? In wich file. So i dont need to change everything
Oh im sorry the link showed me. Thanks!
It still shows the when hovering and still need to delete whole text
Try clearing browser cache, you can also check if it works here VvvebJs editor
It works kinda. still shows up as a
I rechecked and it works for bold also, please see https://gofile.io/d/9CFu1f
Ohh its because i wasnt too clear about what i meant. After you make all the changes then click on another element. Then if you try to change the bold and underline it wont work.
If you exit the text editor and then select the newly created element by bold button then it will treat it as a new text block this can't be avoided, but if you click on the same parent element and edit the text it will work as expected.
Alright but cant you make it so mouse ignores <span>
elements if its inside a <h1>
element?
How do i make a input to change the
<title>
tag on the page that im editing?Thanks in advance. Peter