placeholder commit

image-example
John McLear 2021-01-14 12:58:06 +00:00
parent 638bd9942e
commit 66109002ef
3 changed files with 12 additions and 4 deletions

View File

@ -395,6 +395,7 @@ const makeContentCollector = function (
const cls = dom.nodeAttr(node, 'class'); const cls = dom.nodeAttr(node, 'class');
if (tname === 'img') { if (tname === 'img') {
/*
hooks.callAll('collectContentImage', { hooks.callAll('collectContentImage', {
cc, cc,
state, state,
@ -403,8 +404,11 @@ const makeContentCollector = function (
cls, cls,
node, node,
}); });
// cc.doAttrib(state, 'image:foo.png'); */
state.lineAttributes.img = 'foo.png'; state.lineAttributes.img = node.src;
// cc.doAttrib(state, 'img');
// cc.startNewLine(state);
} else if (tname === 'br') { } else if (tname === 'br') {
this.breakLine = true; this.breakLine = true;
const tvalue = dom.nodeAttr(node, 'value'); const tvalue = dom.nodeAttr(node, 'value');
@ -444,8 +448,8 @@ const makeContentCollector = function (
// for now it shows how to fix the problem // for now it shows how to fix the problem
return; return;
} }
if (collectStyles) { if (collectStyles) {
if(tname === "img") debugger;
hooks.callAll('collectContentPre', { hooks.callAll('collectContentPre', {
cc, cc,
state, state,

View File

@ -82,6 +82,8 @@ domline.createDomLine = function (nonEmpty, doesWrap, optBrowser, optDocument) {
let lineClass = 'ace-line'; let lineClass = 'ace-line';
result.appendSpan = function (txt, cls) { result.appendSpan = function (txt, cls) {
console.log("cls", cls);
// console.log("domline", domline, "txt", txt, "cls", cls)
let processedMarker = false; let processedMarker = false;
// Handle lineAttributeMarker, if present // Handle lineAttributeMarker, if present
if (cls.indexOf(lineAttributeMarker) >= 0) { if (cls.indexOf(lineAttributeMarker) >= 0) {
@ -97,6 +99,8 @@ domline.createDomLine = function (nonEmpty, doesWrap, optBrowser, optDocument) {
processedMarker |= modifier.processedMarker; processedMarker |= modifier.processedMarker;
}); });
if (listType) { if (listType) {
listType = listType[1]; listType = listType[1];
if (listType) { if (listType) {

View File

@ -73,7 +73,7 @@ linestylefilter.getLineStyleFilter = function (lineLength, aline, textAndClassFu
function attribsToClasses(attribs) { function attribsToClasses(attribs) {
let classes = ''; let classes = '';
let isLineAttribMarker = false; let isLineAttribMarker = false;
top.console.log("attribs", attribs)
// For each attribute number // For each attribute number
Changeset.eachAttribNumber(attribs, (n) => { Changeset.eachAttribNumber(attribs, (n) => {
// Give us this attributes key // Give us this attributes key