Skip to content
Snippets Groups Projects
Verified Commit 32d43486 authored by Volker Schukai's avatar Volker Schukai :alien:
Browse files

chore: commit save point

parent 32a951eb
No related branches found
No related tags found
No related merge requests found
Showing
with 49 additions and 1 deletion
......@@ -4,7 +4,12 @@ export const ListBlock = (bm, label) => {
category: 'Basic',
attributes: {class: 'fa fa-list'},
content: {
type: 'list'
type: 'list',
content: `
<ul class="list-unstyled">
<li>This is a list.</li>
</ul>
`,
}
});
};
......@@ -20,6 +25,7 @@ export default (domc) => {
'custom-name': 'List',
tagName: 'ul',
resizable: 1,
dropable: "li",
traits: [
{
type: 'select',
......
export const ListItemBlock = (bm, label) => {
bm.add('list_item', {
label: label,
category: 'Basic',
attributes: {class: 'fa fa-list'},
content: {
type: 'list_item',
content: `<li>This is a list.</li>`,
}
});
};
export default (domc) => {
const defaultType = domc.getType('default');
const defaultModel = defaultType.model;
const textType = domc.getType("text")
const textView = textType.view;
domc.addType('list_item', {
model: defaultModel.extend({
defaults: Object.assign({}, defaultModel.prototype.defaults, {
'custom-name': 'ListItem',
tagName: 'li',
resizable: false,
draggable: ["ul","ol"],
dropable: false,
editable: true,
traits: [
].concat(defaultModel.prototype.defaults.traits)
})
}, {
isComponent: function (el) {
if (el && el.tagName === "LI") {
return {type: 'list_item'};
}
}
}),
view: textView
});
}
File moved
File moved
File moved
File moved
File moved
File moved
File moved
File moved
File moved
File moved
File moved
File moved
File moved
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment